Skip to content

Yaml path resolution - #127

Merged
lrobion merged 9 commits into
MIT-LAE:mainfrom
lrobion:yaml-path-resolution
Aug 21, 2026
Merged

Yaml path resolution#127
lrobion merged 9 commits into
MIT-LAE:mainfrom
lrobion:yaml-path-resolution

Conversation

@lrobion

@lrobion lrobion commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Closes #116.
Previously relative paths were resolved against the location of the last input file to APCEMM leading to unexpected reading/failure to find of files.
Now relative paths in input.yaml files passed to APCEMM are all resolved relative to the location of the input file that has set them.

Other changes:

  • Output merged-input.yaml now contains the absolute paths for paths passed in the input
  • defaults/input.yaml does not accept relative paths anymore (it ran into the aforementioned bug anyway before this fix)
  • A notable consequence of ^ is that Output folder (string) is now required to be specified by the user (now set to =MISSING= in defaults/input.yaml), previously it would resolve to /path/to/last/input_yaml/passed/APCEMM_out/. In practice I think everyone would set this already, this just prevents unlikely bugs. This is a similar behavior to the met file input: the bare minimum valid APCEMM input.yaml contains a path to the met input and the path to the output.
  • Better error messages for missing / bad paths to files for engine EI, ambient and external EPM file.
  • Deleted the examples/default/ which was completely out of date and the issl_rhi140/ example covers it.

Photolysis rates folder (string): /path/to/input/ in default has not been fixed because it is unused and will be removed in #121.

@lrobion
lrobion merged commit 2649726 into MIT-LAE:main Aug 21, 2026
2 checks passed
@lrobion
lrobion deleted the yaml-path-resolution branch August 21, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect relative path resolution when passing multiple input.yaml

1 participant