Skip to content

Commit 66fd32f

Browse files
authored
Merge pull request #158 from dclimber/feature/poetry
Feature/poetry
2 parents c180967 + 75dc636 commit 66fd32f

File tree

7 files changed

+1937
-41
lines changed

7 files changed

+1937
-41
lines changed

.github/workflows/pytest.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ jobs:
3232
- name: Set up Python ${{ matrix.python-version }}
3333
uses: actions/setup-python@v2
3434
with:
35-
python-version: ${{ matrix.python-version }}
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install poetry
37+
uses: snok/install-poetry@v1
38+
with:
39+
virtualenvs-create: true
40+
virtualenvs-in-project: true
3641
- name: Install dependencies
37-
run: |
38-
python -m pip install --upgrade pip
39-
pip install -r tests/dev.requirements.txt
42+
run: poetry install --no-interaction --no-root
4043
- name: Test with pytest
4144
env:
4245
POSTGRES_DB: test
@@ -45,4 +48,5 @@ jobs:
4548
POSTGRES_HOST: localhost
4649
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
4750
run: |
51+
source .venv/bin/activate
4852
pytest

docs/en/docs/backends/tortoise.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ your database using your [Tortoise](https://tortoise-orm.readthedocs.io/en/lates
55
!!! warning
66
To use the `TortoiseCRUDRouter`, [Tortoise ORM](https://pypi.org/project/tortoise-orm/) must be first installed.
77

8+
!!! warning
9+
Tortoise ORM works on python versions 3.7 and higher, so if you want to use this backend, you would not be able to use `python 3.6`.
10+
811
## Simple Example
912
Below is an example assuming that you have already imported and created all the required models.
1013

docs/en/docs/contributing.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ on the feature and potential help on where to start implementation wise.
1414

1515
## Development
1616

17+
### Using [poetry](https://python-poetry.org/)
18+
19+
FastAPI-Crudrouter uses [poetry](https://python-poetry.org/) as depenency management system. To install all of the required dependecies simply run:
20+
21+
poetry install
22+
23+
Both dev-requirements and project-requirements will be installed with this command.
24+
25+
To enter the virtual-environment created with poetry use:
26+
27+
poetry shell
28+
29+
If you are not familiar with poetry, please read their [usage guide](https://python-poetry.org/docs/basic-usage/).
30+
1731
### Installing the Dev Requirements
1832
FastAPI-Crudrouter requires as set of development requirements that can installed with `pip` be found in `tests/dev.requirements.txt`
1933

0 commit comments

Comments
 (0)