OpenFreeEnergy / openfe

The Open Free Energy toolkit
https://docs.openfree.energy
MIT License
133 stars 17 forks source link

Docs are not building #912

Open mikemhenry opened 1 month ago

mikemhenry commented 1 month ago
Running Sphinx v6.2.1
making output directory... done

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/site-packages/sphinx/cmd/build.py", line 280, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/site-packages/sphinx/application.py", line 268, in __init__
    self._init_builder()
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/site-packages/sphinx/application.py", line 340, in _init_builder
    self.builder.init()
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 253, in init
    self.init_templates()
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 304, in init_templates
    self.theme = theme_factory.create(themename)
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/site-packages/sphinx/theming.py", line 230, in create
    return Theme(name, self.themes[name], factory=self)
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/site-packages/sphinx/theming.py", line 67, in __init__
    extract_zip(theme_path, self.themedir)
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/site-packages/sphinx/theming.py", line 39, in extract_zip
    with ZipFile(filename) as archive:
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/zipfile.py", line 1253, in __init__
    self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/site-packages/ofe_sphinx_theme/theme/ofe_sphinx_theme'

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/zipfile.py", line 1253, in __init__
    self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/docs/checkouts/readthedocs.org/user_builds/openfe/conda/910/lib/python3.10/site-packages/ofe_sphinx_theme/theme/ofe_sphinx_theme'
The full traceback has been saved in /tmp/sphinx-err-_shigaoh.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
mikemhenry commented 1 month ago

Okay so the issue has to do with our versioningit integration. I am able to reproduce this locally and using older theme versions things are fine, but post adding versioningit we get this mess:

/home/mmh/micromamba/envs/openfe-docs/lib/python3.10/site-packages/ofe_sphinx_theme
├── __init__.py
├── __pycache__
│   └── __init__.cpython-310.pyc
├── py.typed
└── tests
    ├── __init__.py
    ├── __pycache__
    │   ├── __init__.cpython-310.pyc
    │   └── test_ofe_sphinx_theme.cpython-310.pyc
    └── test_ofe_sphinx_theme.py
/home/mmh/micromamba/envs/openfe-docs/lib/python3.10/site-packages/ofe_sphinx_theme-0.0.0+30.g35b9246.dist-info
├── direct_url.json
├── entry_points.txt
├── INSTALLER
├── LICENSE
├── METADATA
├── RECORD
├── REQUESTED
├── top_level.txt
└── WHEEL

which is missing theme/ofe_sphinx_theme

I am going to add a CI check in our ofe-sphinx-theme repo that tries build our docs with the theme, so we can catch regressions in that repo's CI without having to run separate test.

mikemhenry commented 1 month ago

So far this is "fixed" by pinning our theme to an older commit before the versioningit integration, but I will keep this issue open until we fix it the correct way.