DEV Community

Cover image for Contributing to epispot: made easy
q9i for epispot

Posted on

Contributing to epispot: made easy

Epispot is an open-source Python package for modeling infectious
diseases with support for compartmental models and graphing
utilities.

Epispot started small. In fact, when epispot was first launched, it was little more than a few scraps of code. But over time, with inspiration from other demos, epispot has become one of the largest Python packages for infectious disease modeling. As epispot turns a new corner, we hope to grow our open-source community and reach more contributors. This article outlines the main ways you can help contribute to the epispot/epispot repository on GitHub.

1. Fixing Bugs

Epispot categorizes issues by priority level. On the repository, each issue, after being processed, will be tagged with either a high-priority or low-priority label. A great way to contribute is to try and work on as many high-priority issues as possible. These issues tend to be bugs, vulnerabilities, or critical issues and your help will go a long way. But you don't need to fix a bug to actually help. Even adding more information about what the behavior of a certain bug is can help. However, if you do want to start working on a bugfix, run the following on a local computer:

$ git clone https://github.com/epispot/epispot
$ cd epispot
$ git checkout master
$ git branch patch-1
$ git checkout patch-1
Enter fullscreen mode Exit fullscreen mode

Then, once you're done fixing the bug:

$ git add .
$ git commit -m "Fixed #[Issue Number]"
$ git push
Enter fullscreen mode Exit fullscreen mode

After this you can successfully submit your PR to the main repo. After build and code quality tests run, your PR will be tagged and linked to the issue and then merged.

2. Documentation

One important misconception with contributing to open-source is that you have to code. However, documentation is a great way to contribute without actually coding.

Epispot's docs are generated using pdoc3, which automatically creates documentation for docstrings on the nightly branch. The nightly branch is essentially epispot's development branch--it's where all new changes and features go to get tested (and it even has its own package! To contribute, run the following in a git shell:

$ git clone https://github.com/epispot/epispot
$ cd epispot
$ git checkout nightly
$ git branch docs-1
Enter fullscreen mode Exit fullscreen mode

Now you can start adding docs! Before starting, checkout DOCUMENTATION.md if you're unfamiliar with pdoc3. Then go into the epispot (package) directory, and edit the docstrings. To preview the docs, run

$ pdoc --html --output-dir docs epispot
Enter fullscreen mode Exit fullscreen mode

This will create a docs/epispot folder which will be automatically gitignored so you can preview the docs and not have to delete them before committing. When you're done, run:

$ git add .
$ git commit -m "Added Documentation on [module name]"
$ git push
Enter fullscreen mode Exit fullscreen mode

Now you can safely submit your PR and tag it with documentation. Most doc PRs will be merged soon since tests don't have to run.

3. Localization

One of the other great ways you can contribute to epispot, without even using a terminal or code editor, is through localization. Epispot uses gitlocalize to localize documentation. If you speak another language, you can add it and start working on localizing it. Then, submit a review request. This will get approved soon and a PR will be created in GitHub. Note that all localizations are pushed to the gh-pages branch by default where they will be deployed instantly after merging.

Conclusion

Epispot hopes that through our open-source efforts we can grow our contributors. If you are interested in contributing, head on over to the repo and check out our contributing guidelines! In the meanwhile, 👋

Top comments (0)