Skip to content

Commit

Permalink
Switch from dmenv to poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
dmerejkowsky committed Feb 3, 2020
1 parent a93735e commit 4c2ff81
Show file tree
Hide file tree
Showing 9 changed files with 1,369 additions and 162 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@ jobs:
with:
python-version: 3.7

- name: Install dmenv
uses: TankerHQ/[email protected]
with:
dmenv-version: 0.20.0

- name: Prepare project for development
run: dmenv install
run: |
python -m pip install poetry
python -m poetry config virtualenvs.create false
python -m poetry install
- name: Build documentation
run: |
dmenv run -- mkdocs build
poetry run mkdocs build
- name: Deploy to GitHub pages
uses: maxheld83/[email protected]
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,20 @@ jobs:
with:
python-version: 3.7

- name: Install dmenv
uses: TankerHQ/[email protected]
with:
dmenv-version: 0.20.0

- name: Prepare project for development
run: dmenv install
run: |
python -m pip install poetry
python -m poetry config virtualenvs.create false
python -m poetry install
- name: Run black
run: |
dmenv run -- black --check .
poetry run black --check .
- name: Run mypy
run: |
MYPYPATH=stubs dmenv run -- mypy tsrc
MYPYPATH=stubs poetry run mypy tsrc
- name: Run flake8
run: |
dmenv run -- flake8 .
poetry run flake8 .
12 changes: 5 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,19 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dmenv
uses: TankerHQ/[email protected]
with:
dmenv-version: 0.20.0

- name: Prepare project for development
run: dmenv install
run: |
python -m pip install poetry
python -m poetry config virtualenvs.create false
python -m poetry install
- name: Run tests
run: |
# tests run git commands, and they need
# a proper git identity for that
git config --global user.email "[email protected]"
git config --global user.name "Tasty Test"
dmenv run -- pytest --cov . --cov-report xml --numprocesses auto
poetry run pytest --cov . --cov-report xml --numprocesses auto
- name: Send coverage to codecov.io
uses: codecov/codecov-action@v1
Expand Down
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,17 @@ Finally, feel free to add your name in the `THANKS` file ;)

# Checking your changes

* Install latest [dmenv](https://github.com/TankerHQ/dmenv) version.
* Install latest [poetry](https://python-poetry.org) version.
* Install development and documentation dependencies:

```console
$ dmenv install
$ poetry install
```

* Finally, run:

```console
$ source "$(dmenv show:venv_path)/bin/activate"
$ python ci/ci.py
$ poetry run python ci/ci.py
```


Expand All @@ -66,7 +65,7 @@ $ python ci/ci.py
* Launch the development server locally:

```bash
$ dmenv run mkdocs serve
$ poetry run mkdocs serve
```

* Edit the markdown files from the `docs/` folder and review the changes in your browser
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Next release

* We now use [poetry](https://python-poetry.org) for dependency management and packaging.

# v1.0.2 - (2020-01-29)

* Fix `python_requires` value in project metadata
Expand Down
Loading

0 comments on commit 4c2ff81

Please sign in to comment.