DeepLabCut is an actively developed package and we welcome community development and involvement. We are especially seeking people from underrepresented backgrounds in OSS to contribute their expertise and experience. Please get in touch if you want to discuss specific contributions you are interested in developing, and we can help shape a road-map.
We are happy to receive code extensions, bug fixes, documentation updates, etc.
If you are a new user, we recommend checking out the detailed Github Guides.
In order to make changes to deeplabcut
, you will need to fork the
repository.
If you are not familiar with git
, we recommend reading up on this guide.
Here are guidelines for installing deeplabcut locally on your own computer, where you can make changes to the code! We often update the master deeplabcut code base on github, and then ~1 a month we push out a stable release on pypi. This is what most users turn to on a daily basis (i.e. pypi is where you get your pip install deeplabcut
code from!
But, sometimes we add things to the repo that are not yet integrated, or you might want to edit the code yourself, or you will need to do this to contribute. Here, we show you how to do this.
Step 1:
-
git clone the repo into a folder on your computer:
-
click on this green button and copy the link:
- then in the terminal type:
git clone https://github.com/DeepLabCut/DeepLabCut.git
Step 2:
- Now you will work from the terminal inside this cloned folder:
-
Now, when you start
ipython
andimport deeplabcut
you are importing the folder "deeplabcut" - so any changes you make, or any changes we made before adding it to the pip package, are here. -
You can also check which deeplabcut you are importing by running:
deeplabcut.__file__
If you make changes to the code/first use the code, be sure you run ./resinstall.sh
, which you find in the main DeepLabCut folder:
Note, before committing to DeepLabCut, please be sure your code is formatted according to black
. To learn more,
see black
's documentation.
Now, please make a pull request that includes both a summary of and changes to:
- How you modified the code and what new functionality it has.
- DOCSTRING update for your change
- A working example of how it works for users.
- If it's a function that also can be used in downstream steps (i.e. could be plotted) we ask you (1) highlight this, and (2) idealy you provide that functionality as well. If you have any questions, please reach out: [email protected]
TestScript outputs:
- The OS it has been tested on
- the output of the testscript.py and if you are editing the 3D code the testscript_3d.py, and if you edit multi-animal code please run the maDLC test script.
Review & Formatting:
- Please run black on the code to conform to our Black code style (see more at https://pypi.org/project/black/).
- Please assign a reviewer, typically @AlexEMG, @mmathislab, or @jeylau (i/e. the core-developers)
DeepLabCut is an open-source tool and has benefited from suggestions and edits by many individuals: