Skip to content
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

Merged

Conversation

Lasall
Copy link
Collaborator

@Lasall Lasall commented Jan 4, 2025

@Lasall Lasall force-pushed the dl_dev-readthedocs2 branch from c0b5f30 to 11eb951 Compare January 4, 2025 19:42
@@ -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**:"
Copy link
Collaborator

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?

Copy link
Collaborator Author

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).

Copy link
Collaborator Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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/pythonwhich is somehow handled by the Windows Python installation.

Copy link
Collaborator Author

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.

Copy link
Collaborator

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.

@Lasall Lasall force-pushed the dl_dev-readthedocs2 branch 2 times, most recently from 5fa2d85 to 8996d76 Compare January 6, 2025 11:12
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; \
Copy link
Collaborator

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.
@Lasall Lasall force-pushed the dl_dev-readthedocs2 branch from 8996d76 to 66686b1 Compare January 6, 2025 15:40
@Lasall Lasall merged commit 10acc70 into Akkudoktor-EOS:feature/config-overhaul Jan 6, 2025
2 checks passed
@Lasall Lasall deleted the dl_dev-readthedocs2 branch January 6, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants