-
Notifications
You must be signed in to change notification settings - Fork 97
Resaving Models in the Newest Release
Note: if you'd like to use the Models Resaver, you need to be working on the models
module of the larger NetLogo/NetLogo repo. To do that, follow the below:
$ git clone -b hexy https://github.com/NetLogo/NetLogo.git NetLogo
$ cd NetLogo
This will put the NetLogo code in the NetLogo
directory. In the steps that follow, you will have to run some commands from the NetLogo
directory and other commands from the models
directory under it. To make clear which location you have to run them from, we will try to prefix commands with either a NetLogo$
or a NetLogo/models$
prompt.
Don't forget the -b hexy
part of the git clone
command. This will tell git to get the hexy
branch
At this point, your models
directory will be created, but empty. To download the content from the models repo, do:
NetLogo$ git submodule update --init
This will initialize and update all the NetLogo submodules, including the models library but also the bundled extensions, Behviorsearch, and the Mathematica-Link.
At this point, you should try to build NetLogo:
NetLogo$ ./sbt all
Hopefully, all will go well. If it doesn't, visit the Building NetLogo wiki page.
This step requires that the NetLogo version you just cloned be identified as the version we are about to release, not as the previous one. You can check that by running NetLogo (NetLogo$ ./sbt run) and looking at the About item in the Help menu or by running:
NetLogo$ head -1 resources/system/version.txt
If the version number is not updated yet, ask someone from the dev team.
This step is handled by a ModelResaver
object in the org.nlogo.tools
package. To run it, fire up sbt:
NetLogo$ ./sbt
This will take you to the sbt command prompt, indicated by a >
. Now run the ModelResaver
:
> netlogo/test:runMain org.nlogo.tools.ModelResaver
It opens and saves all models in the library, excluding 3D models. To resave the 3D models, you will need to run it again separately, starting sbt with ./sbt -Dorg.nlogo.is3d=true
.
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.
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:
NetLogo/models$ git diff
If all looks well, just commit everything:
nl/models$ git add -A
nl/models$ git commit -m "update model version numbers"
Resaving all the models like that with require regenerating all the model checksums (which is required for a full release of NetLogo.
Models Library Editing
- Changes Since Previous Release
- Reviewing a Model for the Library
- Template Letter for Requesting a Review of a Model
- Automated Tests
- Resaving Models in the Newest Release
- Copyright and Citation Info
- Models Cross Referencing
- Models Library Statistics
- What is a Code Example?
- What is a Curricular Model?