-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from jannikmi/dev
Dev
- Loading branch information
Showing
34 changed files
with
1,242 additions
and
867 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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
# By default, GitHub will maximize the number of jobs run in parallel | ||
# depending on the available runners on GitHub-hosted virtual machines. | ||
# max-parallel: 8 | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
env: | ||
TOXENV: ${{ matrix.tox-env }} | ||
TOX_SKIP_MISSING_INTERPRETERS: False | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run pre-commit hook | ||
uses: pre-commit/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Upgrade pip version | ||
run: pip install -U pip | ||
|
||
- name: Install test dependencies | ||
run: pip install tox tox-gh-actions poetry | ||
|
||
- name: Run tox | ||
run: tox | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: endsWith(github.ref, '/master') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install build dependencies | ||
run: | | ||
pip install poetry | ||
- name: Fetch version | ||
id: fetch_version | ||
run: echo "::set-output name=version_nr::$(poetry version -s)" | ||
|
||
- name: Build a binary wheel and a source tarball | ||
# Note: poetry build required to support CLI script entrypoint in pyproject.toml?! | ||
run: | | ||
poetry build | ||
- name: Create GitHub Release | ||
id: create_gh_release | ||
uses: actions/create-release@v1 | ||
env: | ||
# use token provided by Actions | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION: ${{ steps.fetch_version.outputs.version_nr }} | ||
with: | ||
tag_name: ${{env.VERSION}} | ||
release_name: Release ${{env.VERSION}} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: PyPI Publishing | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_DEPLOYMENT_API_KEY }} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
pin: | ||
@echo "pinning the dependencies specified in 'pyproject.toml':" | ||
@poetry update -vv | ||
#poetry export -f requirements.txt --output docs/requirements.txt --without-hashes | ||
|
||
req: | ||
@echo "installing the development dependencies..." | ||
@poetry install | ||
@#poetry install --no-dev | ||
|
||
|
||
update: pin req | ||
|
||
test: | ||
@tox | ||
#pytest | ||
|
||
hook: | ||
@pre-commit install | ||
@pre-commit run --all-files | ||
|
||
hook2: | ||
@pre-commit autoupdate | ||
|
||
clean: | ||
rm -rf .pytest_cache .coverage coverage.xml tests/__pycache__ .mypyp_cache/ .tox | ||
|
||
|
||
build: | ||
poetry build | ||
|
||
# documentation generation: | ||
# https://docs.readthedocs.io/en/stable/intro/getting-started-with-sphinx.html | ||
docs: | ||
(cd docs && make html) | ||
|
||
|
||
.PHONY: clean test build docs |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -10,7 +10,8 @@ Installation | |
|
||
Installation with pip: | ||
|
||
:: | ||
|
||
.. code-block:: console | ||
pip install extremitypathfinder | ||
|
Oops, something went wrong.