Contributing

We’re thrilled that you’re considering contributing to pycellga! Community contributions drive innovation and help us improve the software. Whether it’s reporting bugs, suggesting enhancements, or submitting pull requests, your support is invaluable.

Ways to Contribute

Here are some ways you can make meaningful contributions to pycellga:

  • Report Bugs: If you encounter an issue, create a detailed bug report in our issue tracker.

  • Suggest Features: Have ideas for new features or enhancements? Submit a feature request to help guide our roadmap.

  • Fix Bugs or Implement Features: Browse open issues, pick one, and submit a pull request with your solution.

  • Improve Documentation: Documentation is key to helping users understand the software. Fix typos, clarify steps, or add examples to make it even better.

Development Setup

To begin contributing code, set up your development environment as follows:

Step 1: Fork the Repository

Create your own copy of pycellga by forking the repository:

  1. Visit the repository.

  2. Click the “Fork” button in the upper-right corner.

  3. Select your GitHub account to create the fork.

For a step-by-step guide on forking, visit GitHub’s Fork a Repo page.

Step 2: Clone Your Fork

Clone your forked repository to your local machine:

git clone https://github.com/username/pycellga.git
cd pycellga

Step 3: Install Dependencies

Install the required dependencies:

pip install -r requirements.txt

Step 4: Create a New Branch

Create a branch for your changes:

git checkout -b feature-or-bugfix-name

Use descriptive names for branches, such as add-new-feature or fix-bug.

Pull Request Guidelines

When you’re ready to submit your changes, follow these guidelines to ensure a smooth review process:

  1. Write Clear Commit Messages: Each commit message should be clear and descriptive.

  2. Run Tests: Verify that all tests pass. Tests can be run from the tests folder or main directory:

  • From the tests folder:

cd tests
pytest *         # or
pytest -v
  • From the main project directory:

pytest -v
  1. Submit a Pull Request: Push your branch to GitHub, navigate to the main repository, and open a pull request.

  2. Respond to Reviews: Be responsive to feedback during the review process, and make any requested changes to ensure your contribution is merged smoothly.

Coding Standards

To maintain a consistent and readable codebase, please adhere to the following guidelines:

  • PEP 8: Follow PEP 8 coding style standards for Python code.

  • Type Annotations: Include type hints for function arguments and return values.

  • Docstrings: Provide clear docstrings for functions and classes. We recommend using the Google docstring style.

Running Tests

Before submitting a pull request, ensure that all tests pass. Tests can be run in the tests folder or from the main directory as follows:

  1. From the `tests` folder:

cd tests
pytest *         # or
pytest -v
  1. From the main project directory:

pytest -v

Testing Guidelines

Here are additional details for testing your contributions:

  1. Set up your environment:

  • Install the dependencies listed in requirements.txt:

pip install -r requirements.txt
  • Install testing dependencies like pytest:

pip install pytest pytest-cov
  1. Run coverage checks:

  • To ensure your changes are covered by tests, run:

pytest --cov=pycellga
  1. Write new tests:

  • If your contribution involves new functionality, write test cases to validate its behavior.

  • Place test files in the tests folder, following the naming convention test_<feature_name>.py.

  1. Review existing tests:

  • Familiarize yourself with the project’s test structure by reviewing existing tests in the tests folder.

  • Ensure your tests align with the same style and structure.

By following these testing guidelines, you help maintain the quality and reliability of pycellga.

Thank you for considering a contribution to pycellga. We’re excited to see what you’ll bring to the project!