Skip to content

Commit

Permalink
Merge pull request #21 from Jyrno42/chore-upgrades
Browse files Browse the repository at this point in the history
Upgrade dependencies, remove unused features, add some tests
  • Loading branch information
Jyrno42 committed Mar 22, 2021
2 parents 484ae96 + e0f9eca commit 988b07d
Show file tree
Hide file tree
Showing 65 changed files with 2,674 additions and 1,342 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Add poetry
uses: abatilo/[email protected]
with:
poetry-version: "1.1"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
poetry install
- name: Test with tox
run: |
poetry run make test-all
36 changes: 36 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: [3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Add poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.1
- name: Install dependencies
run: poetry install
- name: Build and publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,22 @@ pip-log.txt

# Unit test / coverage reports
.coverage
.coverage*
.tox
nosetests.xml
htmlcov/

# Translations for tests
example/**/*.mo
demo/example/**/*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# local database
**/*.sqlite3

# Pycharm
.idea

Expand Down
86 changes: 86 additions & 0 deletions .prospector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
uses:
- django

ignore-paths:
- docs
- demo/example/settings.py
- demo/example/wsgi.py

ignore-patterns:
- htmlcov/

pep8:
enable:
# This is the current list of error and warning codes from:
# https://github.com/PyCQA/pep8-naming
# https://pep8.readthedocs.io/en/latest/intro.html?highlight=E731

# code sample message

# Note some are not needed when using black e.g:
# E1/W1 - indentation
# E2/W2 - whitespace
# E3/W3 - blank line
# E5/W5 - line length/breaks

# E4 Import
# Not applicable when using isort
# - E401 # multiple imports on one line

# handled by pylint: wrong-import-position
# - E402 # module level import not at top of file

# E7 Statement

# Not applicable with black:
# - E701 # multiple statements on one line (colon)
# - E702 # multiple statements on one line (semicolon)
# - E703 # statement ends with a semicolon
# - E704 # (*) multiple statements on one line (def)

- E711 # (^) comparison to None should be ‘if cond is None:’
- E712 # (^) comparison to True should be ‘if cond is True:’ or ‘if cond:’
- E713 # test for membership should be ‘not in’
- E714 # test for object identity should be ‘is not’
- E721 # (^) do not compare types, use ‘isinstance()’
- E722 # do not use bare except, specify exception instead
- E731 # do not assign a lambda expression, use a def
- E741 # do not use variables named ‘l’, ‘O’, or ‘I’
- E742 # do not define classes named ‘l’, ‘O’, or ‘I’
- E743 # do not define functions named ‘l’, ‘O’, or ‘I’

# E9 Runtime
- E901 # SyntaxError or IndentationError
- E902 # IOError

# W6 Deprecation warning
- W601 # .has_key() is deprecated, use ‘in’
- W602 # deprecated form of raising exception
- W603 # ‘<>’ is deprecated, use ‘!=’
- W604 # backticks are deprecated, use ‘repr()’
- W605 # invalid escape sequence ‘x’
- W606 # ‘async’ and ‘await’ are reserved keywords starting with Python 3.7

# N8 PEP-8 Naming Conventions
- N801 # class names should use CapWords convention
- N802 # function name should be lowercase
- N803 # argument name should be lowercase
- N804 # first argument of a classmethod should be named 'cls'
- N805 # first argument of a method should be named 'self'
- N806 # variable in function should be lowercase
- N807 # function name should not start or end with '__'

- N811 # constant imported as non constant
- N812 # lowercase imported as non lowercase
- N813 # camelcase imported as lowercase
- N814 # camelcase imported as constant
- N815 # mixedCase variable in class scope
- N816 # mixedCase variable in global scope
options:
max-line-length: 140

pylint:
disable:
- unused-argument
options:
max-line-length: 140
54 changes: 0 additions & 54 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 988b07d

Please sign in to comment.