Skip to content

Commit f9bd276

Browse files
authored
feat: replaced pipenv to poetry. Updated dependencies (#337)
* feat: replaced pipenv to poetry. Updated dependencies * docs: updated README
1 parent e3b6dee commit f9bd276

13 files changed

+3023
-1361
lines changed

.github/workflows/python-package.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install pipenv
30-
pipenv lock --dev --requirements > requirements.txt
31-
pip install -r requirements.txt
29+
pip install poetry
30+
poetry install --no-interaction --no-root
31+
env:
32+
POETRY_VIRTUALENVS_CREATE: false
3233
- name: Test with pytest
3334
run: |
34-
python setup.py test
35+
pytest --cov=project --cov=tests tests/
3536
- name: Run mypy
3637
continue-on-error: true
3738
run: |
38-
mypy microservices-scaffold
39+
mypy project
3940
- name: Lint with flake8
4041
run: |
4142
# stop the build if there are Python syntax errors or undefined names

Pipfile

-30
This file was deleted.

Pipfile.lock

-1,240
This file was deleted.

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,34 @@ microservices with Python which handles cross-cutting concerns:
2020

2121
## Quickstart
2222

23+
We recommended use [Poetry](https://python-poetry.org/docs/) to install the dependencies
24+
25+
Start with poetry
26+
```shell
27+
pip install --user poetry
28+
poetry update
29+
poetry run python manage.py
30+
```
31+
32+
Start with a virtualenv
33+
```shell
34+
pip install -r requirements.txt
35+
python manage.py
36+
```
37+
38+
39+
Open `http://127.0.0.1:5000/ui/` and play with swagger
40+
2341
See our [quickstart webpage](https://python-microservices.github.io/scaffold/quickstart/)
2442

43+
# Dependencies
44+
45+
Updated dependencies in a requirements.txt with:
46+
47+
```shell
48+
poetry export --dev -f requirements.txt --output requirements.txt
49+
```
50+
2551
# How To contribute
2652

2753
We appreciate opening issues and pull requests to make PyMS even more stable & useful! See [This doc](CONTRIBUTING.md)

manage.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# encoding: utf-8
2-
from flask_script import Manager
3-
42
from project.app import MyMicroservice
53

64

@@ -15,7 +13,5 @@ def create_app():
1513

1614
app = create_app()
1715

18-
manager = Manager(app)
19-
2016
if __name__ == '__main__':
21-
manager.run()
17+
app.run()

0 commit comments

Comments
 (0)