From 43e6cdcc7c5982e18fa881818b16e60085480637 Mon Sep 17 00:00:00 2001 From: Florents Tselai Date: Thu, 12 Jun 2025 08:55:23 +0300 Subject: [PATCH 1/4] Pickup version dynamically. Not sure whats the version now though. --- dev_requirements.txt | 5 ----- pgcommitfest/__init__.py | 1 + requirements.txt | 5 ----- setup.cfg | 4 ---- 4 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 dev_requirements.txt delete mode 100644 requirements.txt delete mode 100644 setup.cfg diff --git a/dev_requirements.txt b/dev_requirements.txt deleted file mode 100644 index 2b0518b5..00000000 --- a/dev_requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ --r requirements.txt -uwsgi -pycodestyle -ruff -djhtml diff --git a/pgcommitfest/__init__.py b/pgcommitfest/__init__.py index e69de29b..3dc1f76b 100644 --- a/pgcommitfest/__init__.py +++ b/pgcommitfest/__init__.py @@ -0,0 +1 @@ +__version__ = "0.1.0" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index fc12402f..00000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -django>=4.2,<5.0 -psycopg2 -simplejson -requests -pycryptodomex diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index b5a80bc6..00000000 --- a/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[pycodestyle] -statistics=True -ignore=E402,E501,W503 -max-line-length=120 From 8b65915ea7470ae575bb91f14de4944973a3231a Mon Sep 17 00:00:00 2001 From: Florents Tselai Date: Thu, 12 Jun 2025 08:55:43 +0300 Subject: [PATCH 2/4] Update pyproject.toml --- .gitignore | 3 +++ README.md | 2 +- pyproject.toml | 38 ++++++++++++++++++++++++++++++++++---- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d0143b09..e293a5a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ *.pyc /env/ +/.idea/ +/venv/ +*.egg-info diff --git a/README.md b/README.md index 6502e0a6..f96fdc95 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Next, configure your local environment with virtualenv and install local depende ```bash python3 -m venv env source env/bin/activate -pip install -r dev_requirements.txt +pip install -e '.[dev]' ``` Create a database for the application: diff --git a/pyproject.toml b/pyproject.toml index 00d5986f..81571012 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,39 @@ +[project] +name = "pgocmmitfest" +description = "Commitfest app for the PostgreSQL community" +dynamic = ["version"] +authors = [{ name = "xxx", email = "yyy" }] +readme = "README.md" +licsense = "PostgreSQL" +dependencies = [ + "django>=4.2,<5.0", + "psycopg2", + "simplejson", + "requests", + "pycryptodomex", +] + +[project.optional-dependencies] +dev = [ + "uwsgi", + "pycodestyle", + "ruff", + "djhtml", +] + +[tool.setuptools.packages.find] +include = ["pgcommitfest*"] + +[tool.pycodestyle] +statistics = true +ignore = ["E402", "E501", "W503"] +max-line-length = 120 + [tool.ruff] -# line-length = 120 +line-length = 120 [tool.ruff.format] -# quote-style = "preserve" +quote-style = "preserve" [tool.ruff.lint] extend-select = ["I"] @@ -18,5 +49,4 @@ section-order = [ ] [tool.ruff.lint.isort.sections] -# Group all Django imports into a separate section. -"django" = ["django"] +django = ["django"] From f31a1e0d726183cc89875dfb8cdcb6128435b177 Mon Sep 17 00:00:00 2001 From: Florents Tselai Date: Thu, 12 Jun 2025 12:57:22 +0300 Subject: [PATCH 3/4] Rm authors --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 81571012..9c62aa30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,6 @@ name = "pgocmmitfest" description = "Commitfest app for the PostgreSQL community" dynamic = ["version"] -authors = [{ name = "xxx", email = "yyy" }] readme = "README.md" licsense = "PostgreSQL" dependencies = [ From 3662e81b678dff1d1be6e71169796017fbf1d381 Mon Sep 17 00:00:00 2001 From: Florents Tselai Date: Thu, 12 Jun 2025 13:00:07 +0300 Subject: [PATCH 4/4] Ruff --- pyproject.toml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9c62aa30..78fa9ce2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "pgocmmitfest" description = "Commitfest app for the PostgreSQL community" dynamic = ["version"] readme = "README.md" -licsense = "PostgreSQL" +license = "PostgreSQL" dependencies = [ "django>=4.2,<5.0", "psycopg2", @@ -28,12 +28,6 @@ statistics = true ignore = ["E402", "E501", "W503"] max-line-length = 120 -[tool.ruff] -line-length = 120 - -[tool.ruff.format] -quote-style = "preserve" - [tool.ruff.lint] extend-select = ["I"] @@ -48,4 +42,5 @@ section-order = [ ] [tool.ruff.lint.isort.sections] +# Group all Django imports into a separate section. django = ["django"]