Skip to content

Latest commit

 

History

History
90 lines (53 loc) · 4.45 KB

CONTRIBUTING.md

File metadata and controls

90 lines (53 loc) · 4.45 KB

Contributing to MetaTag

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.

Code of conduct

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.

I have a question!

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.

How can I contribute?

1. Reporting bugs

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.

2. Suggesting enhancements

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.

3. Improving the documentation

Help is always needed at improving the documentation. Either adding more detailed docstrings, usage explanations or new examples.

First contribution

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!

Setting up a local developer environment

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:

  1. Fork and download repo, cd to downloaded directory. You should create a new branch to work on your issue.

  2. 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
  1. Build package
(metatag-dev) poetry build
  1. Install MetaTag
(metatag-dev) pip install dist/metatag*.whl
  1. Run tests
(metatag-dev) bash tests/run_test.sh

Working with GitHub branches

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:

  1. Before pulling new updated from main, commit all the you changes you made in yout local branch
  2. The command above must be exectued within your git branch, so first select the branch, the run the command.

Enabling GitHub's https authentication in Ubuntu/Debian

  1. Create a Personal Access Token (PAT) in GitHub, copy the token (will be invisible thereafter)

  2. 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

Tests on push and pull request to main

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.