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

update Sphinx config #659

Closed
prjemian opened this issue May 13, 2019 · 14 comments · Fixed by #718
Closed

update Sphinx config #659

prjemian opened this issue May 13, 2019 · 14 comments · Fixed by #718
Assignees
Milestone

Comments

@prjemian
Copy link
Contributor

Sphinx has changed and the config needs to be update again. travis-ci reports this:

WARNING: Support for evaluating Python 2 syntax is deprecated and will be removed in Sphinx 4.0. Convert /home/travis/build/nexusformat/definitions/build/manual/source/conf.py to Python 3 syntax.
making output directory... done
WARNING: Unknown configure key: latex_elements['preamble_text']. ignored.

and still succeeds

@prjemian prjemian self-assigned this May 13, 2019
@prjemian prjemian added the task label May 13, 2019
@prjemian prjemian modified the milestones: NXDL 2019.3, later May 13, 2019
@prjemian
Copy link
Contributor Author

This can wait until #663 is successful. Otherwise, our Sphinx conf.py should match the version on our jenkins build server.

@prjemian prjemian modified the milestones: later, NXDL 2019.10 May 20, 2019
@prjemian
Copy link
Contributor Author

Does not need to wait on #663 (or PR #702)

@prjemian
Copy link
Contributor Author

I'm working with these versions:

(base) mintadmin@mint-vm:~/.../eclipse/NeXus$ conda list sphinx
# packages in environment at /home/mintadmin/Apps/anaconda:
#
# Name                    Version                   Build  Channel
sphinx                    2.1.0                      py_0  
sphinx-bootstrap-theme    0.7.1                    pypi_0    pypi
sphinx-multibuild         1.2.0                    pypi_0    pypi
sphinx_rtd_theme          0.4.3                      py_0  
sphinxcontrib             1.0                      py37_1  
sphinxcontrib-applehelp   1.0.1                      py_0  
sphinxcontrib-devhelp     1.0.1                      py_0  
sphinxcontrib-htmlhelp    1.0.2                      py_0  
sphinxcontrib-jsmath      1.0.1                      py_0  
sphinxcontrib-qthelp      1.0.2                      py_0  
sphinxcontrib-serializinghtml 1.1.3                      py_0  
sphinxcontrib-websupport  1.1.2                      py_0  

@prjemian
Copy link
Contributor Author

Current Sphinx version: 2.3.1

@prjemian
Copy link
Contributor Author

Performing an update through conda.

(base) mintadmin@mint-vm:~/.../eclipse/NeXus$ conda update sphinx
Collecting package metadata (current_repodata.json): done
Solving environment: \ 
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - aps-anl-tag/noarch::spec2nexus==2021.1.7=h39e3cac_0
  - nexpy/linux-64::nexpy==0.11.0=py37_0
  - defaults/linux-64::anaconda==custom=py37_1
  - defaults/linux-64::_anaconda_depends==2019.03=py37_0
  - nexpy/linux-64::nexusformat==0.4.20=py37_0
done

## Package Plan ##

  environment location: /home/mintadmin/Apps/anaconda

  added / updated specs:
    - sphinx


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    jedi-0.15.2                |           py37_0         743 KB
    numpy-base-1.18.1          |   py37hde5b4d6_1         4.2 MB
    sphinx-2.3.1               |             py_0         1.1 MB
    spyder-3.3.6               |           py37_0         2.2 MB
    spyder-kernels-0.5.2       |           py37_0          71 KB
    ------------------------------------------------------------
                                           Total:         8.2 MB

The following NEW packages will be INSTALLED:

  h5py               pkgs/main/linux-64::h5py-2.9.0-py37h7918eee_0

The following packages will be UPDATED:

  jedi                                        0.14.1-py37_0 --> 0.15.2-py37_0
  numpy-base                          1.18.1-py37hde5b4d6_0 --> 1.18.1-py37hde5b4d6_1
  sphinx                                         2.1.0-py_0 --> 2.3.1-py_0

