-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Full move to poetry, isort and added Codecov (#68)
* With poetry, no setup.py anymore * GH action with poetry instead of requirements * Fixed for poetry * Using only poetry * Trying to get poetry to work * Try poetry via pip * Split actions in jobs * Using poetry action * Using isort * Using isort * Fixed missing script for pip * Updated * Revert to install poetry via pip, not action * Added Codecov * Run coverage only once * Testing if logic * Fixed Python 3.6 for Codecov * Fixed if * Fixed if syntax * Test syntax * Test strategy.matrix * Typos * steps.matrix * Back to last working state * Removed requirements.txt
- Loading branch information
1 parent
e11e894
commit d8598ae
Showing
25 changed files
with
195 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
branches: | ||
- master | ||
jobs: | ||
build: | ||
check-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -23,6 +23,9 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# - name: Python Poetry Action | ||
# uses: abatilo/[email protected] | ||
|
||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
|
@@ -49,26 +52,35 @@ jobs: | |
run: | | ||
sudo apt-get install --no-install-recommends -y openbabel | ||
- name: Install Pip | ||
- name: Poetry install dependencies | ||
run: | | ||
sudo apt-get install --no-install-recommends -y python3-pip | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install --upgrade openbabel-wheel | ||
if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi | ||
# chmod +x acpype/acpype.py | ||
# ln -s $PWD/run_acpype.py /usr/local/bin/acpype | ||
pip3 install poetry | ||
poetry add openbabel-wheel | ||
poetry install | ||
- name: Lint with flake8 | ||
run: flake8 -v --count | ||
run: poetry run flake8 -v --count | ||
|
||
- name: Check format with black | ||
run: black --diff --check . | ||
run: poetry run black --diff --check . | ||
|
||
- name: Run isort | ||
run: poetry run isort . --check-only --profile black | ||
|
||
- name: Test with PyTest | ||
run: | | ||
# acpype -di test/AAA.pdb -c gas | ||
pytest --color=yes | ||
poetry run pytest --color=yes --cov=./ --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
if: matrix.python-version == 3.6 | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
fail_ci_if_error: true | ||
|
||
release: | ||
needs: check-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get current date | ||
id: date | ||
run: echo "::set-output name=date::$(date +'%Y.%-m.%-d')" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# from https://packaging.python.org/guides/single-sourcing-package-version/ | ||
# using option 2 | ||
# updated automatically via pre-commit git-hook | ||
__version__ = "2021.12.24" | ||
__version__ = "2021.12.25" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.