Thank you for your interest in contributing to depswiz! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and constructive in all interactions.
- Python 3.13 or higher
- uv (recommended) or pip
-
Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/depswiz.git cd depswiz -
Install development dependencies:
# Using uv (recommended) uv sync --dev # Or using pip pip install -e ".[dev]"
-
Install pre-commit hooks:
pre-commit install
-
Verify your setup:
# Run tests pytest # Run linting ruff check src/depswiz # Run type checking mypy src/depswiz
feature/description- New featuresfix/description- Bug fixesdocs/description- Documentation updatesrefactor/description- Code refactoring
-
Create a new branch from
main:git checkout -b feature/my-feature
-
Make your changes, following our coding standards
-
Write or update tests as needed
-
Run the test suite:
pytest
-
Run linting and type checking:
ruff check src/depswiz ruff format src/depswiz mypy src/depswiz
-
Commit your changes with a clear message:
git commit -m "feat: add support for XYZ"
We follow Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
- Push your branch to your fork
- Create a Pull Request against
main - Fill out the PR template
- Wait for CI checks to pass
- Request a review
- Follow PEP 8 with a line length of 100
- Use type hints for all function signatures
- Write docstrings for public functions and classes
- Use f-strings for string formatting
- Write tests for all new functionality
- Maintain or improve code coverage
- Use pytest fixtures for common test data
- Test edge cases and error conditions
- Update README.md for user-facing changes
- Add docstrings to new public APIs
- Update CHANGELOG.md for notable changes
-
Create a new directory under
src/depswiz/plugins/:src/depswiz/plugins/mylang/ ├── __init__.py └── plugin.py -
Implement the
LanguagePlugininterface:from depswiz.plugins.base import LanguagePlugin class MyLangPlugin(LanguagePlugin): @property def name(self) -> str: return "mylang" @property def display_name(self) -> str: return "My Language" # ... implement other required methods
-
Register in
pyproject.toml:[project.entry-points."depswiz.languages"] mylang = "depswiz.plugins.mylang:MyLangPlugin"
-
Add tests in
tests/test_plugins.py
-
Add the tool definition in
src/depswiz/tools/definitions.py:"mytool": ToolDefinition( name="mytool", display_name="My Tool", version_command=["mytool", "--version"], version_regex=r"mytool\s+(\d+\.\d+\.\d+)", github_repo="owner/mytool", project_indicators=["mytool.config"], update_instructions={ "macos": "brew upgrade mytool", "linux": "...", "windows": "...", }, ),
-
If the tool needs special version fetching, add a handler in
version_sources.py -
Test with
depswiz tools -t mytool
Please include:
- depswiz version (
depswiz version) - Python version
- Operating system
- Steps to reproduce
- Expected vs actual behavior
- Relevant error messages or logs
Please describe:
- The problem you're trying to solve
- Your proposed solution
- Alternative solutions you've considered
- Open a Discussion for questions
- Check existing Issues for known problems
Thank you for contributing!