Format and lint codes and fix packaging (#125)
* add: configure files (setup.py->setup.py+setup.cfg+pyproject.toml) * add: __download_url__ * format with black and isort * fix: flake8 section in setup.cfg * add: E501 to flake ignore * fix: metadata.name does not accept attr * fix: merge __version__.py into __init__.py * fix: flake8 errors in tests/ * fix: datetime.datetime -> datetime * fix: banner * fix: ignore W605 for banner * fix: way to install deps in CI * add: versem to setuptools * fix: drop python<=3.6 (#126) from package and CI
This commit is contained in:
4
.github/workflows/build_test.yml
vendored
4
.github/workflows/build_test.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.6', '3.10']
|
||||
python-version: ['3.7', '3.10']
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools wheel
|
||||
pip install -U setuptools wheel
|
||||
- name: Build test the package
|
||||
run: |
|
||||
python setup.py sdist bdist_wheel
|
||||
|
12
.github/workflows/unit_test.yml
vendored
12
.github/workflows/unit_test.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.9']
|
||||
python-version: ['3.10']
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
@@ -25,14 +25,14 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
|
||||
pip install '.[dev]'
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 waybackpy/ --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
# flake8 waybackpy/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --per-file-ignores="waybackpy/__init__.py:F401"
|
||||
flake8 . --count --show-source --statistics
|
||||
- name: Lint with black
|
||||
run: |
|
||||
black . --check --diff
|
||||
# - name: Static type test with mypy
|
||||
# run: |
|
||||
# mypy
|
||||
|
Reference in New Issue
Block a user