cellml / cellml-specification

CellML Specification
0 stars 8 forks source link

Fix our support for hoverxref #281

Closed agarny closed 4 years ago

agarny commented 4 years ago

Right now, if you do make html, you get the following:

sphinx-build -b html -d build/doctrees   src build/html
Running Sphinx v3.0.0
making output directory... done

Exception occurred:
  File "/Users/Alan/virtualenv/cellml-specification/lib/python3.7/site-packages/hoverxref/extension.py", line 198, in setup_sphinx_tabs
    for listener_id, function in app.events.listeners.get('html-page-context').items():
AttributeError: 'list' object has no attribute 'items'
The full traceback has been saved in /var/folders/k8/gmbwgb910z52mrztjsdwjpbh0000gn/T/sphinx-err-v2lr0bjq.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.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [html] Error 2

Similarly, for make latexpdf, we get:

sphinx-build -b latex -d build/doctrees   src build/latex
Running Sphinx v3.0.0

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/Users/Alan/virtualenv/cellml-specification/lib/python3.7/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/Users/Alan/virtualenv/cellml-specification/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 81, in execfile_
    exec(code, _globals)
  File "/Users/Alan/Work/Programming/cellml-specification/src/conf.py", line 61, in <module>
    manage_index('in')
  File "/Users/Alan/Work/Programming/cellml-specification/src/conf.py", line 36, in manage_index
    os.rename(os.path.abspath(files[0]), os.path.abspath(files[1]))
FileNotFoundError: [Errno 2] No such file or directory: '/Users/Alan/Work/Programming/cellml-specification/src/normative_only_index.rst' -> '/Users/Alan/Work/Programming/cellml-specification/src/index.rst'

make: *** [latexpdf] Error 2
MichaelClerx commented 4 years ago

Works on my machine (Running Sphinx v1.8.4)

MichaelClerx commented 4 years ago

The PDF is a bit magic at the moment anyway? I have no idea how to build one without the informative stuff in it. I don't think this should block the release, as long as @hsorby or @nickerso can render and submit a PDF somehow

agarny commented 4 years ago

So, a Sphinx issue (as I think @hsorby and I agreed at some point). Still annoying though as I am using virtualenv on macOS and it relies on Sphinx 3.0.0.

kerimoyle commented 4 years ago

Yeah, this is informative/html stuff. I suspect we will need to pin the versions in the requirements file, as people are using all kinds of different configs at the moment ...

kerimoyle commented 4 years ago

Since it's a virtualenv you should be able to make it anything you want??

agarny commented 4 years ago

The PDF is a bit magic at the moment anyway? I have no idea how to build one without the informative stuff in it. I don't think this should block the release, as long as @hsorby or @nickerso can render and submit a PDF somehow

From the README file, you need to export CELLML_SPEC_BUILD=Normative.

agarny commented 4 years ago

However, our build script needs updating since we should only be able to build two things:

agarny commented 4 years ago

Since it's a virtualenv you should be able to make it anything you want??

Sure, it's just that I go with the default settings, so to speak.

MichaelClerx commented 4 years ago

Seems to be tested on sphinx 3 https://github.com/readthedocs/sphinx-hoverxref/blob/master/tox.ini

MichaelClerx commented 4 years ago

You could file a bug here @agarny https://github.com/readthedocs/sphinx-hoverxref/issues Does look like something they're expecting to be a dict is now a list, so something to be debugged from their side?

MichaelClerx commented 4 years ago

I'm removing this from the project for now as it's not required that we fix this today

agarny commented 4 years ago

Ok, I have replaced my copy of Sphinx 3.0.0 with that of 2.4.0, and indeed it's all working fine. I have also created an issue on the sphinx-hoverxref repo.

agarny commented 4 years ago

This was fixed through the release of sphinx-hoverxref 0.3b1.