Any kind of contribution to The Illuminator is welcome, from a simple comment or a question, to a full fledged pull request.
A contribution can be associated with the following cases:
- You have a question.
- You think you may have found a bug, including unexpected behavior.
- You want to make changes to the code base to fix a bug, make improvements, add a new functionality, or to update the documentation.
- You want to improve the Illuminator's documentation
The sections below outlines the steps to make your contribution to the software for each of the aforementioned cases.
- Use the search functionality here to see if someone already filed the same issue.
- If your issue search did not yield any relevant results, open a new issue.
- Apply the "Question" label. Additionally, apply other labels when relevant.
- Use the search functionality here to see if someone already filed the same issue.
- If your issue search did not yield any relevant results, open a new issue and provide enough information to understand the cause and the context of the problem. Depending on the issue, you may also want to include:
- the SHA hashcode of the commit that is causing your problem
- some identifying information (name and version number) for dependencies you're using
- information about the operating system
- (important) Announce your plan to the rest of the community before you start working. This announcement should be in the form of a (new) issue on the Github repository.
- (important) Wait until a consensus is reached about your idea being a good idea.
If you are a part of the Illuminator team and have write access to the Illuminator GitHub repository, skip to the next subsection Develop your contribution. If you are a first-time contributor, follow the below steps:
-
Go to the Illuminator GitHub repository and click on 'Fork'. This will create a copy of the Illuminator repository in your GitHub account.
-
Clone the project to your local computer:
git clone https://github.com/your-username/Illuminator.git
-
Change the directory
cd Illuminator
-
Add the upstream repository
git remote add upstream https://github.com/<illuminator-path>.git
-
Now,
git remote -v
will show two remote repositories named:upstream
, which refers to the Illumator repositoryorigin
, which refers to your personal fork
TODO: update this section after refactoring
-
Create a branch of the latest commit on the
main
branch to work on your feature.git checkout -b my-feature
-
If you are contributing via a fork, make sure to pull in changes from the 'upstream' repository to stay up to date with the
main
branch while working on your feature branch. Follow the instructions here and here. -
Set up a development environment on your computer by installing the Illuminator in development mode with the following command: (Consider using a virtual environment for this purpose.)
# TODO: this part needs to be updated after refactoring
-
Set up your code editor to follow PEP 8 (remove trailing white space, no tabs, etc.). Check code with flake8.
-
Make sure the existing tests pass by running
pytest
from the root of the repository. -
Write tests for any new lines of code you add.
-
Include in-code documentation in form of comments and docstrings. Use the numpydoc documentation style.
-
Update the user/developer documentation if relevant. Undocumented contributions might not be merged.
-
Push your feature branch to (your fork of) the Illuminator GitHub repository.
-
Create a pull request, for an example, following the instructions here.
We use Sphinx and Markdown to write documentation for the Illuminator. The root of the documentation is the docs/
directory.
- Announce your plan.
- Follow the same steps to set up a development environment for making changes to the code base.
- Install the dependencies in
docs/requirements.txt
usingpip install -r docs/requirments.txt
(Sphnix will also be installed). - Update the documentation using Markdown. If familiar with writing Markdown for MyST consult their guides and documentation
- Make sure your contributions are built without errors. Go to the
docs
directory in the terminal withcd docs/
. Then, build the documentation usingmake html
. - Submit your contribution for review.
In case you feel you've made a valuable contribution, but you don't know how to write or run tests for it, or how to generate the documentation; don't let this discourage you from making the pull request. We can help you! Just go ahead and submit the pull request. But keep in mind that you might be asked to append additional commits to your pull request.