Skip to content

Conversation

@JakobBD
Copy link
Contributor

@JakobBD JakobBD commented Aug 29, 2025

Purpose of this PR

Introduces two scripts:

  • One should be included in the start scripts. It puts files into the run folder with the full git info. Not only the commit, but also the diff patch.
  • The other can be called from a run folder and restores the repo to the state of this run. This can be helpful if a development state was not committed.

Even without the second script, the full git diff information is helpful to follow which code version was used for the run.

To Do:

  • make a subfolder in the run folder to place these files in
  • call first script from start scripts, including error tolerance
  • replace print statements by proper logging
  • comment and/or refactor

I am open to discuss the decisions I made for this script, e.g. if and when the remindmodel remote should be fetched.

Type of change

Indicate the items relevant for your PR by replacing ◻️ with ☑️.
Do not delete any lines. This makes it easier to understand which areas are affected by your changes and which are not.

Parts concerned

  • ◻️ GAMS Code
  • ☑️ R-scripts
  • ◻️ Documentation (GAMS incode documentation, comments, tutorials)
  • ◻️ Input data / CES parameters
  • ◻️ Tests, CI/CD (continuous integration/deployment)
  • ◻️ Configuration (switches in main.gms, default.cfg, and scenario_config*.csv files)
  • ◻️ Other (please give a description)

Impact

  • ◻️ Bug fix
  • ◻️ Refactoring
  • ☑️ New feature
  • ◻️ Change of parameter values or input data (including CES parameters)
  • ◻️ Minor change (default scenarios show only small differences)
  • ◻️ Fundamental change of results of default scenarios

Checklist

Do not delete any line. Leave unfinished elements unchecked so others know how far along you are.
In the end all checkboxes must be ticked before you can merge
.

  • I executed the automated model tests (make test) after my final commit and all tests pass (FAIL 0)
  • I adjusted the reporting in remind2 if and where it was needed
  • I adjusted the madrat packages (mrremind and other packages involved) for input data generation if and where it was needed
  • My code follows the coding etiquette
  • 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 forbiddenColumnNames in readCheckScenarioConfig.R in case the PR leads to deprecated switches
  • I updated the CHANGELOG.md correctly (added, changed, fixed, removed, input data/calibration)

Further information (optional)

  • Runs with these changes are here:
  • Comparison of results (what changes by this PR?):

…. Allows to restore the repo of any run in its original form
@JakobBD JakobBD added the enhancement New feature or request label Aug 29, 2025
@JakobBD
Copy link
Contributor Author

JakobBD commented Aug 29, 2025

addresses remindmodel/development_issues#270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant