Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop empty module subfolders in getModules #101

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

orichters
Copy link
Contributor

  • if a module was renamed (as was the case with 29_ageclass -> 28_ageclass in MAgPIE) or deleted (as was the case with 30_crop in MAgPIE), but git does not delete the folder because of some input files lying around, the scripts fails
  • See for example REMIND's automated model tests: /p/projects/remind/modeltests/remind/tests/test-full-2024-07-09.log:
Error: Chosen realization "feb21" does not exist for module "ageclass"
Execution halted
  • With this PR: in getModules, drop folders that do not contain a single *.gms file (usually: module.gms), and raise a warning instead
  • For REMIND, after creating an empty 18_test folder and executing Rscript start.R -t, before and after this PR:
Error: Chosen realization "NULL" does not exist for module "test"
Warning message:
In getModules(modulepath = modulepath) :
  The following module folders contain no '*.gms' file and are ignored: 18_test

Copy link
Member

@tscheypidi tscheypidi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks

@orichters orichters merged commit 04d5e64 into pik-piam:master Jul 11, 2024
2 checks passed
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.

replace_in_file() does not name the file in which an error occured, impeding debugging
2 participants