Skip to content

Commit

Permalink
Use GitHub action, pipenv and prospector
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Feb 22, 2021
1 parent 4a58c69 commit 24c5edd
Show file tree
Hide file tree
Showing 11 changed files with 843 additions and 79 deletions.
75 changes: 0 additions & 75 deletions .circleci/config.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,42 @@ jobs:

- name: Checks
run: c2cciutils-checks

- run: pipenv sync --system --dev
- run: python3 -m pip install --quiet --user -e .
- run: prospector .
- run: >
coverage run --source=deskew --module pytest --durations=0 --verbose --color=yes
--profile --profile-svg --junitxml=results/test-reports/junit.xml tests &&
coverage report &&
coverage html --directory=results/coverage
- uses: actions/upload-artifact@v1
with:
name: Test results
path: results/test-reports

- name: Init Git
run: |
git config credential.helper 'cache --timeout=120'
git config user.email "<ci@ci.com>"
git config user.name "CI"
- name: Init pypi
run: |
echo "[pypi]" > ~/.pypirc
echo "username = ${PYPI_USER}" >> ~/.pypirc
echo "password = ${PYPI_PASS}" >> ~/.pypirc
pip install --user wheel twine
- name: deploy
run: |
python setup.py egg_info --no-date sdist bdist_wheel
twine upload dist/*
if: github.ref == 'refs/heads/master'
- name: Bump version
run: |
pip install --user bump-anything
bump patch
git add setup.py
git commit --allow-empty -m "[skip ci] Bump Version"
git push
if: github.ref == 'refs/heads/master'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/deskew.egg-info/
__pycache__/
11 changes: 11 additions & 0 deletions .prospector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
strictness: veryhigh

bandit:
run: true

mypy:
run: true

mccabe:
run: false
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

[MESSAGES CONTROL]
disable=missing-docstring,too-many-branches
disable=locally-disabled,too-many-locals,too-many-branches,missing-module-docstring,missing-function-docstring,bad-continuation

[FORMAT]
max-line-length=110
Expand Down
17 changes: 17 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
numpy = "==1.20.1"
scikit-image = "==0.18.1"

[dev-packages]
pytest = "==3.10.1"
pytest-profiling = "==1.7.0"
coverage = "==5.4"
prospector = {extras = ["with_bandit", "with_mypy"], version = "==1.3.1"}

[requires]
python_version = "3.8"
Loading

0 comments on commit 24c5edd

Please sign in to comment.