pymzml / pymzML

pymzML - an interface between Python and mzML Mass spectrometry Files
https://pymzml.readthedocs.io/en/latest/
MIT License
162 stars 92 forks source link

errors while building html docs #117

Closed lopippo closed 5 years ago

lopippo commented 5 years ago

Greetings,

I am trying to build the html documentation and this is what I get:

Running Sphinx v1.8.4 making output directory... building [mo]: targets for 0 po files that are out of date building [html]: targets for 16 source files that are out of date updating environment: 16 added, 0 changed, 0 removed reading sources... [100%] suppl_material
/home/rusconi/devel/packaging/python-pymzml/development/pymzml/plot.py:docstring of pymzml.plot.Factory.add:6: WARNING: Unexpected indentation. /home/rusconi/devel/packaging/python-pymzml/development/pymzml/plot.py:docstring of pymzml.plot.Factory.add:15: WARNING: Unexpected indentation. WARNING: invalid signature for automethod ('getitem, add, sub, mul, truediv') WARNING: don't know which module to import for autodocumenting 'getitem, add, sub, mul, truediv' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name) looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] suppl_material
/home/rusconi/devel/packaging/python-pymzml/development/pymzml/file_interface.py:docstring of pymzml.file_interface.FileInterface.read:: WARNING: more than one target found for cross-reference 'read': pymzml.file_interface.FileInterface.read, pymzml.file_classes.standardMzml.StandardMzml.read, pymzml.file_classes.standardGzip.StandardGzip.read, pymzml.file_classes.indexedGzip.IndexedGzip.read, pymzml.utils.GSGR.GSGR.read generating indices... genindex py-modindex highlighting module code... [100%] simple_parser_v2
writing additional pages... search copying static files... WARNING: html_static_path entry '/home/rusconi/devel/packaging/python-pymzml/development/docs/source/_static' does not exist done copying extra files... done dumping search index in English (code: en) ... done dumping object inventory... done build succeeded, 6 warnings.

Could you please check the various warnings ?

Then, when building the documentation for the examples, other warnings:

/usr/bin/env python3 parse_example_scripts.py;sphinx-build -b latex -d build/doctrees source build/latex

    Formatting example scripts into rst files for the docs

../example_scripts/*.py Reading: ../example_scripts/extract_ion_chromatogram.py Reading: ../example_scripts/simple_parser_v2.py Reading: ../example_scripts/simple_parser.py Reading: ../example_scripts/plot_spectrum_with_annotation.py Reading: ../example_scripts/tic_calc.py Reading: ../example_scripts/queryOBO.py Reading: ../example_scripts/get_example_file.py Reading: ../example_scripts/plot_chromatogram.py Reading: ../example_scripts/access_run_info.py Reading: ../example_scripts/highest_peaks.py Reading: ../example_scripts/plot_spectrum.py Reading: ../example_scripts/has_peak.py Reading: ../example_scripts/get_precursors.py Reading: ../example_scripts/download_obo_database.py Reading: ../example_scripts/gzip_mzml.py Reading: ../example_scripts/multi_threading_file_compression.py Reading: ../example_scripts/deprecation_check.py Reading: ../example_scripts/polarity.py Reading: ../example_scripts/compare_spectra.py Reading: ../example_scripts/extreme_values.py Running Sphinx v1.8.4 making output directory... loading pickled environment... done building [mo]: targets for 0 po files that are out of date building [latex]: all documents updating environment: [] 0 added, 2 changed, 0 removed reading sources... [100%] quick_start
looking for now-outdated files... none found pickling environment... done checking consistency... done processing pymzML.tex...index intro quick_start modules pymzml_run pymzml_spec pymzml_utils plot file_handlers obo pymzml_regex_patterns examples index_gzip custom_fileclass example_scripts suppl_material resolving references... /home/rusconi/devel/packaging/python-pymzml/development/pymzml/file_interface.py:docstring of pymzml.file_interface.FileInterface.read:: WARNING: more than one target found for cross-reference 'read': pymzml.file_interface.FileInterface.read, pymzml.file_classes.standardMzml.StandardMzml.read, pymzml.file_classes.standardGzip.StandardGzip.read, pymzml.file_classes.indexedGzip.IndexedGzip.read, pymzml.utils.GSGR.GSGR.read ../README.rst:: WARNING: a suitable image for latex builder not found: ['image/svg+xml'] (https://travis-ci.org/pymzml/pymzML.svg?branch=master) ../README.rst:: WARNING: a suitable image for latex builder not found: ['image/svg+xml'] (https://readthedocs.org/projects/pymzml/badge/?version=latest) ../README.rst:: WARNING: a suitable image for latex builder not found: ['image/svg+xml'] (https://img.shields.io/pypi/v/pymzML.svg) ../README.rst:: WARNING: a suitable image for latex builder not found: ['image/svg+xml'] (https://ci.appveyor.com/api/projects/status/4nlw52a9qn22921d?svg=true) writing... done copying TeX support files... done build succeeded, 5 warnings.

I am too incompetenet with sphinx-related stuff to be able to help, sadly.

Thanks for publishing your software as Free Software, Filippo

MKoesters commented 5 years ago

Hi lopipo, thanks for reporting that issue. I'll have a look at this as fast as I can. What I can tell you now, is that the last warnings are there because you don't have software to convert svgs to png, which latex requires. To fix this, you can install imagemagick. However I see that this is not an optimal solution so I'll talk to the other developers if it would be a good idea to supply .PNGs instead of .SVG directly.

lopippo commented 5 years ago

MKoesters: thank you for your answer. For what I know, imagemagick is the name of a package and the actual program that does the conversion is called convert. Now, in my Debian testing box, I have a package that is called graphicsmagick-imagemagick-compat that ships /usr/bin/convert. So the convert binary should be found. Can you confirm that the binary program that performs the conversion from svg to png on-the-fly is actually the convert program ? Thank you, Filippo.

MKoesters commented 5 years ago

Yes, as far as I can see its using the convert command, see here https://www.sphinx-doc.org/en/master/usage/extensions/imgconverter.html However I noticed that I tried fixing this issue in another branch last week and did not finish it. For now, I only pushed a new conf.py with the imgconverter sphinx extension, so this should hopefully fix the last warnings. The other issues I have to postpone to the weekend or beginning of next week, since I'm quite busy with another urgent project this week, sry :)

MKoesters commented 5 years ago

I've reduced the number of warnings to 3, "fixing" the other however results in a faulty rendering. I'm also not an expert on sphinx so I'm not really sure if I'm able to fix these. Can you checkout the fix and see if this is sufficient for your needs?

Best, Manuel

MKoesters commented 5 years ago

Since the warnings are somewhat expected and the main issue of not being able to build the docu with svg images is fixed, I'm closing this issue now. If there are any further problems, don't hesitate to reopen :)