CABLE-LSM / benchcab

Tool for evaluation of CABLE land surface model
https://benchcab.readthedocs.io/en/latest/
Apache License 2.0
2 stars 4 forks source link

`revision` key should be of type integer #197

Closed SeanBryan51 closed 11 months ago

SeanBryan51 commented 1 year ago

Specifying the revision in the config file

realisations:
  - path: "trunk"
    revision: 9666

produces the error

Traceback (most recent call last):
  File "/home/189/sb8430/.local/bin/benchcab", line 8, in <module>
    sys.exit(main())
  File "/home/189/sb8430/.local/lib/python3.9/site-packages/benchcab/benchcab.py", line 323, in main
    app = Benchcab(argv=sys.argv, benchcab_exe_path=shutil.which(sys.argv[0]))
  File "/home/189/sb8430/.local/lib/python3.9/site-packages/benchcab/benchcab.py", line 46, in __init__
    self.config = config if config else read_config(Path(self.args.config))
  File "/home/189/sb8430/.local/lib/python3.9/site-packages/benchcab/config.py", line 92, in read_config
    validate_config(config)
  File "/home/189/sb8430/.local/lib/python3.9/site-packages/benchcab/config.py", line 65, in validate_config
    raise ConfigValidationException(v)
benchcab.config.ConfigValidationException:

The following errors were raised when validating the config file.
realisations = [{0: [{'revision': ['must be of string type']}]}]

The revision key should be of type integer in the config schema: https://github.com/CABLE-LSM/benchcab/blob/42e66b693a4fdfcb3f314f447eb31081a671c003/benchcab/data/config-schema.yml#L40-L42