In previous versions of the package, the function load_additional_systems would receive the path to a directory and correctly load all the system files present in that directory and in all of its subdirectories.
GaiaXPy would load the XYZ system in the root directory and also all the three system files in the ABC subdirectory.
However, in GaiaXPy version 2.1.1, the function will raise an error if system files are found in subdirectories, and in that case, it will fail to load all of the filters.
If the function receives a path to a directory and there are no system files in any of its subdirectories, then the systems will be correctly loaded, and no error will be raised. A system file is a file whose name matches the pattern expected by GaiaXPy (r'[a-zA-Z0-9-_]+\.gaiaxpy_dr3_[a-zA-Z0-9-]+\.xml', case insensitive) .
In previous versions of the package, the function
load_additional_systems
would receive the path to a directory and correctly load all the system files present in that directory and in all of its subdirectories.https://github.com/gaia-dpci/GaiaXPy/blob/3426ebea6698f2a8872348eff553f98bccc6d0a2/src/gaiaxpy/generator/photometric_system.py#L96
For example, for the following directory structure:
GaiaXPy would load the
XYZ
system in the root directory and also all the three system files in theABC
subdirectory.However, in GaiaXPy version
2.1.1
, the function will raise an error if system files are found in subdirectories, and in that case, it will fail to load all of the filters.If the function receives a path to a directory and there are no system files in any of its subdirectories, then the systems will be correctly loaded, and no error will be raised. A system file is a file whose name matches the pattern expected by GaiaXPy (
r'[a-zA-Z0-9-_]+\.gaiaxpy_dr3_[a-zA-Z0-9-]+\.xml'
, case insensitive) .The steps to follow should be:
[x] Fix the bug
[x] Add relevant tests
[x] Release a patch (?)
Bug reported internally by a user.