gitnetlogoagent

Is there a way to separate the interface description from the code in net logo?


I am using Netlogo for a group project, and we are using git for VC. When I save a file, Netlogo puts a description of what the interface tab looks like underneath the code in the same file. When I merge the code I get a number of conflicts in this section. Is there a way in either Netlogo to sepearte the two files so that we dont have to fix all of the conflicts every time we merge two branches.

I tried looking at netlogo docs but couldn't find anything. If there is a way to manage this better through git then this would also work.


Solution

  • You could try putting your model.nlogo into .gitignore.

    Then, putting all the code in NetLogo source files while having only the following in your NetLogo "Code" tab:

    __includes[
       "files/code_script_1.nls"
       "files/code_script_2.nls"
       ...
    ]
    

    This way, git would ignore changes in your interface while tracking changes in the rest of the code. However, this might be problematic if changes closely related to newly added code are introduced in your interface. As you may have code referring to inexistent interface features, which would give you errors.