The following packages will be DOWNGRADED:

  spyder                                       4.0.1-py37_0 --> 3.3.6-py37_0
  spyder-kernels                               1.8.1-py37_0 --> 0.5.2-py37_0

@prjemian
Copy link
Contributor Author

@FreddieAkeroyd : Take note that sphinx 2.3 (at least) will now be made a requirement. Can you install that on the Jenkins server?

@prjemian
Copy link
Contributor Author

prjemian commented Jan 23, 2020

Trying to build the PDF with make latexpdf and stumbling on this error:

LaTeX Warning: Hyper reference `nxdl-types:nx-length' on page 274 undefined on 
input line 23962.


LaTeX Warning: Hyper reference `nxdl-types:nx-char' on page 274 undefined on in
put line 23969.


! LaTeX Error: Too deeply nested.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.23970 \begin{quote}
                     
?

which comes back to #428 which had not resolution. Maybe today, there is a solution.

There is, in the Sphinx documentation: https://www.sphinx-doc.org/en/1.8/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder

One can pass to latexmk options via the LATEXMKOPTS Makefile variable.
...
To pass options directly to the (pdf|xe|lua)latex executable, use variable LATEXOPTS.

make latexpdf LATEXOPTS="--interaction=nonstopmode"

Try to add to the Makefile.

@prjemian
Copy link
Contributor Author

Nuts! Same error:

Underfull \hbox (badness 10000) in paragraph at lines 23541--23542
[]\T1/ptm/b/n/10 attenuator_transmission\T1/ptm/m/n/10 : (op-tional) [][]\T1/pt
m/m/it/10 NX_NUMBER[][]
[270] [271] [272] [273]

! LaTeX Error: Too deeply nested.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.23970 \begin{quote}

@prjemian
Copy link
Contributor Author

This command line works:

make latexpdf LATEXOPTS="--interaction=nonstopmode"

like this:

