In this PR, i've made the following changes. These (breaking) changes call for a major version bump from 0.4.2 to 1.0.0 as per semantic versioning guidelines.
Changes
Updated the Git Actions workflow to use the latest versions of checkout and setup-python (previous versions were deprecated).
Removed the octaveless subset. This was a temporary workaround for users who did not have the octave dependency. Using the octaveless subset allowed these users to compute all remaining SPIs without breaking the calculator. Checks upon calculator instantiation now make this redundant.
Restructured the YAML file (config.yaml) to include the keys "labels" and "depdendencies" at the level of base SPIs (e.g., Covariance). Individual estimators (e.g., EmpricalCovariance) are now specified under the "configs" key.
Filter function (filter_spis) has been added to utils.py to allow users to filter SPIs based on their "labels" (as specified in the new YAML).
Automatic dependency checks have been added. If the calculator is being instantiated for the first time in a session, check whether Octave and Java JVM can be run. If dependencies are missing, skip these SPIs when loading from the YAML and notify the user of excluded SPIs. Calculator will now run without breaking in the case that JAVA and/or octave are not installed.
Function to startup java JVM (using JPype) has been moved from infotheory.py to utils.py and called during the initial dependency checks. This is because it is currently not possible to start a JVM (for the purpose of checking it exists), then close and reopen (for computing SPIs) within the same session when using JPype. Therefore, checking the JVM and loading the relevant .jar files are both performed during the initial dependency checks. See known limitations of JPype for more info.
Bump version 0.4.2 to 1.0.0 in setup.py and pyproject.toml files.
Updated each of the subsets (sonnet, fast, fabfour) to align with the new YAML structure.
Migration Guide
This PR would introduce breaking changes for existing users with workflows which rely on custom
SPI subsets i.e., custom YAML files. Users relying on the pyspi default and pre-defined subsets are unaffected by these changes.
Existing users without octave and who were using the octaveless subset can now run pyspi without having to specify octaves as a subset in the Calculator object. Missing Octave will be detected automatically and the corresponding SPIs will be skipped if the user chooses to proceed.
Users that would like to define a custom subset of SPIs can follow the new guide in the documentation to ensure their custom YAML conforms to the new structure with labels, dependencies and configs as keys.
Testing
Added unit tests for the new filter_spis function.
Added unit tests for the CalculatorFrame and CorrelationFrame.
Documentation
Updated docs to reflect the new changes. Added a usage example for the filter_spis function.
Updated docs to notify users that pyspi can be run without Java and/or octave (without having to specify a reduced subset).
Updated docs to inform users how to create custom subsets using the new YAML structure.
Checklist
[x] Tests added/updated
[x] Documentation updated
[x] Changelog updated
[x] Version bumped in setup.py and pyproject.toml.
In this PR, i've made the following changes. These (breaking) changes call for a major version bump from 0.4.2 to 1.0.0 as per semantic versioning guidelines.
Changes
octaveless
subset. This was a temporary workaround for users who did not have the octave dependency. Using the octaveless subset allowed these users to compute all remaining SPIs without breaking the calculator. Checks upon calculator instantiation now make this redundant.config.yaml
) to include the keys "labels" and "depdendencies" at the level of base SPIs (e.g., Covariance). Individual estimators (e.g., EmpricalCovariance) are now specified under the "configs" key.filter_spis
) has been added toutils.py
to allow users to filter SPIs based on their "labels" (as specified in the new YAML).JPype
) has been moved frominfotheory.py
toutils.py
and called during the initial dependency checks. This is because it is currently not possible to start a JVM (for the purpose of checking it exists), then close and reopen (for computing SPIs) within the same session when usingJPype
. Therefore, checking the JVM and loading the relevant .jar files are both performed during the initial dependency checks. See known limitations of JPype for more info.setup.py
andpyproject.toml
files.Migration Guide
This PR would introduce breaking changes for existing users with workflows which rely on custom SPI subsets i.e., custom YAML files. Users relying on the pyspi default and pre-defined subsets are unaffected by these changes.
octaveless
subset can now run pyspi without having to specifyoctaves
as a subset in the Calculator object. Missing Octave will be detected automatically and the corresponding SPIs will be skipped if the user chooses to proceed.labels
,dependencies
andconfigs
as keys.Testing
filter_spis
function.Documentation
filter_spis
function.Checklist
setup.py
andpyproject.toml
.