Skip to content

Contributing

Welcome!

First off, thank you for considering contributing to kotobase !

This section outlines the different ways you can contribute to the kotobase project

Setting Up A Development Environment

Pre-Requisites

Clone Repository

Clone The kotobase Repo

git clone https://github.com/svdC1/kotobase.git

Open In Your Code Editor

# VSCode Example
code kotobase

Create A Virtual Environment

Create a virtual environment to isolate dependencies from your system's Python installation

python -m venv .venv  # Create Env In The `.venv` Directory
source .venv/bin/activate # Activate The Environment (Linux)

Install The Package In Editable Mode

Install the kotobase package in editable mode with pip so that code changes take place immediately

# In Repo Root
pip install -e "./kotobase[dev]"

Install Pre-Commit Hooks (Optional)

You can optionally install the repo's Pre-Commit Hooks (scripts that detect errors or formatting issues and abort the git commit command before they enter versioning)

pre-commit install

Useful Commands

ruff check src/
ruff check src/ --fix
ruff format src/ --check
ruff format src/
mypy src/
cd docs-site
mkdocs serve
# Syncs (.github/README.md -> kotobase/README.md)
# Syncs (LICENSE -> kotobase/LICENSE)
python scripts/sync_meta.py

Repository

  • Clone + Fork Repo Locally

    gh repo fork owner/repo --clone
    

  • Create New Branch

    git checkout -b <BRANCH_NAME>
    

  • Commit New Changes

  • Open A Pull Request According To The Pull Request Template

Rules

Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests

When submitting contributions, please adhere to the Code of Conduct

Responsibilities
  • Create issues for any major changes and enhancements that you wish to make. Discuss things transparently and get community feedback
  • Follow provided issue templates when submitting
  • Keep feature versions as small as possible, preferably one new feature per version
  • Be welcoming to newcomers and encourage diverse new contributors from all backgrounds. See the Python Community Code of Conduct