Skip to content

Commit

Permalink
Switch to poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasgeiter committed Dec 27, 2021
1 parent 39c61b6 commit e7be5fc
Show file tree
Hide file tree
Showing 8 changed files with 617 additions and 87 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ jobs:
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
- name: Install wheel
run: pip install wheel
- name: Build dist
run: python setup.py sdist bdist_wheel
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Install poetry
uses: snok/install-poetry@v1
- name: Build
run: poetry build
- name: Publish
run: poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: pip install -r requirements.txt
run: poetry install
- name: Run tests
run: pytest
run: poetry run pytest
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@ Thank you for considering to contribute to this project. These guidelines will h
##### Prerequisites

- [Python 3]
- [virtualenv]
- [poetry]

##### Steps

1. Clone the (forked) repository
1. Create a virtualenv with `virtualenv env`
1. Activate virtualenv `source env/bin/activate` or `env/Scripts/activate` on Windows
1. Run `pip install -r requirements.txt` in the project directory
1. Install dependencies with `poetry install`

#### Running Tests

```bash
pytest
poetry run pytest
```

<br/>
Expand All @@ -47,5 +45,5 @@ Make sure your code follows [PEP-8](https://www.python.org/dev/peps/pep-0008/) a
If it makes sense, writing tests for your PRs is always appreciated and will help get them merged.

[Python 3]: https://www.python.org/
[virtualenv]: https://virtualenv.pypa.io/
[poetry]: https://python-poetry.org/
[git-commit-message]: https://chris.beams.io/posts/git-commit/
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

0 comments on commit e7be5fc

Please sign in to comment.