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

fail tests if manipulating main.gms with default cfg drops/changes switches #1764

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

orichters
Copy link
Contributor

@orichters orichters commented Aug 5, 2024

Purpose of this PR

Type of change

  • Bug fix
  • New feature

Checklist:

  • My code follows the coding etiquette
  • I performed a self-review of my own code
  • I explained my changes within the PR, particularly in hard-to-understand areas
  • I checked that the in-code documentation is up-to-date
  • I adjusted the reporting in remind2 where it was needed
  • I adjusted forbiddenColumnNames in readCheckScenarioConfig.R in case the PR leads to deprecated switches
  • All automated model tests pass (FAIL 0 in the output of make test)
  • The changelog CHANGELOG.md has been updated correctly

@orichters orichters removed the request for review from fbenke-pik August 5, 2024 10:02
Copy link
Contributor

@cchrisgong cchrisgong left a comment

Choose a reason for hiding this comment

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

Thank you soo much! :D

@orichters
Copy link
Contributor Author

This is how it looks if you run this new test without the fixes:

Warning (test_01-manipulateConfig.R:20:7): manipulate config with default configuration does not change main.gms
Applying manipulateConfig with the default configuration leads to this diff between main.gms and main9105c4a453e9f.gms:
<   cm_iteration_max          "number of iterations, if optimization is set to negishi or testOneRegi; is overwritten in Nash mode, except for cm_nash_autoconverge = 0"
>   cm_iteration_max          "number of iterations, if optimization is set to negishi or testOneRegi; is overwritten in Nash mode, except for cm_nash_autoconverge = 1"
< $setGlobal cm_fxIndUe        off  !! def = off
< $setGlobal cm_fxIndUeReg     ""       !! def = ""

Failure (test_01-manipulateConfig.R:24:5): manipulate config with default configuration does not change main.gms
length(diffresult) not equal to 0.
1/1 mismatches
[1] 4 - 0 == 4

Warning (test_01-manipulateConfig.R:30:5): manipulate config with default configuration does not change main.gms
These cfg$gms switches can't be found after manipulation of main.gms, see main9105c4a453e9f.gms.
Please file an issue in the gms package and try to adjust the code until the error goes away:
- cm_fxIndUe
- cm_fxIndUeReg

Failure (test_01-manipulateConfig.R:34:3): manipulate config with default configuration does not change main.gms
length(removedgms) not equal to 0.
1/1 mismatches
[1] 2 - 0 == 2

I shortly discussed with Tonn about the fact that diff might not be available on Windows, but we agreed that we can live with that for now.

@orichters orichters merged commit 36fde29 into remindmodel:develop Aug 5, 2024
2 checks passed
@cchrisgong
Copy link
Contributor

Thanks, this warning message would be found in log.txt?

@cchrisgong
Copy link
Contributor

is it also applied to other module declarations or only in core?

@orichters
Copy link
Contributor Author

  • This whole problem should only be relevant for main.gms.
  • You find the error if you run make test.

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.

3 participants