Currently, cats works fine if run from the git checkout as it finds config.yml and fixed_parameters.yml. When run out of tree, for example by using a pipx install, cats fails as it does not find parameter files.
Steps to reproduce:
$ cd <directory where cats is cloned>
$ pipx install .
$ cd <any other directory>
$ cats -d 5 --loc OX1 --jobinfo=cpus=2,gpus=0,memory=8,partition=CPU_partition
WARNING:root:config file not found
Traceback (most recent call last):
File "/Users/abhidg/.local/bin/cats", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/abhidg/.local/pipx/venvs/climate-aware-task-scheduler/lib/python3.12/site-packages/cats/__init__.py", line 285, in main
args.jobinfo, expected_partition_names=config["partitions"].keys()
~~~~~~^^^^^^^^^^^^^^
KeyError: 'partitions'
Expected output:
cats should show a user-friendly error in this case and suggest a config file.
Other points:
If the fixed_parameters.yaml file is fixed and non-configurable by the user, then it makes sense to inline it in the carbonFootprint module. Data files can be installed through pyproject.toml, but this may not be needed for this use case.
Currently,
cats
works fine if run from the git checkout as it findsconfig.yml
andfixed_parameters.yml
. When run out of tree, for example by using apipx
install,cats
fails as it does not find parameter files.Steps to reproduce:
Expected output:
cats should show a user-friendly error in this case and suggest a config file.
Other points:
If the
fixed_parameters.yaml
file is fixed and non-configurable by the user, then it makes sense to inline it in thecarbonFootprint
module. Data files can be installed throughpyproject.toml
, but this may not be needed for this use case.