pyspi.utils.filter_spis
Last updated
Last updated
All page cover images on this wiki are created with the help of DALL-E, an AI program developed by OpenAI, or stock images from Unsplash.
Filter a pyspi config YAML file using a list of keywords and return a new YAML file containing the reduced set of SPIs in the current working directory.
Parameter | Type | Description |
---|---|---|
Nothing
- A new file is created in the current working directory.
ValueError: Raised in three scenarios:
If the keywords
parameter is not a list.
If any of the provided keywords is not a string.
If no SPIs match the specified keywords.
FileNotFoundError: Triggered if the specified configfile
cannot be found or if the default config.yaml
is not present in the expected directory.
OError: Occurs if there's an error reading the specified YAML file.
keywords
List of keywords used to filter SPIs e.g., linear, nonlinear, signed.
output_name
str, optional
Name of the filtered YAML file to be saved in the current working directory. If no name is provided, a randomly generated name will be used.
configfile
str, optional
Location of the source config file from which to filter SPIs. If no source file is provided, the config.yaml in the pyspi directory will be used.