[Request for help] Making brian reproducible
Nilesh Patra
nilesh at nileshpatra.info
Thu Jun 10 17:36:56 BST 2021
Hi Felix,
On 6/10/21 8:32 PM, Felix C. Stegerman wrote:
> 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)
Many thanks for your patches, I applies both of them and reprotest CI goes green now![1] \o/
Super thanks for your help!
I'll file a bug report now
[1]: https://salsa.debian.org/med-team/brian/-/jobs/1694238
Nilesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/reproducible-builds/attachments/20210610/e583fb4a/attachment.sig>
More information about the Reproducible-builds
mailing list