[Request for help] Making brian reproducible
Felix C. Stegerman
flx at obfusk.net
Thu Jun 10 16:02:26 BST 2021
Hi!
* "Felix C. Stegerman" <flx at obfusk.net> [2021-06-10 16:55]:
> * Nilesh Patra <nilesh at nileshpatra.info> [2021-06-07 21:16]:
> > * Only _some_ files in the documentation it vendors has stuff (like tags, examples, links) in random order across different builds.
> > By the looks of it, it seems this randomness is due to the way data is being inserted into files with the brian2/sphinxext/generate_examples.py script,
> > but I am having trouble figuring it out beyond this point.
> >
> > My changes are pushed here[1], the failing reprotest CI can be found here[2], and this is the diffoscope[3]
> >
> > [1]: https://salsa.debian.org/med-team/brian/-/blob/make-reproducible
> > [2]: https://salsa.debian.org/med-team/brian/-/jobs/1688958
> > [3]: http://paste.debian.net/1200330/
I also found a bug in brian2/sphinxext/generate_examples.py that's
another source of irreproducibility; here's a patch:
--- a/brian2/sphinxext/generate_examples.py
+++ b/brian2/sphinxext/generate_examples.py
@@ -160,7 +160,7 @@
category_additional_files[relpath].append((file, full_name))
with codecs.open(fname, 'rU', encoding='utf-8') as f:
content = f.read()
- output = file + '\n' + '=' * len(title) + '\n\n'
+ output = file + '\n' + '=' * len(file) + '\n\n'
output += '.. code:: none\n\n'
content_lines = ['\t' + l for l in content.split('\n')]
output += '\n'.join(content_lines)
- Felix
More information about the Reproducible-builds
mailing list