Skip to content

Conversation

@lamby
Copy link

@lamby lamby commented Aug 16, 2022

Whilst working on the Reproducible Builds effort I noticed that sphinx-design and sphinx-panels does not create reproducible output.

This is because it uses Python's uuid.uuid4 to generate unique identifiers, but those numbers are random/nondeterminstic by design. This patch will seed these random numbers from SOURCE_DATE_EPOCH if it exists, otherwise it will revert back to random numbers.

(I originally filed this in Debian as bug #1017475, as well as in sphinx-panels.)

Whilst working on the Reproducible Builds effort [0] I noticed that
sphinx-panels and sphinx-design do not create reproducible output.

This is because it uses Python's uuid.uuid4 to generate unique identifiers, but
those numbers are random/nondeterminstic by design. This patch will seed these
random numbers from SOURCE_DATE_EPOCH if it exists, otherwise it will revert
back to random numbers.

I originally filed this in Debian as bug #1017475 [1], as well as within
sphinx-panels [2]

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/1017475
 [2] executablebooks/sphinx-panels#82
@welcome
Copy link

welcome bot commented Aug 16, 2022

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.

Welcome to the EBP community! 🎉

@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2022

Codecov Report

Base: 88.60% // Head: 88.66% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (8afaab0) compared to base (adbcdf2).
Patch coverage: 85.71% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #90      +/-   ##
==========================================
+ Coverage   88.60%   88.66%   +0.06%     
==========================================
  Files          11       11              
  Lines         930      935       +5     
==========================================
+ Hits          824      829       +5     
  Misses        106      106              
Flag Coverage Δ
pytests 88.66% <85.71%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
sphinx_design/tabs.py 90.62% <85.71%> (+0.38%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@chrisjsewell
Copy link
Member

Hey @lamby thanks for the PR, but I actually went a "simpler" route in #93.
Feel free to have a look, and let me know if I've missed anything 😅

@lamby
Copy link
Author

lamby commented Aug 23, 2022

Sure thing. In a perfect world I would have implemented it that way too I think, but it was harder to ensure I knew all the codepaths. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants