pymzml / pymzML

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

Dynamic access to internet while building the documentation #236

Closed lopippo closed 4 years ago

lopippo commented 4 years ago

Greetings, Fellow Developers,

I would like to upgrade the packaging of pymzML for Debian.

In Debian, dynamic download of files from the internet, once the package tarball has been downloaded, is not allowed.

In building the documentation, I get these errors:

WARNING: Could not fetch remote image: https://travis-ci.org/pymzml/pymzML.svg?branch=master [time data 'Fri, 05 Jun 2020 13:25:21 GMT' does not match format '%a, %d %b %Y %H:%M:%S %Z'] WARNING: Could not fetch remote image: https://img.shields.io/badge/code%20style-black-000000.svg [time data 'Sun, 14 Jun 2020 22:43:58 GMT' does not match format '%a, %d %b %Y %H:%M:%S %Z']

I gather, from the message I see that these files are "designed" dynamically.

Would it be possible to fix this behavior by simpling providing the files above in the source tree, even if in a dumbed-down form ?

Another solution would be to provide the dumbed-down form files and still allow dynamic creation of the files, but then, providing a mechanism by which to prevent these dynamic accesses to the internet. That mechanism could be activate when building for Debian ?

Thank you so much for your kind attention,

Sincerely, Filippo

EDIT: I pinpointed the external references to the intro.html file, and only that file, and only at the top of the file. I can easily remove these hrefs from the file.

MKoesters commented 4 years ago

Hi Filippo,

Do you need this to be removed in a automated fashion every time you are building the documentation? Also, since these are "just" warnings and the badges are not that important, does the docu still build? If yes, you should end up with a dumbed down version (maybe with some artifacts in the intro) If we need to get rid of these warnings, I'd need to have a closer look how this could be fixed

Best, Manuel

lopippo commented 4 years ago

Greetings, Manuel,

thank you so much for your answer. Well, after fiddling a bit with the doc build process, I found that the situation is a bit more tricky than I initially thought. I discovered that 'convert' is called at some point in the build process, and I want to check that first.

Also, I thought I could simply 'sed' out the problematic lines from the html output. But, it looks like I need to 'sed' them out at pymzML.tex stage, right before the compilation that fails.

I'll keep you posted of my advancement.

Sincerely, Filippo

lopippo commented 4 years ago

Here is me back again, I could finally get around the problem. The pymzML.tex file had to be patched to remove the accesses to the external sites and the intro.html file also. Thank you Filippo