Contributing
Thank you for your interest in contributing to warrior-bot!
Development Setup
- Clone the repository:
- Create a virtual environment:
- Install development dependencies:
- Set up pre-commit hooks:
Code Standards
We use several tools to maintain code quality:
- black: Code formatting
- isort: Import sorting
- flake8: Linting
- mypy: Type checking
Run all checks:
Or let pre-commit handle it automatically when you commit.
Adding a New Command
- Create a new folder in
warrior_bot/commands/:
- Create
__init__.pywith your command:
"""My command implementation."""
import click
@click.command()
def mycommand():
"""My command description."""
click.echo("Hello from mycommand!")
- Register it in
warrior_bot/cli.py:
from warrior_bot.commands import mycommand
# In the cli function:
cli.add_command(mycommand.mycommand)
Documentation
Update the docs when adding features:
- Edit files in the
docs/directory - Preview locally:
- Visit
http://127.0.0.1:8000to see your changes
Submitting Changes
- Create a new branch:
- Make your changes and commit:
- Push and create a pull request:
Questions?
Feel free to open an issue if you have questions!