DynamicsAndNeuralSystems / pyspi

Comparative analysis of pairwise interactions in multivariate time series.
https://time-series-features.gitbook.io/pyspi/
GNU General Public License v3.0
198 stars 26 forks source link

Minor bug fix for the filter_spis function #64

Closed jmoo2880 closed 5 months ago

jmoo2880 commented 5 months ago

This PR addresses a limitation in how the filter_spis function previously managed file paths. Initially, the function expected a specific file to reside within the source code's directory.

Here, I've made adjustments to allow the user to specify a YAML configfile location (with no implicit assumption about its location) and in the case where a user does not specify a file, the function defaults to the predefined config.yaml file within the script's directory. This file is expected to exist and serve as a fallback, ensuring the function works without mandatory user input regarding file paths. Output names are also now optional, and in the case where no output YAML name is specified, it will use a randomly generated name (to prevent overwriting) and save in the current working directory.

Unit tests have been added/updated to reflect these changes.