-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readthedoc from pyproject.toml #63
Comments
That's right, but the docs dependencies won't be pinned then. Read the Docs builds your project with pip, and pip uses Poetry to build a wheel, not for installing. The wheel does not include version pins. The idea to read pyproject.toml from docs/conf.py for metadata is interesting. Do you have an example? If you install your package for building docs, you could also use Many projects use extras for development dependencies, but I'm not a fan of that. I think extras are best used for optional user-facing features. Extras force you to install the package itself, even though you don't need it for many development tasks (e.g. linting, type-checking, code formatting, other static analysis, docs building if you don't need autodoc). |
https://github.com/IaroslavR/multiconsumers-queue/blob/master/docs/conf.py |
See docs build log for the repo above https://readthedocs.org/api/v2/build/10913417.txt Looks like all deps pinned |
Reading the package metadata in 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
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
|
Yep, I see. By idea we can install it from |
Hi @cjolowicz , Thanks for creating this resource! I've learned a lot from reading your blog posts and the hypermodern-python website. I recently stumbled upon this comment describing another strategy for integrating poetry dependencies into a readthedocs build. I haven't tried it myself yet, but I think it might read the versions from poetry's lock file? Would this be a viable option? |
Hi. Thank you for this great " Hypermodern Python" series.
With setup like this:
we can
pyproject.toml
fromdocs/conf.py
for metadatapyproject.toml
"as is" without additionaldocs/requirements.txt
fileThe text was updated successfully, but these errors were encountered: