Skip to content

Commit 8d9cd45

Browse files
committed
Rework package structure and files
1 parent be75bd7 commit 8d9cd45

25 files changed

+229
-226
lines changed

.bumpversion.cfg

Lines changed: 0 additions & 7 deletions
This file was deleted.

.coveragerc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[run]
2+
branch = True
3+
source = osm_field/
4+
5+
[report]
6+
show_missing = True
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Make Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.8
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip setuptools wheel twine
19+
- name: Build and publish
20+
env:
21+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
22+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
23+
run: |
24+
python setup.py sdist bdist_wheel
25+
twine upload dist/*
26+
- name: Create Release
27+
uses: actions/create-release@8d93430eddafb926c668181c71f579556f68668c
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
with:
31+
tag_name: ${{ github.ref }}
32+
release_name: Release ${{ github.ref }}

.github/workflows/pythontests.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "[0-9]+.[0-9]+"
8+
pull_request:
9+
branches:
10+
- master
11+
- "[0-9]+.[0-9]+"
12+
13+
jobs:
14+
black:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v1
18+
- uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.8
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip black
24+
- name: Running black
25+
run: |
26+
black --check --diff .
27+
28+
flake8:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v1
32+
- uses: actions/setup-python@v1
33+
with:
34+
python-version: 3.8
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip flake8
38+
- name: Running flake8
39+
run: |
40+
flake8 --count --show-source --statistics
41+
42+
isort:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v1
46+
- uses: actions/setup-python@v1
47+
with:
48+
python-version: 3.8
49+
- name: Install dependencies
50+
run: |
51+
python -m pip install --upgrade pip isort
52+
- name: Running isort
53+
run: |
54+
isort --check-only --diff --recursive
55+
56+
tests:
57+
needs: [black, flake8, isort]
58+
runs-on: ubuntu-latest
59+
strategy:
60+
fail-fast: false
61+
matrix:
62+
python-version:
63+
- "3.5"
64+
- "3.6"
65+
- "3.7"
66+
- "3.8"
67+
django-version:
68+
- "2.2"
69+
- "3.0"
70+
- "master"
71+
exclude:
72+
# Python 3.5 is compatible with Django <3.0
73+
- python-version: "3.5"
74+
django-version: "3.0"
75+
- python-version: "3.5"
76+
django-version: "master"
77+
steps:
78+
- uses: actions/checkout@v1
79+
80+
- name: Set up Python ${{ matrix.python-version }}
81+
uses: actions/setup-python@v1
82+
with:
83+
python-version: ${{ matrix.python-version }}
84+
85+
- name: Upgrade pip version
86+
run: |
87+
python -m pip install -U pip
88+
89+
- name: Upgrade Django version
90+
run: |
91+
if [ "${{ matrix.django-version }}" == "master" ] ; then
92+
python -m pip install "https://github.com/django/django/archive/master.tar.gz"
93+
else
94+
python -m pip install "Django~=${{ matrix.django-version }}.0"
95+
fi
96+
97+
- name: Python and Django versions
98+
run: |
99+
echo "Python ${{ matrix.python-version }} -> Django ${{ matrix.django-version }}"
100+
python --version
101+
echo "Django: `django-admin --version`"
102+
103+
- name: Install dependencies
104+
run: |
105+
python -m pip install -e '.[testing]'
106+
107+
- name: Running tests
108+
run: |
109+
coverage run "$(command -v django-admin.py)" test -v 2 --settings=tests.settings
110+
coverage report
111+
coverage xml
112+
113+
- name: Upload coverage to codecov.io
114+
uses: codecov/codecov-action@v1
115+
with:
116+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*.egg-info
99
dist
1010
build
11+
.eggs
1112
eggs
1213
parts
1314
bin
@@ -40,4 +41,4 @@ output/*.html
4041
output/*/index.html
4142

4243
# Sphinx
43-
docs/_build
44+
docs/_build

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v2.5.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- repo: https://github.com/psf/black
9+
rev: 19.10b0
10+
hooks:
11+
- id: black
12+
- repo: https://gitlab.com/PyCQA/flake8
13+
rev: 3.7.9
14+
hooks:
15+
- id: flake8
16+
- repo: https://github.com/timothycrosley/isort
17+
rev: "4.3.21"
18+
hooks:
19+
- id: isort

.travis.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

HISTORY.rst renamed to CHANGES.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. :changelog:
22
33
=======
4-
History
4+
Changes
55
=======
66

77
Unreleased

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014, Markus Holtermann, Thomas Schmidt
1+
Copyright (c) 2014-2020, Markus Holtermann, Thomas Schmidt
22
Copyright (c) 2014, Sinnwerkstatt Medienagentur GmbH
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy of

MANIFEST.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
include AUTHORS
2-
include HISTORY.rst
1+
include AUTHORS.rst
2+
include CHANGES.rst
33
include LICENSE
4-
include README.rst
54
recursive-include osm_field/static/css *.*
65
recursive-include osm_field/static/js *.*

0 commit comments

Comments
 (0)