Skip to content

Commit

Permalink
docs: Move to poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
zjkmxy committed May 27, 2023
1 parent 4dd0c50 commit fbc5359
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --force-reinstall -e .[dev]",
"postCreateCommand": "pip3 install --force-reinstall -e .[dev,docs]",
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
9 changes: 6 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ sphinx:
formats: all

build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.11"

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
6 changes: 0 additions & 6 deletions docs/requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions docs/src/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ For development, `poetry <https://python-poetry.org/>`_ is recommended. You need

And to install the development environment::

$ poetry install --all-extras --with docs
$ poetry install --all-extras

To setup a traditional python3 virtual environment with editable installation:

.. code-block:: bash
python3 -m venv venv
. venv/bin/activate
pip3 install -e ".[dev]"
pip3 install -e ".[dev,docs]"
Run all tests:

Expand Down
53 changes: 27 additions & 26 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,14 @@ pytest = { version = "^7.1.2", optional = true }
pytest-cov = { version = "^3.0.0", optional = true }
flake8 = { version = "^4.0.1", optional = true }

# Extra dependencies [docs]
Sphinx = { version = "^6.2.1", optional = true }
sphinx-rtd-theme = { version = "^1.2.1", optional = true }
sphinx-autodoc-typehints = { version = "^1.23.0", optional = true }

[tool.poetry.extras]
dev = ["pytest", "pytest-cov", "flake8"]

[tool.poetry.group.docs]
optional = true

[tool.poetry.group.docs.dependencies]
Sphinx = "^6.2.1"
sphinx-rtd-theme = "^1.2.1"
sphinx-autodoc-typehints = "^1.23.0"
docs = ["Sphinx", "sphinx-rtd-theme", "sphinx-autodoc-typehints"]

[tool.poetry.scripts]
pyndnsec = "ndn.bin.sec:main"
Expand Down

0 comments on commit fbc5359

Please sign in to comment.