First of all, thanks for taking the time to contribute! 🎉👍
Here you will find a set of guidelines for contributing to MetaTag. Feel free to propose changes to this document in a pull request.
This project and everyone participating in it is governed by the Contributor Covenant, v2.0 code of conduct. By participating, you are expected to uphold this code.
If you only have a question about all things related to MetaTag, the best course of actions for you is to open a new discussion.
We all make mistakes, and the developers behind MetaTag are no exception... So, if you find a bug in the source code, please open an issue and report it. Please, first search for similar issues that are currrently open.
Are you missing some feature that would like MetaTag to have? No problem! You can contribute by suggesting an enhancement, just open a new issue and tag it with the enhancement
label. Please, first search for similar issues that are currrently open.
Help is always needed at improving the documentation. Either adding more detailed docstrings, usage explanations or new examples.
Unsure where to begin contributing to MetaTag? You can start by looking for issues with the label good first issue
. If you are unsure about how to set a developer environment for MetaTag, do take a look at the section below. Thanks!
MetaTag depends on packages that are not available in pip, namely HMMER and Prodigal. These can be installed from the bioconda channel. Hence, to setup up a developer environment for MetaTag:
-
Fork and download repo, cd to downloaded directory. You should create a new branch to work on your issue.
-
Create conda environment with required dependencies:
The file envs/metatag-dev.yml
contains all dependencies required to use MetaTag. If conda is very slow solving the environment you can try installing [mamba])(https://github.com/mamba-org/mamba), just replace "conda" by "mamba" in the command below:
conda env create -n metatag-dev -f envs/metatag-dev.yml
conda activate metatag-dev
- Build package
(metatag-dev) poetry build
- Install MetaTag
(metatag-dev) pip install dist/metatag*.whl
- Run tests
(metatag-dev) bash tests/run_test.sh
The best way to safely interact with the codebase is through a personal git branch. It may happen that the main branch is updated (for instance with a new script) and one needs to integrate (merge) these new changes in their own branch without affecting the main branch. The best way to do this is by making use of the following command:
git pull --rebase origin main
or if accesing git within Visual Studio Code, one can also run the command by clicking on the Source Control options (three dots) within the Git tab and cliking on Branch / Rebase branch. All of this making sure you have selected your branch first.
IMPORTANT NOTES:
- Before pulling new updated from main, commit all the you changes you made in yout local branch
- The command above must be exectued within your git branch, so first select the branch, the run the command.
-
Create a Personal Access Token (PAT) in GitHub, copy the token (will be invisible thereafter)
-
Install GitHub CLI to securely store the token and avoid entering the token each time we need to access the CLI:
a) https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git b) https://github.com/cli/cli/blob/trunk/docs/install_linux.md
MetaTag's repo contains a GitHub Action to perform build and integration tests which is triggered automatically on push and pull request events to the main brach. Currently the tests include building and installing MetaTag in Ubuntu and running the test suit.