bancaditalia / black-it

Black-box abm calibration kit by the Bank of Italy
https://bancaditalia.github.io/black-it/
GNU Affero General Public License v3.0
43 stars 2 forks source link

Add `BaseSeedable` class. #39

Closed marcofavorito closed 1 year ago

marcofavorito commented 1 year ago

Proposed changes

This is the base class for all objects that need to keep a random state.

In particular, the interface provides the following features:

Fixes

n/a

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply.

Further comments

n/a

codecov-commenter commented 1 year ago

Codecov Report

Merging #39 (45eda20) into main (3fd8000) will decrease coverage by 0.03%. The diff coverage is 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/bancaditalia/black-it/pull/39/graphs/tree.svg?width=650&height=150&src=pr&token=FwbdPgBFTD&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)](https://codecov.io/gh/bancaditalia/black-it/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) ```diff @@ Coverage Diff @@ ## main #39 +/- ## ========================================== - Coverage 96.82% 96.79% -0.03% ========================================== Files 30 31 +1 Lines 1512 1499 -13 ========================================== - Hits 1464 1451 -13 Misses 48 48 ``` | [Impacted Files](https://codecov.io/gh/bancaditalia/black-it/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [black\_it/utils/base.py](https://codecov.io/gh/bancaditalia/black-it/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-YmxhY2tfaXQvdXRpbHMvYmFzZS5weQ==) | `100.00% <ø> (ø)` | | | [black\_it/calibrator.py](https://codecov.io/gh/bancaditalia/black-it/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-YmxhY2tfaXQvY2FsaWJyYXRvci5weQ==) | `97.29% <100.00%> (-0.19%)` | :arrow_down: | | [black\_it/samplers/base.py](https://codecov.io/gh/bancaditalia/black-it/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-YmxhY2tfaXQvc2FtcGxlcnMvYmFzZS5weQ==) | `100.00% <100.00%> (ø)` | | | [black\_it/samplers/halton.py](https://codecov.io/gh/bancaditalia/black-it/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-YmxhY2tfaXQvc2FtcGxlcnMvaGFsdG9uLnB5) | `100.00% <100.00%> (ø)` | | | [black\_it/samplers/r\_sequence.py](https://codecov.io/gh/bancaditalia/black-it/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-YmxhY2tfaXQvc2FtcGxlcnMvcl9zZXF1ZW5jZS5weQ==) | `100.00% <100.00%> (ø)` | | | [black\_it/samplers/random\_uniform.py](https://codecov.io/gh/bancaditalia/black-it/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-YmxhY2tfaXQvc2FtcGxlcnMvcmFuZG9tX3VuaWZvcm0ucHk=) | `100.00% <100.00%> (ø)` | | | [black\_it/utils/seedable.py](https://codecov.io/gh/bancaditalia/black-it/pull/39?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-YmxhY2tfaXQvdXRpbHMvc2VlZGFibGUucHk=) | `100.00% <100.00%> (ø)` | | ... and [3 files with indirect coverage changes](https://codecov.io/gh/bancaditalia/black-it/pull/39/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)