Skip to content

How can I contribute to the code?

Axel edited this page Oct 22, 2024 · 4 revisions

Contributions - General guidelines

This briefly aims to explain the general procedure to update the main branch of behavior_control.

For this, the best is to discuss in person any changes. 😄

In the following cases:

  • the code requires a bugfix
  • the code requires an update (e.g. from MATLAB)
  • a new feature is needed (e.g. new stimulus type) that the current code cannot support

Then you may want to write some code and add it the base code. For this:

  1. Discuss the proposed changes with other lab members / maybe create an issue
  2. Create a separate branch
  3. Implement the changes
  4. Test the changes thoroughly:
    • Test the code with your own mouse to make sure it runs as intended
    • Simulate mouse behaviour and different GUI settings - are there any freezes? does it run smoothly?
    • Sinulate in different task settings to see if normal behaviour control is not disrupted in other tasks than your own
    • Check that the output files are correctly made and saved and that the required content is there
    • This really helps making sure the behaviour code runs as expected
  1. Make a pull request and quickly describe what's the new / why the changes were made
  2. Ideally, other lab members would give a bit of their time to pull the separate branch first in order to test the code again
  3. Ask lab members to review the pull request before merging
  4. Delete your past branches of successful merges ✅

Any improvement on the code is welcome!