diff --git a/docs/contributing.rst b/docs/contributing.rst index 715c49830..e1decc0f2 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -26,42 +26,32 @@ Your PR should conform with the following rules: Installing Dependencies ----------------------- -**Sphinx-Needs** requires only -`Poetry `__ to be installed as a system -dependency, the rest of the dependencies are 'bootstrapped' and -installed in an isolated environment by Poetry. +To develop **Sphinx-Needs** it can be installed, with development extras, into an existing Python environment using ``pip``: -1. `Install Poetry `__ +.. code-block:: bash -2. Install project dependencies + pip install sphinx-needs[test,benchmark,docs] - .. code-block:: bash +or using `Poetry `__ to install the dependencies into an isolated environment: - poetry install - -3. `Install Pre-Commit `__ +1. `Install Poetry `__ -4. Install the Pre-Commit hooks +2. Install project dependencies .. code-block:: bash - pre-commit install - -5. For running tests, install the dependencies of our official documentation: + poetry install --all-extras - .. code-block:: bash +To run the formatting and linting suite, pre-commit is used: - pip install -r docs/requirements.txt +1. `Install Pre-Commit `__ +2. Install the Pre-Commit hooks -List make targets ------------------ - -**Sphinx-Needs** uses ``make`` to invoke most development related actions. + .. code-block:: bash -Use ``make list`` to get a list of available targets. + pre-commit install -.. program-output:: make --no-print-directory --directory ../ list Build docs ---------- @@ -293,6 +283,14 @@ See the Poetry documentation for a list of commands. In order to run custom commands inside the isolated environment, they should be prefixed with ``poetry run`` (ie. ``poetry run ``). +List make targets +----------------- + +**Sphinx-Needs** uses ``make`` to invoke most development related actions. + +Use ``make list`` to get a list of available targets. + +.. program-output:: make --no-print-directory --directory ../ list Publishing a new release ------------------------ diff --git a/pyproject.toml b/pyproject.toml index 2ac7d4700..e1a138ca8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ packages = [ {include = "sphinx_needs"} ] -# [package.dependencies] +# [project.dependencies] [tool.poetry.dependencies] python = ">=3.8,<4" sphinx = ">=5.0,<8" @@ -40,7 +40,7 @@ requests = "^2.25.1" # external_links jsonschema = ">=3.2.0" # needsimport schema validation sphinx-data-viewer = "^0.1.1" # needservice debug output -# [package.extras.test] +# [project.optional-dependencies.test] pytest = { version = "^7", optional = true } lxml = { version = "^4.6.5", optional = true } requests-mock = { version = ">=1.9.3", optional = true } @@ -49,14 +49,14 @@ sphinxcontrib-plantuml = { version = "^0", optional = true } syrupy = { version = ">=3,<5", optional = true } pytest-xprocess = { version = "^0.22.2", optional = true } -# [package.extras.test-parallel] +# [project.optional-dependencies.test-parallel] pytest-xdist = { version = "*", optional = true } -# [package.extras.benchmark] +# [project.optional-dependencies.benchmark] pytest-benchmark = { version = "^4.0.0", optional = true } memray = { version = "^1.3.1", optional = true } -# [package.extras.docs] +# [project.optional-dependencies.docs] sphinx-copybutton = { version="^0.5", optional = true } sphinxcontrib-programoutput = { version="^0.17", optional = true } sphinx-design = { version="^0.5", optional = true }