RSS <== blog page - 2/6 ==> Blog notebook (8) sphinx (13)


blog page - 2/6

Missing signature for functions

2018-08-03

The signature of a function is not always available in Python. The buildin functions do not follow the same pattern as functions written in Python but they provide a backup plan with the attribute __text_signature__:

post

Upload a single binary on PyPI

2018-05-21

The packages for multiple distribution are built on different machine but the upload takes place on a single machine. I retrieved all available builds and moved them to the dist folder. The file .pypirc was saved into my home with the following content:

post

Check RST syntax

2018-04-21

It is usually a pain to discover I made an error in a formula while I’m writing documentation. It fails quite long after after the unit tests started. The documentation is generated after the unit test pass. I also use a lot .. runpython:: (see RunPythonDirective) to run pieces of code inside the documentation. It is quite annoying to discover it fails long after. So I creates a unit test which can be used to compile a single page of the documentation : test_doc_page. I modify the page name when I have some doubt or I move to another one.

post

Long names on Windows

2018-03-26

One of my unit test was failing due to a weird error in sphinx-gallery. The module could not write a file on Windows because its name was longer than 260 which still seems to be a limit of the system.

post

pip 9.0.2 and issue with pip._vendor.urllib3.contrib

2018-03-19

pip was recently updated and the new version produces a weird error:

post

Replace pdflatex by xelatex

2018-03-03

pdflatex does not natively support utf-8 (no fixed size characters) but xelatex does (see Swapping from pdfLaTeX to XeLaTex). I tried a couple of past in the past with no success and I finally remove all accents from pdf coming from notebooks. It seems to work now.

post

Turn warnings into errors

2017-09-23

The following code turns warnings into errors. Useful to find the source of a warning.

post

Issue in ZipFile on Windows

2017-09-14

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 zipfile.ZipFile.open to fix the line which checks that names are consistent in the file list and in the compressed content.

post

Issues with sphinx-gallery

2017-08-25

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.

post

Pandoc on ubuntu and WSL

2017-08-20

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.

post


RSS <== blog page - 2/6 ==> 2020-08 (2) 2020-09 (1) 2021-01 (1) 2022-03 (1) 2023-05 (1)