-
Notifications
You must be signed in to change notification settings - Fork 2
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
sphinx-rtd-theme should be a dev-dependency #8
Comments
Hey @TomasBeuzen, I am sure you are super busy with school starting... but wondering if you had any ideas on fixes? I am developing this Python package using poetry. I am trying to publish to readthedocs. When I include my desired sphinx theme as a dependency the build works. But this is not desired, as when the user pip installs the package it downloads packages that are not really required. # pyproject.toml
[tool.poetry.dependencies]
python = "^3.7"
pandas = "^1.1.1"
faker = "^4.1.2"
sphinx-rtd-theme = "^0.5.0" # should be a dev requirement, but for readthedocs to build must by a dependency When I set up correctly, for some reason the build fails (not sure if this link will work for you, but it is too failed build. [tool.poetry.dependencies]
python = "^3.7"
pandas = "^1.1.1"
faker = "^4.1.2"
[tool.poetry.dev-dependencies]
pytest = "^6.0.1"
black = {version = "^20.8b1", allow-prereleases = true}
sphinx = "^3.2.1"
sphinxcontrib-napoleon = "^0.7"
sphinx-rtd-theme = "^0.5.0" # should be a dev requirement, but for readthedocs to build must by a dependency
pytest-cov = "^2.10.1" I have the . # .readthedocs.yml
# https://github.com/UBC-MDS/cookiecutter-ubc-mds/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/.readthedocs.yml
build:
image: latest
python:
version: 3.7
pip_install: true
extra_requirements:
- docs Similar issues on GitHub include: |
@SamEdwardes - just letting you know I've seen this but don't have any ideas off the top of my head. I'll take a look at this if I get a chance next week. As an aside... I must admit I'm not a huge fan of RTD anymore, I mostly use Jupyter Book now and am interested in checking out https://docusaurus.io/en/ (both of which I plan on documenting in https://py-pkgs.org/) |
Thanks for the feedback Tom. I will check out those other alternatives as well. I am open to using sites other than RTD. |
Just in case it can help anyone in the future (maybe @TomasBeuzen), I found a hacky way to work around this:
This approach works, and is now low effort because it is automated. But it was tricky to set up. |
To make readthedocs work I had to make
sphinx-rtd-theme
a dependency.pydatafaker/pyproject.toml
Line 12 in 74aa03d
It is not actually required, but for some reason the docs did not build when I moved it to:
It would be ideal to find a way to make the docs build with
sphinx-rtd-theme = "^0.5.0"
in[tool.poetry.dev-dependencies]
.Error message from readthedocs:
The text was updated successfully, but these errors were encountered: