From 4c271a7a1221df5961055b2dbf311a1a7ca83891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Tue, 25 Jun 2024 21:20:01 -0300 Subject: [PATCH 1/2] Handle dev dependencies via pyproject.toml --- .github/workflows/pythonapp.yml | 4 +--- pyproject.toml | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index ee03f7e..1d2f175 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -26,15 +26,13 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install . + pip install '.[dev]' - name: Lint with flake8 run: | - pip install flake8 # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pip install pytest pytest diff --git a/pyproject.toml b/pyproject.toml index 755cc96..9fa3c66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,3 +17,10 @@ authors = [ ] description = "Bot de telegram para organizar pycamp" readme = "README.md" + +[project.optional-dependencies] +dev = [ + "flake8==7.1.0", + "freezegun==1.5.1", + "pytest==8.2.2", +] From 9c17df996503d2dc44df9e357aba65a72f96000e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Tue, 25 Jun 2024 21:35:28 -0300 Subject: [PATCH 2/2] Update dev environment instructions --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index ca7eb8a..fe126c6 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,11 @@ Despues instala el paquete en modo desarrollo en un virtualenv ~~~bash virtualenv -p python3 venv source venv/bin/activate -pip install -e . +pip install -e '.[dev]' ~~~ y estas listo para trabajar. -`pip install freezegun` para correr los tests. - ### Python 3.12 `pip install setuptools`