From 65173072b3c7563fd94e40692b7a4164ac3511b1 Mon Sep 17 00:00:00 2001 From: Alex Dewar Date: Wed, 29 May 2024 10:07:24 +0100 Subject: [PATCH 1/3] Revert "Drop ruff from dev dependencies" This reverts commit abad7ed64c8853257396b80289a75b03218ecdcc. --- {{ cookiecutter.project_slug }}/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/{{ cookiecutter.project_slug }}/pyproject.toml b/{{ cookiecutter.project_slug }}/pyproject.toml index 427f01f..39e60ca 100644 --- a/{{ cookiecutter.project_slug }}/pyproject.toml +++ b/{{ cookiecutter.project_slug }}/pyproject.toml @@ -17,6 +17,7 @@ pytest-cov = "^5.0.0" pytest-mypy = "^0.10.0" pytest-mock = "^3.7.0" pre-commit = "^3.0.4" +ruff = "^0.4.4" [build-system] requires = ["poetry-core>=1.0.0"] From 596c9394ee59263b8dbb2ab530a6ceb44e48ede9 Mon Sep 17 00:00:00 2001 From: Alex Dewar Date: Wed, 29 May 2024 10:08:14 +0100 Subject: [PATCH 2/3] Use pip install .[dev] to install own project --- .github/workflows/ci-pip-tools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-pip-tools.yml b/.github/workflows/ci-pip-tools.yml index 6a6d114..d5d6426 100644 --- a/.github/workflows/ci-pip-tools.yml +++ b/.github/workflows/ci-pip-tools.yml @@ -31,7 +31,7 @@ jobs: - name: Install project dependencies working-directory: my_project - run: pip install -r dev-requirements.txt + run: pip install .[dev] - name: Run tests working-directory: my_project From ff5de21d205464d2f4caad2d1ce3dc0fcda6b349 Mon Sep 17 00:00:00 2001 From: Alex Dewar Date: Wed, 29 May 2024 10:49:53 +0100 Subject: [PATCH 3/3] Reapply "Use importlib to find package version" This reverts commit 99c9f6d53e0bf50e76d3e79c8989236a2eff728d. --- .../{{ cookiecutter.project_slug }}/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/__init__.py b/{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/__init__.py index a5a85d1..af3e610 100644 --- a/{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/__init__.py +++ b/{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/__init__.py @@ -1,3 +1,5 @@ """The main module for {{ cookiecutter.project_name }}.""" -__version__ = "0.1.0" +from importlib.metadata import version + +__version__ = version(__name__)