-
Notifications
You must be signed in to change notification settings - Fork 20
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 #20 from hacf-fr/poetry
Migrate to Poetry. Contribute to #18
- Loading branch information
Showing
13 changed files
with
590 additions
and
106 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,30 +1,18 @@ | ||
|
||
|
||
[metadata] | ||
description-file = README.md | ||
|
||
[tool:pytest] | ||
addopts = --verbose | ||
python_files = tests/*.py | ||
|
||
[tool:isort] | ||
line_length = 88 | ||
multi_line_output = 3 | ||
include_trailing_comma = true | ||
|
||
[flake8] | ||
select = C,D,E,F,W | ||
max-complexity = 10 | ||
docstring-convention = google | ||
exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build,.eggs | ||
doctests = True | ||
|
||
# To work with Black | ||
max-line-length = 88 | ||
# E501: line too long | ||
# W503: Line break occurred before a binary operator | ||
# E203: Whitespace before ':' | ||
# D202 No blank lines allowed after function docstring | ||
# W504 line break after binary operator | ||
# ignore = | ||
ignore = W503 | ||
# E501, | ||
# W503, | ||
# E203, | ||
# D202, | ||
# W504 | ||
# W504 |
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,38 +1,25 @@ | ||
name: "Release actions" | ||
|
||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
release: | ||
runs-on: ubuntu-latest | ||
name: Deploy to PyPi | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.x" | ||
python-version: "3.8" | ||
architecture: x64 | ||
|
||
- name: Install dependencies | ||
run: python -m pip install setuptools wheel twine black pytest .[testing] | ||
|
||
- run: python3 -m black . | ||
|
||
- run: python3 -m pytest | ||
|
||
- uses: olegtarasov/get-tag@v2 | ||
name: Set tag envronment variable | ||
run: pip install poetry==1.0.9 | ||
|
||
- name: Set version number | ||
run: | | ||
sed -i "s/version=\"0.0.0\"/version=\"$GIT_TAG_NAME\"/" ${{github.workspace}}/setup.py | ||
- name: Publish to PyPi | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
# - run: python3 -m black . | ||
- run: poetry install | ||
- run: poetry run pytest | ||
- run: poetry build | ||
- run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }} |
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.