bycycle-tools / bycycle

Cycle-by-cycle analysis of neural oscillations.
https://bycycle-tools.github.io/
Apache License 2.0
82 stars 21 forks source link

[TST] Add persistent hash test #131

Closed ryanhammonds closed 1 year ago

ryanhammonds commented 1 year ago

Adds a test to ensure the computed features are consistent from version to version and from PR to PR. This is to ensure there are no changes in how features are computed without an explicit warning from a failed test. The PERSISTENT_HASH variable must be updated/committed when a change to the output df/array is expected. Here, the df is converted to an array, then hashed using sha-1 (same algorithm that git uses), so we don't have to track a large array/df in git history.

@TomDonoghue if this looks useful, I could eventually add a similar thing to specparam/neurodsp?