(base) mintadmin@mint-vm:~/.../build/manual$ make latexpdf LATEXOPTS="--interaction=nonstopmode"
Running Sphinx v2.3.1
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
processing nexus.tex... index user_manual introduction preface motivations introduction-napi design rules datarules fileformat applying-nexus strategies validation faq examples/index examples/code_native examples/h5py/index examples/h5py/writer_1_3 examples/h5py/writer_2_1 examples/matlab/index examples/lrmecs/index examples/epics/index examples/code_napi ref_doc defs_intro nxdl nxdl_desc nxdl-types classes/index classes/base_classes/index classes/base_classes/NXaperture classes/base_classes/NXattenuator classes/base_classes/NXbeam classes/base_classes/NXbeam_stop classes/base_classes/NXbending_magnet classes/base_classes/NXcapillary classes/base_classes/NXcite classes/base_classes/NXcollection classes/base_classes/NXcollimator classes/base_classes/NXcrystal classes/base_classes/NXcylindrical_geometry classes/base_classes/NXdata classes/base_classes/NXdetector classes/base_classes/NXdetector_group classes/base_classes/NXdetector_module classes/base_classes/NXdisk_chopper classes/base_classes/NXentry classes/base_classes/NXenvironment classes/base_classes/NXevent_data classes/base_classes/NXfermi_chopper classes/base_classes/NXfilter classes/base_classes/NXflipper classes/base_classes/NXfresnel_zone_plate classes/base_classes/NXgeometry classes/base_classes/NXgrating classes/base_classes/NXguide classes/base_classes/NXinsertion_device classes/base_classes/NXinstrument classes/base_classes/NXlog classes/base_classes/NXmirror classes/base_classes/NXmoderator classes/base_classes/NXmonitor classes/base_classes/NXmonochromator classes/base_classes/NXnote classes/base_classes/NXobject classes/base_classes/NXoff_geometry classes/base_classes/NXorientation classes/base_classes/NXparameters classes/base_classes/NXpdb classes/base_classes/NXpinhole classes/base_classes/NXpolarizer classes/base_classes/NXpositioner classes/base_classes/NXprocess classes/base_classes/NXreflections classes/base_classes/NXroot classes/base_classes/NXsample classes/base_classes/NXsample_component classes/base_classes/NXsensor classes/base_classes/NXshape classes/base_classes/NXslit classes/base_classes/NXsource classes/base_classes/NXsubentry classes/base_classes/NXtransformations classes/base_classes/NXtranslation classes/base_classes/NXuser classes/base_classes/NXvelocity_selector classes/base_classes/NXxraylens classes/applications/index classes/applications/NXarchive classes/applications/NXarpes classes/applications/NXcanSAS classes/applications/NXdirecttof classes/applications/NXfluo classes/applications/NXindirecttof classes/applications/NXiqproc classes/applications/NXlauetof classes/applications/NXmonopd classes/applications/NXmx classes/applications/NXrefscan classes/applications/NXreftof classes/applications/NXsas classes/applications/NXsastof classes/applications/NXscan classes/applications/NXspe classes/applications/NXsqom classes/applications/NXstxm classes/applications/NXtas classes/applications/NXtofnpd classes/applications/NXtofraw classes/applications/NXtofsingle classes/applications/NXtomo classes/applications/NXtomophase classes/applications/NXtomoproc classes/applications/NXxas classes/applications/NXxasproc classes/applications/NXxbase classes/applications/NXxeuler classes/applications/NXxkappa classes/applications/NXxlaue classes/applications/NXxlaueplate classes/applications/NXxnb classes/applications/NXxrot classes/contributed_definitions/index classes/contributed_definitions/NXcontainer classes/contributed_definitions/NXcsg classes/contributed_definitions/NXcxi_ptycho classes/contributed_definitions/NXelectrostatic_kicker classes/contributed_definitions/NXmagnetic_kicker classes/contributed_definitions/NXquadric classes/contributed_definitions/NXquadrupole_magnet classes/contributed_definitions/NXseparator classes/contributed_definitions/NXsnsevent classes/contributed_definitions/NXsnshisto classes/contributed_definitions/NXsolenoid_magnet classes/contributed_definitions/NXsolid_geometry classes/contributed_definitions/NXspecdata classes/contributed_definitions/NXspin_rotator napi napi-c napi-f77 napi-f90 napi-java napi-python napi-idl community niac mailinglist github issues installation utilities history docs_about authorgroup colophon revhistory copyright 
resolving references...
done
writing... done
copying images... [100%] classes/contributed_definitions/container/ComplexContainerBeampath.png                                             
copying TeX support files... copying TeX support files...
done
build succeeded.

The LaTeX files are in build/latex.
Run 'make' in that directory to run these through (pdf)latex
(use `make latexpdf' here to do that automatically).
make[1]: Entering directory '/home/mintadmin/Documents/eclipse/NeXus/definitions/build/manual/build/latex'
latexmk -pdf -dvi- -ps-  'nexus.tex'
Latexmk: This is Latexmk, John Collins, 1 January 2015, version: 4.41.
Latexmk: All targets (nexus.pdf) are up-to-date
make[1]: Leaving directory '/home/mintadmin/Documents/eclipse/NeXus/definitions/build/manual/build/latex'

@prjemian
Copy link
Contributor Author

Still at an impasse using trying to get the LATEXOPTS into the Sphinx Makefile.

To build the PDF, need to use this command (from the manual directory):

make latexpdf LATEXOPTS="--interaction=nonstopmode"

prjemian added a commit that referenced this issue Jan 23, 2020
@prjemian
Copy link
Contributor Author

Travis fails on py27 build:

Running Sphinx v1.8.5

Sphinx version error:

This project needs at least Sphinx v2.3 and therefore cannot be built with this version.

Py2.7 is now EOL; we can drop it from the test suite.

prjemian added a commit that referenced this issue Jan 23, 2020
@FreddieAkeroyd
Copy link
Member

@prjemian Jenkins Sphinx is now 2.3.1

@prjemian
Copy link
Contributor Author

prjemian commented Jan 23, 2020 via email

@prjemian
Copy link
Contributor Author

prjemian commented Jan 23, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants