RSS <== blog page - 2/5 ==> Blog sphinx (12)

blog page - 2/5

Issue in ZipFile on Windows


Issue 6839 happens when a zip file is created on Windows. The created zip may contain full path with \\ when the file list only contains /. This raises exception BadZipFile with the following message: File name in directory … and header … differ due to a mismatch between backslashes. Another consequence found on GitHub: zipfile raises: File name in directory X and header Y differ.. The class WinZipFile owerwrites method to fix the line which checks that names are consistent in the file list and in the compressed content.


Issues with sphinx-gallery


Taking another dependency always means a potential conflicts between version. Is it fact enough updated when it breaks? I realized I was not the only to face an issue with sphinx-gallery. There is a discussion about it on scikit-learn/9189 and the package is now included in the sources. It is not really bothering for a small package like this. But still, it is extra work. I realize open source holds on some kind of magic sometimes. Some are fun but keeping them alive takes some energy.


Pandoc on ubuntu and WSL


I was using the Windows Subsystem for Linux to test a module with Linux. I could not make it work due to an old version of pandoc. Surprisingly, the default apt-get install pandoc installed a very old version (1.12). I could not convert any notebook with nbconvert into latex. I finally installed the latest version (1.19) and it worked perfectly. You can see the installation step in file .circleci/config.yml. That was not the last issue because pandoc seems to be very slow on WSL. About that, you can read: massive delay to call pandoc using the Windows Subsystem for Linux (WSL) or Bash for Windows, stack ghc painfully slow.


Build on CircleCI


pyquickhelper now builds on CircleCI. The list of unit tests enabled on that platform is bigger than on travis or appveyor. It also builds the wheel and the documentation. It pushed them into the artifacts section where they can be downloaded. You can see the installation step in file .circleci/config.yml.


Bug in Sphinx 1.6.2 for custom css


I was finally able to take some time and finish the migration to Sphinx 1.6.2. However, there is still an error I cannot fix because it is a bug in Sphinx which happens when a custom css is used.


Fixable issues with Sphinx 1.6.1


Sphinx has released a new version 1.6.1. Other packages updated their code but some issues remain. I had to modify the code of the file sphinx/transforms/ to propage the environment env if not present.


Issues with Sphinx 1.6.1


Sphinx has released a new version 1.6.1 but it breaks a couple of packages. sphinx_gallery breaks with the following error:


List of tools needed to build the documentation


I have been setting up a couple of times a machine to build this documentation and others for my teachings. I do that on Windows. Here is the list of tools I need:


Python 2.7 discontinued


Support for Python 2.7 will be discontinued. Too much work. No update on pypi for this version. To install it from the source:


Gallery of notebook


The module sphinx-gallery became quite popular. I discovered that sphinx-nbexamples was doing the same. I integrated the first one into pyquickhelper but I did something different for the second as I already had some custom logic to handle notebooks. get_thumbnail <pyquickhelper.helpgen.ipythonhelper.notebook_runner.NotebookRunner.get_thumbnail() which creates a thumbnail by getting the last image if there is one or the last result output cell. The module uses matploblib to builds an image with text results. You can check the results at Notebook Gallery.


RSS <== blog page - 2/5 ==> 2018-04 (1) 2018-05 (1) 2018-08 (1) 2019-03 (2) 2019-07 (1)