Conversation
One should especially focus on the Sphinx update (from v5 to v7), rdflib update (from v6 to v7) and the necessity to keep pydata-sphinx-theme at its current version due to too many differences in the look and feel of the docs if updated to the latest version. Also, all currently unversioned dependencies have been fixed to a version.
Avoid using the - quite outdated - ammaraskar/sphinx-action GitHub Action. It was forcefully using Python 3.8 due to using a very old version of the underlying docker image sphinx-doc/sphinx.
|
@xavierr , could you please have a look at this and see what you think? If it's a good idea, we should consider updating our other CI/CD workflows with sphinx. |
Support installing all requirements files at once (resolving that there are no sub-dependency issues).
All warnings have been removed by: - Move `!pip install` statements to a separate cell in all notebooks, making the cell "shellscript" code and add a sentence immediately before stating the same thing. - Add all files to a Sphinx `toctree` tag, specifically extending the header nav with the "More" dropdown, which includes "contribute", "tools", and "resources". - Find online and add the image for the Protégé configuration. Update the configuration to remove the primary sidebar from pages that have no section navigation. Since no warnings are produced (locally) now, the CI workflow has been updated to include the `-W` flag for sphinx-build, which treats warnings as errors during the build.
|
Updated this further to remove all Sphinx build warnings. In this way, the Note, to temporarily avoid having the documentation build fail on warnings (which are in their essence not critical), the |
This change does away with the outdated and non-maintained GitHub action ammaraskar/sphinx-action. It is using an old version of the underlying Docker image
sphinxdoc/sphinx(see also this source), which enforced everything running in Python 3.8 and not the actual Python version specified in the workflow here (Python 3.10).The new way of building the documentation has been tested locally, and the CI here also seems to work as intended, so it should be good 👍
Instead of using the GH Actions, it simply utilizes the Makefile that exists in the
sphinxfolder. So we still installpandocusingAPTand then from within the working directorysphinxwe runmake html, which will generate the documentation undersphinx/_build/html, which is the same as was done previously, i.e., the upload step does not need to change.Finally, I've updated the versions of all dependencies where possible - testing everything locally.
The only package I've kept at the current version in
pydata-sphinx-theme, as updating this to the latest version (v0.15.2 as of writing) resulted in a severe change in the look and feel of the documentation. Extra time, effort, and care should be taken when updating this package version at a later stage.Note, alsopackaginghas not been updated to v24 due to a version incompatibility with the latest version ofEMMOntoPy.Edit: Already done by @dependabot now.
To see the built documentation do either of the following:
Unpack and view the built artifact:
documentationHTMLartifact at the bottom of the "Summary" page (as of writing, this is the link to the artifact).index.htmlfile.Build the documentation locally and check it out:
git clonethis repository locally, preferably when running a virtual environment (see e.g., some documentation onvenvandvirtualenv).git checkoutthe branchcwa/fix-docs-building.pandocinstalled on you system. If you are running on Linux (natively or through WSL) this is as simple as installing it from your package manager of choice. E.g., usingAPT:sudo apt-get update && sudo apt-get install -y pandocpython sphinx/ttl_to_rst.py cd sphinx make htmlsphinx/_build/htmlfolder and open theindex.htmlfile in your browser of choice.