Thank you for your interest in contributing to undatum! This document provides guidelines and instructions for contributing.
- Python 3.8 or higher
- Git
- pip
- Clone the repository:
git clone https://github.com/datacoon/undatum.git
cd undatum- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install development dependencies:
pip install -e ".[dev]"Or install manually:
pip install -e .
pip install black ruff mypy pylint pytest pytest-cov pre-commitWe use black for code formatting with a line length of 100 characters:
black undatum/We use ruff for fast linting and pylint for deeper analysis:
ruff check undatum/
pylint undatum/We use mypy for type checking:
mypy undatum/Install pre-commit hooks to automatically check code before commits:
pre-commit installWe use Google-style docstrings for consistency. Example:
def example_function(param1: str, param2: int = 10) -> bool:
"""Brief description of the function.
Longer description explaining what the function does, any important
details about its behavior, and any relevant context.
Args:
param1: Description of param1.
param2: Description of param2 (default: 10).
Returns:
Description of return value.
Raises:
ValueError: When param1 is invalid.
Example:
>>> result = example_function("test", 20)
>>> print(result)
True
"""
passDocumentation is built using Sphinx:
cd docs
make htmlRun all tests:
pytestRun with coverage:
pytest --cov=undatum --cov-report=html- Place tests in the
tests/directory - Test files should be named
test_*.py - Use descriptive test function names:
test_function_name_scenario
-
Create a branch: Create a feature branch from
mastergit checkout -b feature/your-feature-name
-
Make changes: Make your changes following the code style guidelines
-
Run checks: Ensure all checks pass:
black undatum/ ruff check undatum/ mypy undatum/ pytest
-
Commit: Write clear commit messages following conventional commits:
feat: add new feature fix: fix bug in converter docs: update README refactor: improve performance -
Push: Push your branch and create a pull request
-
Review: Address any feedback from reviewers
- All code must be reviewed before merging
- Ensure tests pass and coverage is maintained
- Follow the existing code style
- Add documentation for new features
- Update CHANGELOG.md for user-facing changes
When reporting issues, please include:
- Description of the issue
- Steps to reproduce
- Expected behavior
- Actual behavior
- Python version
- undatum version
- Relevant error messages or logs
Feel free to open an issue for questions or reach out to the maintainers.