diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 07c608a..7b2aa92 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -101,7 +101,7 @@ jobs: # Install the project (we need some of the tools installed here for liniting etc) - name: Install the project - run: poetry install --no-interaction --extras "docs dev" + run: poetry install --no-interaction # Enforce code formating standards # note: --config is needed to prevent ruff from using a version elsewhere in the project. diff --git a/.readthedocs.yml b/.readthedocs.yml index e8a9b82..6330175 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -13,7 +13,7 @@ build: - pip install poetry post_install: # Install project and dependencies with 'docs' dependency group. - - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs + - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --only main,docs # Generate API documentation, etc. (if needed) - make -f docs/Makefile content sphinx: diff --git a/README.md b/README.md index b3dce0a..45a735f 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ and answer the questions: ### Install the new project Create and activate a new virtual environment (**use Python version >= 3.11**) using your favourite method (if you don't know how to use Python environments, we advise you to go learn about them now) and install the project by running the following in the new repo directory: ``` console -poetry install --all-extras +poetry install ``` ### Configure the services you need diff --git a/docs/content/notes_for_developers.md b/docs/content/notes_for_developers.md index d529f9b..ef18c7f 100644 --- a/docs/content/notes_for_developers.md +++ b/docs/content/notes_for_developers.md @@ -71,10 +71,10 @@ Poetry is used to manage this project ([see here for an introduction](https://py ## Installing Development Dependencies -Once the code is locally installed, development dependencies should be installed by moving to the project's root directory and executing the following: +Once the code is locally installed, dependencies should be installed by moving to the project's root directory and executing the following: ``` console -$ poetry install --all-extras +$ poetry install ``` In what follows, it will be assumed that this has been done. diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 527580f..16990db 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -97,7 +97,7 @@ def install(venv_type: str) -> None: String specifying how the virtual environment is being supported """ if venv_type in ["venv", "poetry", "pyenv"]: - result = subprocess.run(["poetry", "install", "--all-extras"]) + result = subprocess.run(["poetry", "install", "--no-interaction"]) elif venv_type == "none": pass else: diff --git a/poetry.lock b/poetry.lock index 095926b..b75dc4f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4,7 +4,7 @@ name = "alabaster" version = "0.7.16" description = "A light, configurable Sphinx theme" -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "alabaster-0.7.16-py3-none-any.whl", hash = "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92"}, @@ -34,7 +34,7 @@ test = ["dateparser (==1.*)", "pre-commit", "pytest", "pytest-cov", "pytest-mock name = "babel" version = "2.15.0" description = "Internationalization utilities" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "Babel-2.15.0-py3-none-any.whl", hash = "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb"}, @@ -62,7 +62,7 @@ chardet = ">=3.0.2" name = "black" version = "24.4.2" description = "The uncompromising code formatter." -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "black-24.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd1b5a14e417189db4c7b64a6540f31730713d173f0b63e55fabd52d61d8fdce"}, @@ -117,7 +117,7 @@ files = [ name = "cfgv" version = "3.4.0" description = "Validate configuration and produce human readable error messages." -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9"}, @@ -284,7 +284,7 @@ rich = "*" name = "distlib" version = "0.3.8" description = "Distribution utilities" -optional = true +optional = false python-versions = "*" files = [ {file = "distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784"}, @@ -295,7 +295,7 @@ files = [ name = "docutils" version = "0.18.1" description = "Docutils -- Python Documentation Utilities" -optional = true +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ {file = "docutils-0.18.1-py2.py3-none-any.whl", hash = "sha256:23010f129180089fbcd3bc08cfefccb3b890b0050e1ca00c867036e9d161b98c"}, @@ -306,7 +306,7 @@ files = [ name = "filelock" version = "3.15.4" description = "A platform independent file lock." -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "filelock-3.15.4-py3-none-any.whl", hash = "sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7"}, @@ -322,7 +322,7 @@ typing = ["typing-extensions (>=4.8)"] name = "identify" version = "2.5.36" description = "File identification library for Python" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "identify-2.5.36-py2.py3-none-any.whl", hash = "sha256:37d93f380f4de590500d9dba7db359d0d3da95ffe7f9de1753faa159e71e7dfa"}, @@ -347,7 +347,7 @@ files = [ name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" -optional = true +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, @@ -358,7 +358,7 @@ files = [ name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, @@ -479,7 +479,7 @@ files = [ name = "mdit-py-plugins" version = "0.3.5" description = "Collection of plugins for markdown-it-py" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "mdit-py-plugins-0.3.5.tar.gz", hash = "sha256:eee0adc7195e5827e17e02d2a258a2ba159944a0748f59c5099a4a27f78fcf6a"}, @@ -509,7 +509,7 @@ files = [ name = "mypy" version = "1.10.1" description = "Optional static typing for Python" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "mypy-1.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e36f229acfe250dc660790840916eb49726c928e8ce10fbdf90715090fe4ae02"}, @@ -555,7 +555,7 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -optional = true +optional = false python-versions = ">=3.5" files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, @@ -566,7 +566,7 @@ files = [ name = "myst-parser" version = "1.0.0" description = "An extended [CommonMark](https://spec.commonmark.org/) compliant parser," -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "myst-parser-1.0.0.tar.gz", hash = "sha256:502845659313099542bd38a2ae62f01360e7dd4b1310f025dd014dfc0439cdae"}, @@ -592,7 +592,7 @@ testing-docutils = ["pygments", "pytest (>=7,<8)", "pytest-param-files (>=0.3.4, name = "nodeenv" version = "1.9.1" description = "Node.js virtual environment builder" -optional = true +optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, @@ -603,7 +603,7 @@ files = [ name = "packaging" version = "24.1" description = "Core utilities for Python packages" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, @@ -614,7 +614,7 @@ files = [ name = "pathspec" version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, @@ -625,7 +625,7 @@ files = [ name = "platformdirs" version = "4.2.2" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, @@ -641,7 +641,7 @@ type = ["mypy (>=1.8)"] name = "pluggy" version = "1.5.0" description = "plugin and hook calling mechanisms for python" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, @@ -656,7 +656,7 @@ testing = ["pytest", "pytest-benchmark"] name = "pre-commit" version = "3.7.1" description = "A framework for managing and maintaining multi-language pre-commit hooks." -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "pre_commit-3.7.1-py2.py3-none-any.whl", hash = "sha256:fae36fd1d7ad7d6a5a1c0b0d5adb2ed1a3bda5a21bf6c3e5372073d7a11cd4c5"}, @@ -688,7 +688,7 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pytest" version = "7.4.4" description = "pytest: simple powerful testing with Python" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, @@ -708,7 +708,7 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "pytest-cookies" version = "0.7.0" description = "The pytest plugin for your Cookiecutter templates. 🍪" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "pytest-cookies-0.7.0.tar.gz", hash = "sha256:1aaa6b4def8238d0d1709d3d773b423351bfb671c1e3438664d824e0859d6308"}, @@ -723,7 +723,7 @@ pytest = ">=3.9.0" name = "pytest-mock" version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, @@ -870,7 +870,7 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] name = "ruff" version = "0.5.0" description = "An extremely fast Python linter and code formatter, written in Rust." -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "ruff-0.5.0-py3-none-linux_armv6l.whl", hash = "sha256:ee770ea8ab38918f34e7560a597cc0a8c9a193aaa01bfbd879ef43cb06bd9c4c"}, @@ -908,7 +908,7 @@ files = [ name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -optional = true +optional = false python-versions = "*" files = [ {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, @@ -919,7 +919,7 @@ files = [ name = "sphinx" version = "6.2.1" description = "Python documentation generator" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "Sphinx-6.2.1.tar.gz", hash = "sha256:6d56a34697bb749ffa0152feafc4b19836c755d90a7c59b72bc7dfd371b9cc6b"}, @@ -953,7 +953,7 @@ test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] name = "sphinx-click" version = "4.4.0" description = "Sphinx extension that automatically documents click applications" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "sphinx-click-4.4.0.tar.gz", hash = "sha256:cc67692bd28f482c7f01531c61b64e9d2f069bfcf3d24cbbb51d4a84a749fa48"}, @@ -969,7 +969,7 @@ sphinx = ">=2.0" name = "sphinx-copybutton" version = "0.5.2" description = "Add a copy button to each of your code cells." -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "sphinx-copybutton-0.5.2.tar.gz", hash = "sha256:4cf17c82fb9646d1bc9ca92ac280813a3b605d8c421225fd9913154103ee1fbd"}, @@ -987,7 +987,7 @@ rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme", "sphinx-examples"] name = "sphinx-rtd-theme" version = "1.3.0" description = "Read the Docs theme for Sphinx" -optional = true +optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ {file = "sphinx_rtd_theme-1.3.0-py2.py3-none-any.whl", hash = "sha256:46ddef89cc2416a81ecfbeaceab1881948c014b1b6e4450b815311a89fb977b0"}, @@ -1006,7 +1006,7 @@ dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] name = "sphinxcontrib-applehelp" version = "1.0.8" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "sphinxcontrib_applehelp-1.0.8-py3-none-any.whl", hash = "sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4"}, @@ -1022,7 +1022,7 @@ test = ["pytest"] name = "sphinxcontrib-devhelp" version = "1.0.6" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents" -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "sphinxcontrib_devhelp-1.0.6-py3-none-any.whl", hash = "sha256:6485d09629944511c893fa11355bda18b742b83a2b181f9a009f7e500595c90f"}, @@ -1038,7 +1038,7 @@ test = ["pytest"] name = "sphinxcontrib-htmlhelp" version = "2.0.5" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl", hash = "sha256:393f04f112b4d2f53d93448d4bce35842f62b307ccdc549ec1585e950bc35e04"}, @@ -1054,7 +1054,7 @@ test = ["html5lib", "pytest"] name = "sphinxcontrib-jquery" version = "4.1" description = "Extension to include jQuery on newer Sphinx releases" -optional = true +optional = false python-versions = ">=2.7" files = [ {file = "sphinxcontrib-jquery-4.1.tar.gz", hash = "sha256:1620739f04e36a2c779f1a131a2dfd49b2fd07351bf1968ced074365933abc7a"}, @@ -1068,7 +1068,7 @@ Sphinx = ">=1.8" name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -optional = true +optional = false python-versions = ">=3.5" files = [ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, @@ -1082,7 +1082,7 @@ test = ["flake8", "mypy", "pytest"] name = "sphinxcontrib-qthelp" version = "1.0.7" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents" -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "sphinxcontrib_qthelp-1.0.7-py3-none-any.whl", hash = "sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182"}, @@ -1098,7 +1098,7 @@ test = ["pytest"] name = "sphinxcontrib-serializinghtml" version = "1.1.10" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)" -optional = true +optional = false python-versions = ">=3.9" files = [ {file = "sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl", hash = "sha256:326369b8df80a7d2d8d7f99aa5ac577f51ea51556ed974e7716cfd4fca3f6cb7"}, @@ -1136,7 +1136,7 @@ files = [ name = "typing-extensions" version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, @@ -1164,7 +1164,7 @@ zstd = ["zstandard (>=0.18.0)"] name = "virtualenv" version = "20.26.3" description = "Virtual Python Environment builder" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "virtualenv-20.26.3-py3-none-any.whl", hash = "sha256:8cc4a31139e796e9a7de2cd5cf2489de1217193116a8fd42328f1bd65f434589"}, @@ -1180,11 +1180,7 @@ platformdirs = ">=3.9.1,<5" docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2,!=7.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] -[extras] -dev = ["black", "mypy", "pre-commit", "pytest", "pytest-cookies", "pytest-mock", "ruff"] -docs = ["Sphinx", "myst-parser", "sphinx-click", "sphinx-copybutton", "sphinx-rtd-theme"] - [metadata] lock-version = "2.0" python-versions = " >=3.11" -content-hash = "ae8041f3656614145e1bb0b31439011346b888b7910539d2567fec3a2dfdf677" +content-hash = "0364d794a0b5916955cff029830498e1665bef0b597af1d3ccdae0def2264b31" diff --git a/pyproject.toml b/pyproject.toml index 1a3bbe0..0e9837f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,43 +13,24 @@ documentation = "https://adacs_template_python_base.readthedocs.io/en/latest/" [tool.poetry.dependencies] python = " >=3.11" -Sphinx = { version = "^6", optional = true } -sphinx-rtd-theme = { version = "^1", optional = true } -sphinx-click = { version = "^4", optional = true } -sphinx-copybutton = { version = "^0", optional = true } -myst-parser = { version = "^1", optional = true } -pytest = { version = "^7", optional = true } -pytest-mock = { version = "^3", optional = true } -pytest-cookies = { version = "^0", optional = true } -black = { version = "^24", optional = true } -ruff = { version = "^0", optional = true} -mypy = { version = "^1", optional = true } -pre-commit = { version = "^3", optional = true } -click = "^8" rich = "^13" cookiecutter = "^2" -[tool.poetry.extras] -docs = [ - "Sphinx", - "sphinx-rtd-theme", - "sphinx-click", - "sphinx-copybutton", - "myst-parser", -] -dev = [ - "pytest", - "pytest-mock", - "pytest-cookies", - "black", - "ruff", - "mypy", - "pre-commit", -] +[tool.poetry.group.docs.dependencies] +Sphinx = "^6" +sphinx-rtd-theme = "^1" +sphinx-click = "^4" +sphinx-copybutton = "^0" +myst-parser = "^1" -[tool.pytest.ini_options] -pythonpath = ["./tests", "./"] # relative to root directory -addopts = "--ignore={{cookiecutter.repo_name}}" +[tool.poetry.group.test.dependencies] +pytest = "^7" +pytest-mock = "^3" +pytest-cookies = "^0" +black = "^24" +ruff = "^0" +mypy = "^1" +pre-commit = "^3" # This configures the Poetry plugin which enables dynamic versioning via the repo tags # Note the changes that are also needed to the [build-system] config below. @@ -58,6 +39,10 @@ enable = true vcs = "git" style = "semver" +[tool.pytest.ini_options] +pythonpath = ["./tests", "./"] # relative to root directory +addopts = "--ignore={{cookiecutter.repo_name}}" + [tool.mypy] ignore_missing_imports = true mypy_path = "$MYPY_CONFIG_FILE_DIR/tests" diff --git a/tests/test_template.py b/tests/test_template.py index d46ce04..2dfc511 100644 --- a/tests/test_template.py +++ b/tests/test_template.py @@ -19,7 +19,7 @@ def bake_path(cookies, request): assert result.project_path.is_dir() assert result.exit_code == exit_code_expected assert result.exception is exception_expected - run_inside_dir("poetry install --all-extras", result.project_path) == 0 + run_inside_dir("poetry install", result.project_path) == 0 yield result.project_path diff --git a/{{cookiecutter.repo_name}}/.github/workflows/pull_request.yml b/{{cookiecutter.repo_name}}/.github/workflows/pull_request.yml index df16225..a19e9ee 100644 --- a/{{cookiecutter.repo_name}}/.github/workflows/pull_request.yml +++ b/{{cookiecutter.repo_name}}/.github/workflows/pull_request.yml @@ -85,7 +85,7 @@ jobs: # Install the project (we need some of the tools installed here for liniting etc) - name: Install the project - run: poetry install --no-interaction --extras "docs dev" + run: poetry install --no-interaction # Enforce code formating standards # note: --config is needed to prevent ruff from using a version elsewhere in the project. diff --git a/{{cookiecutter.repo_name}}/.readthedocs.yml b/{{cookiecutter.repo_name}}/.readthedocs.yml index e8a9b82..6330175 100644 --- a/{{cookiecutter.repo_name}}/.readthedocs.yml +++ b/{{cookiecutter.repo_name}}/.readthedocs.yml @@ -13,7 +13,7 @@ build: - pip install poetry post_install: # Install project and dependencies with 'docs' dependency group. - - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs + - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --only main,docs # Generate API documentation, etc. (if needed) - make -f docs/Makefile content sphinx: diff --git a/{{cookiecutter.repo_name}}/INSTRUCTIONS.template b/{{cookiecutter.repo_name}}/INSTRUCTIONS.template index 318a974..ac8c011 100644 --- a/{{cookiecutter.repo_name}}/INSTRUCTIONS.template +++ b/{{cookiecutter.repo_name}}/INSTRUCTIONS.template @@ -10,7 +10,7 @@ Use your favourite method to create and activate a Python environment for your d 2. **Install the project and all dependencies** -With your environment activated, run the following from within your new repo: `poetry install --all-extras` +With your environment activated, run the following from within your new repo: `poetry install` ***NOTE: This needs to be done before any tests can be run, documentation built, etc.*** diff --git a/{{cookiecutter.repo_name}}/docs/content/notes_for_developers.md b/{{cookiecutter.repo_name}}/docs/content/notes_for_developers.md index 5caefce..3312284 100644 --- a/{{cookiecutter.repo_name}}/docs/content/notes_for_developers.md +++ b/{{cookiecutter.repo_name}}/docs/content/notes_for_developers.md @@ -74,7 +74,7 @@ Poetry is used to manage this project ([see here for an introduction](https://py Once the code is locally installed, development dependencies should be installed by moving to the project's root directory and executing the following: ``` console -$ poetry install --all-extras +$ poetry install ``` In what follows, it will be assumed that this has been done. diff --git a/{{cookiecutter.repo_name}}/pyproject.toml b/{{cookiecutter.repo_name}}/pyproject.toml index ef5703e..4b298ff 100644 --- a/{{cookiecutter.repo_name}}/pyproject.toml +++ b/{{cookiecutter.repo_name}}/pyproject.toml @@ -13,42 +13,37 @@ documentation = "https://{{cookiecutter.rtd_project_name}}.readthedocs.io/en/lat [tool.poetry.dependencies] python = " >=3.11" -Sphinx = { version = "^6", optional = true } -sphinx-rtd-theme = { version = "^1", optional = true } -sphinx-click = { version = "^4", optional = true } -sphinx-copybutton = { version = "^0", optional = true } -myst-parser = { version = "^1", optional = true } -pytest = { version = "^7", optional = true } -pytest-mock = { version = "^3", optional = true } -pytest-cookies = { version = "^0", optional = true } -pytest-cov = { version = "^5", optional = true } -black = { version = "^24", optional = true } -ruff = { version = "^0", optional = true} -mypy = { version = "^1", optional = true } -pre-commit = { version = "^3", optional = true } - -[tool.poetry.extras] -docs = [ - "Sphinx", - "sphinx-rtd-theme", - "sphinx-click", - "sphinx-copybutton", - "myst-parser", -] -dev = [ - "pytest", - "pytest-mock", - "pytest-cookies", - "pytest-cov", - "black", - "ruff", - "mypy", - "pre-commit", -] +rich = "^13" +cookiecutter = "^2" + +[tool.poetry.group.docs.dependencies] +Sphinx = "^6" +sphinx-rtd-theme = "^1" +sphinx-click = "^4" +sphinx-copybutton = "^0" +myst-parser = "^1" + +[tool.poetry.group.dev.dependencies] +pytest = "^7" +pytest-mock = "^3" +pytest-cookies = "^0" +pytest-cov = "^5" +black = "^24" +ruff = "^0" +mypy = "^1" +pre-commit = "^3" + +# This configures the Poetry plugin which enables dynamic versioning via the repo tags +# Note the changes that are also needed to the [build-system] config below. +[tool.poetry-dynamic-versioning] +enable = true +vcs = "git" +style = "semver" [tool.pytest.ini_options] addopts = "--cov" pythonpath = "./python" # relative to root directory + # Uncomment and edit the following line to add custom markers to your tests # These can be run with the following (for example): # @@ -56,13 +51,6 @@ pythonpath = "./python" # relative to root directory # #markers = [ "marker_name: A short description of the marker" ] -# This configures the Poetry plugin which enables dynamic versioning via the repo tags -# Note the changes that are also needed to the [build-system] config below. -[tool.poetry-dynamic-versioning] -enable = true -vcs = "git" -style = "semver" - [tool.mypy] ignore_missing_imports = true mypy_path = "$MYPY_CONFIG_FILE_DIR/python"