Skip to content

Resaving Models in the Newest Release

[email protected] edited this page Sep 21, 2023 · 4 revisions

When a new NetLogo release goes out it's necessary to update the models library versions to match. It's usually not an urgent thing, but it's best to be done not long after the release. This only needs to be done for final releases, not betas or release candidates.

During the actual release process the models will automatically be updated to hold versions matching the release. This includes beta versions, like NetLogo 6.3.0-beta1 and similar. These are committed by the release devs on a branch in the models repository and they are tagged with a git tag so they can be referenced for posterity as the actual models that went out with the release. This process for the release devs is the same for a final release; they put the released changes on a branch and tag it for posterity. The release devs do not handle the final updating of the main branch of the models repo after a final release.

As of NetLogo 6.4, the resaver has been made available in the models repository itself, so it's not necessary to use the NetLogo repo at all to get the models updated. Three things have to be updated for this to work:

  1. Update the netLogoVersion setting in the build.sbt file to the release version. The release devs should publish this dependency as part of their work.
  2. Update the version in the VersionTests.scala file to match the release version.
  3. Update the models themselves using the ModelResaver for 2D and 3D using these two sbt commands (run separately):
  • runMain org.nlogo.models.ModelsResaver
  • runMain org.nlogo.models.ModelsResaver3d

It's possible that you see some error message during the process (e.g., "MIDI is not available") but those should not interfere with the process. If some models truly fail, you should get a list of FAILED MODELS: at the end. Ideally any issues would've already been encountered and resolved by the release devs, so feel free to ask them if you run into anything odd.

Assuming the model repo was clean when you started (it should be), you can check what the script actually did to your model files by going back to the models repo and running:

models$ git status
models$ git diff

If all looks well, just commit everything and push it up on a branch to run the automated tests:

models$ git add -a
models$ git commit -m "Update model versions for NetLogo 6.4.0"

After this is merged to the main branch you can notify the NetLogo devs and they'll handle making sure the models library in the NetLogo repo is up-to-date with these changes.