readthedoc from pyproject.toml
See original GitHub issueHi. Thank you for this great " Hypermodern Python" series.
With setup like this:
# pyproject.toml
...
[tool.poetry.dependencies]
# project deps
...
python = "<3.8,>=3.7"
# dev deps
black = { version = "^19.10b0", optional = true }
coverage = {version = "^5.1", optional = true }
...
sphinx-rtd-theme = { version = "^0.4.3", optional = true }
toml = { version = "^0.10.0", optional = true }
typeguard = { version = "^2.7.1", optional = true }
[tool.poetry.extras]
dev = ["black", "coverage", ... "toml", "typeguard"]
docs = ["m2r", "sphinx", "sphinx-autodoc-typehints", "sphinx-rtd-theme", "toml"]
# readthedocs.yml
version: 2
sphinx:
configuration: docs/conf.py
python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
we can
- read
pyproject.toml
fromdocs/conf.py
for metadata - use
pyproject.toml
“as is” without additionaldocs/requirements.txt
file
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
guidelines/pyproject.toml at main · readthedocs ... - GitHub
Style, brand, and development guidelines. Contribute to readthedocs/guidelines development by creating an account on GitHub. ... guidelines/pyproject.toml.
Read more >Read the Docs tutorial
pyproject.toml. Python project metadata that makes it installable. Useful for automatic documentation generation from sources. lumache.py.
Read more >readthedocs-custom-steps - PyPI
.readthedocs.yml version: 2 mkdocs: configuration: "docs/mkdocs.yml" python: version: "3.7" install: ... pyproject.toml .readthedocs-custom-steps.yml.
Read more >The pyproject.toml config file — Flit 3.8.0 documentation
ini file to pyproject.toml . Build system section . This tells tools like pip to build your project with flit. It's a...
Read more >Sphinx Documentation Integration - Maturin User Guide
With maturin, first you need to make sure you have added a pyproject.toml and ... https://docs.readthedocs.io/en/stable/config-file/v2.html#supported- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Reading the package metadata in
docs/conf.py
is a great idea! 🚀As I said earlier, take a look at importlib.metadata. It allows you to read the package metadata directly from your installed package, the way every other packaging tool sees it, using only the standard library, without any need for parsing.
To use it, you also need to configure Read the Docs to use Python 3.8 via
.readthedocs.yml
.I was really hoping I would be wrong 😄But the deps are not pinned. Direct dependencies are constrained to major versions, as specified in pyproject.toml. Indirect dependencies (“subdependencies”) are constrained by whatever depends on them, if at all. None of the dependencies are locked to a specific version.
Took me a while to find the right pip invocation in the log file, so I pasted it below:
pip output
https://github.com/IaroslavR/multiconsumers-queue/blob/master/docs/conf.py