Skip to content

Commit

Permalink
Added black and refactor of requirements files and setup.py
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
mikeengland committed Jan 26, 2020
1 parent 8dda876 commit d8fae37
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 10 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,15 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-venv tox-gh-actions coveralls
pip install django
python setup.py install
pip install -r requirements-dev.txt
- name: Run test suite
run: tox
- name: debug
run: ls -l
- name: Coveralls
- name: Run Coveralls
run: coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.6
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include LICENSE
include README.md
include README.md
include pyproject.toml
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.black]
line-length = 120
skip-string-normalization = true
8 changes: 8 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coveralls==1.10.0
flake8==3.7.9
tox==3.14.3
tox-venv==0.4.0
tox-gh-actions==0.3.0
black==19.10b0

-r requirements.txt
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
django
django-picklefield
python-memcached
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

from setuptools import setup

with open('requirements.txt') as fp:
install_requires = fp.read()

this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
Expand Down Expand Up @@ -38,7 +41,6 @@
'Operating System :: Microsoft :: Windows',
],
keywords='django dynamic live settings setty django-setty admin cache',

install_requires=['django-picklefield', 'python-memcached'],
install_requires=install_requires,
test_suite='setty.tests',
)

0 comments on commit d8fae37

Please sign in to comment.