-
Notifications
You must be signed in to change notification settings - Fork 55
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
Initial readthedocs config #339
Initial readthedocs config #339
Conversation
c0b5f30
to
11eb951
Compare
docs/akkudoktoreos/serverapi.md
Outdated
@@ -3,5 +3,5 @@ | |||
# Server API | |||
|
|||
```{eval-sh} | |||
./scripts/generate_openapi_md.py | ./scripts/extract_markdown.py --input-stdin --start-line "**Version**:" | |||
python ${READTHEDOCS_REPOSITORY_PATH:-.}/scripts/generate_openapi_md.py | python ${READTHEDOCS_REPOSITORY_PATH:-.}/scripts/extract_markdown.py --input-stdin --start-line "**Version**:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a local build this will use the platform python and not the one from .venv. Did you try without python? Every script has a shebang and is executable. Doesn't this work on ReadTheDocs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to add python because readthedocs (also the execution path there is in the docs dir). I just realized when you pointed out the shebang, that I think it won't work on windows (i think the path there is .venv/Scripts/xyz).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the path is probably why the shebang doesn't work on readthedocs (execution in .../docs so it doesn't have the .venv/xyz there). But I would probably change the shebang to just use python as there is a difference depending on platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change the shebang, instead cd to ${READTHEDOCS_REPOSITORY_PATH}/.. when on ReadTheDocs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python
won't work in my Python Windows installation at work. There I would have to use py
or px.exe
. Shebangs anyway do not work on Windows, except #!/usr/bin/python
which is somehow handled by the Windows Python installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try how to make it work. I think the venv for readthedocs is also in a different dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added #341 to avoid problems with ReadTheDocs (and Windows). You may use as a base for your change.
5fa2d85
to
8996d76
Compare
Makefile
Outdated
@@ -53,7 +53,9 @@ dist: pip | |||
|
|||
# Target to generate HTML documentation | |||
docs: pip-dev | |||
.venv/bin/sphinx-build -M html docs build/docs | |||
. .venv/bin/activate; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of activating the environment you may just make install
a dependency.
* Add links to documentation. * Drop unused file class_soc_calc.
8996d76
to
66686b1
Compare
10acc70
into
Akkudoktor-EOS:feature/config-overhaul
See example project at https://test-eos.readthedocs.io/en/latest/