Skip to content

Notes on Model Czar Process

Jacob Kelter edited this page Aug 19, 2025 · 1 revision

Reviewing a Model Before it goes in the library

  • Sample Models go through full review (Reviewing a Model for the Library) and can be rejected from the library
  • Curricular models should have a review, but the standard is lower
  • Code examples don't need external review

Adding a model to the repo (after it has been reviewed)

  • Go to NetLogo/models repo
  • Make sure you are on the main branch
    • pull from main: git pull origin main
  • put model files in the proper folder (e.g., Sample Models/Social Science)
  • Run the Notarizer to notarize the model (see here)
  • Start running tests, and they will then remind you what steps to fix all the tests. (see Running tests section below)
  • After all tests are passing, then update Changes Since Previous Release with the what has been updated.
    • Once a new release goes out, you can clear Changes Since Previous Release since all that information is now officially in the release notes and we don't need to track it separately any more.

Running tests

To test all the models (often a good idea before adding the model):

  • run sbt to enter sbt (from the models repo)
  • run test

To test an individual model:

  • If the model name has no spaces in it, run testOnly * -- -Dmodel=name from inside sbt, where name is the name of the model
  • If the name has spaces wrap the whole command in double quotes: testOnly * -- "-Dmodel=name with spaces" where name with spaces is the name of the model.

To run a single test on all the models:

  • RuntestOnly *NameOfTest where NameOfTest is the filename of the test such as LegalInformationTests

More info at Automated Tests

Handing certain failing tests and exceptions to tests

Preview images for models library

There are three options for model previews

  1. manual
  2. default - created by running model
  3. create commands in "Preview Commands Editor" for commands to run to create preview image

If you are using option 2 or 3, need to go to .gitignore and add the model's .png preview which will be autogenerated so that your local version won't get committed

adding fake words that are okay

In models/src/test/resources/modelwords.txt add the word if it is needed.

Adding exceptions forbidden primitives, lowercase exceptions

Add the model in src/test/scala/org/nlogo/models/CodeTests.scala if needed.

continuous time models

Update here: https://github.com/NetLogo/models/blob/2bfb84e92b367f312e397338e27a4c85889f13a0/src/test/scala/org/nlogo/models/UpdateModeTests.scala#L7

Cross-listing models

If a model should be listed in more than one folder, update crossReference.conf with where it should be cross-listed. See Models Cross Referencing

Non-tick based updates

https://github.com/NetLogo/models/blob/2bfb84e92b367f312e397338e27a4c85889f13a0/src/test/scala/org/nlogo/models/UpdateModeTests.scala#L7

Updating tests after a release

After a release, NetLogo version should be changed in test files:

Clone this wiki locally