We welcome your contributions! Please see the provided steps below and never hesitate to contact us.
If you are a new user, we recommend checking out the detailed Github Guides.
In order to make changes to napari
, you will need to fork the
repository.
If you are not familiar with git
, we recommend reading up on this guide.
Clone the forked repository to your local machine and change directories:
$ git clone https://github.com/your-username/napari.git
$ cd napari
Set the upstream
remote to the base napari
repository:
$ git add upstream https://github.com/napari/napari.git
Install the required dependencies:
$ pip install -r requirements.txt
Make the development version available globally:
$ pip install -e .
Go to documentation source
$ cd docs/source
Build the docs with help of given Makefile
$ make html
Then you can find the built docs in docs/source/_build/html
Our icon build process starts with a base set of svg
formatted icons stored in napari/resources/icons/svg
. If you want to add a new icon to the app, make the icon in whatever program you like, add it to that folder, and make sure it is listed in both napari/util/icons.py
and napari/resources/res.qrc
.
Then run the following command
python -m napari.resources.build_icons
This creates separate folders in napari/resources/icons
with full colored icon sets for each of our themes.
Finally, compile all the icons for use in the app by calling.
pyrcc5 -o napari/resources/qt.py napari/resources/res.qrc
You might need to run pip install pyqt5ac
if you don't already have the pyrcc5
command.
If you want to change one of the existing icons, modify the version in napari/resources/icons/svg
and run the commands above.
Create a new feature branch:
$ git checkout master -b your-branch-name
git
will automatically detect changes to a repository.
You can view them with:
$ git status
If you are changing anything with files and folder structure, remember to update doctree
$ cd docs
$ sphinx-apidoc -f -P -o source ../napari
Add and commit your changed files:
$ git add my-file-or-directory
$ git commit -m "my message"
Each commit you make must have a GitHub-registered email
as the author
. You can read more here
To set it, use git config --global user.email your-address@example.com
.
Switch to the master
branch:
$ git checkout master
Fetch changes and update master
:
$ git pull upstream/master
This is shorthand for:
$ git fetch upstream master
$ git merge upstream/master
Update your other branches:
$ git checkout your-branch-name
$ git merge master
Update your remote branch:
$ git push -u origin your-branch-name
You can then make a pull-request to napari
's master
branch.
If you have questions, comments, suggestions for improvement, or any other inquiries regarding the project, feel free to open an issue.
Issues and pull-requests are written in Markdown. You can find a comprehensive guide here.