Skip to content

Check if relative paths exist#144

Merged
btobers merged 9 commits intodevfrom
138_path_check
Nov 4, 2025
Merged

Check if relative paths exist#144
btobers merged 9 commits intodevfrom
138_path_check

Conversation

@btobers
Copy link
Collaborator

@btobers btobers commented Oct 16, 2025

No description provided.

@btobers btobers self-assigned this Oct 16, 2025
@btobers btobers linked an issue Oct 16, 2025 that may be closed by this pull request
@btobers
Copy link
Collaborator Author

btobers commented Oct 21, 2025

After PR #143 is merged and closed out, merge dev into 138_path_check and then finalize this PR.

@btobers btobers marked this pull request as ready for review November 4, 2025 02:27
@btobers
Copy link
Collaborator Author

btobers commented Nov 4, 2025

@drounce this PR is ready to review. The only change here is that the config manager now validates that a number of relative paths defined in the user's config.yaml file exist. This will now throw an error when the config is loaded upon importing so that debugging something like a broken filepath becomes easier. I have this set up to ignore a number of optional filepaths:

skip_patterns = [
            '*cesm2*',
            '*cmip5*',
            '*gfdl*',
            '*debris*',
            '*h_ref*',
            '*frontalablation*',
            '*snowline*',
            '*meltextent*',
            '*dh_1d*',
            '*dhdt_2d*',
        ]

So this primarily checks for broken paths to the main input datasets (etc. oggm_gdirs, rgi, era5, cmip6, mass balance) and can easily be modified by adding or removing from the list of skip_patterns.

@btobers btobers requested a review from drounce November 4, 2025 02:29
@btobers btobers merged commit 476a2c7 into dev Nov 4, 2025
1 check passed
@btobers btobers deleted the 138_path_check branch November 4, 2025 02:39
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.

ConfigManager method to ensure paths exist in configuration file

2 participants