Skip to content

Commit

Permalink
Merge pull request #12 from ajwalkiewicz/11-setup-python-package-gith…
Browse files Browse the repository at this point in the history
…ub-action

Setup python package github action #11
  • Loading branch information
ajwalkiewicz authored Nov 23, 2022
2 parents ed8e924 + adbd7c1 commit 88952b0
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 24 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Python package

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:
Expand All @@ -16,26 +16,26 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# 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
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install -r dev_requirements.txt
- name: Lint with flake8
run: |
# 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
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,4 @@ dmypy.json
miscelenious
credentials
*.temp
observations
2 changes: 1 addition & 1 deletion cochar/data/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"country": "US",
"occupation": "optimal",
"weights": true,
"database": "/home/walu/Git/randname/full_database",
"database": "",
"show_warnings": false
}
70 changes: 70 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
alabaster==0.7.12
aniso8601==9.0.1
attrs==22.1.0
Babel==2.10.3
black==22.6.0
bleach==5.0.0
certifi==2022.5.18.1
cffi==1.15.0
charset-normalizer==2.0.12
click==8.1.3
commonmark==0.9.1
cryptography==37.0.2
deepdiff==5.8.1
docutils==0.18.1
Flask==2.2.2
Flask-RESTful==0.3.9
idna==3.3
imagesize==1.4.1
importlib-metadata==4.11.4
iniconfig==1.1.1
itsdangerous==2.1.2
jeepney==0.8.0
Jinja2==3.1.2
keyring==23.5.0
Markdown==3.4.1
markdown-it-py==2.1.0
MarkupSafe==2.1.1
mccabe==0.7.0
mdit-py-plugins==0.3.0
mdurl==0.1.1
mypy-extensions==0.4.3
myst-parser==0.18.0
ordered-set==4.1.0
packaging==21.3
pathspec==0.9.0
pkginfo==1.8.2
platformdirs==2.5.2
pluggy==1.0.0
py==1.11.0
pycodestyle==2.10.0
pycparser==2.21
pyflakes==3.0.0
Pygments==2.12.0
pyparsing==3.0.9
pytest==7.1.2
pytz==2022.1
PyYAML==6.0
readme-renderer==35.0
requests==2.27.1
requests-toolbelt==0.9.1
rfc3986==2.0.0
rich==12.4.1
rname==0.3.3
SecretStorage==3.3.2
six==1.16.0
snowballstemmer==2.2.0
Sphinx==5.1.1
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
tomli==2.0.1
twine==4.0.0
typing-extensions==4.2.0
urllib3==1.26.9
webencodings==0.5.1
Werkzeug==2.2.2
zipp==3.8.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rname==0.2.2
rname==0.3.3

0 comments on commit 88952b0

Please sign in to comment.