Thank you for your interest in contributing to ApiLinker! This document provides guidelines and instructions for contributing to the project.
By participating in this project, you agree to abide by our Code of Conduct. Please read it to understand what kind of behavior is expected in our community.
-
Fork the repository on GitHub.
-
Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/apilinker.git cd apilinker -
Set up the development environment:
# Create and activate a virtual environment (optional but recommended) python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install development dependencies pip install -e ".[dev]"
-
Create a branch for your feature or bugfix:
git checkout -b feature/your-feature-name
-
Make your changes:
- Write code and tests for your changes
- Follow the coding style guidelines (see below)
- Keep your changes focused and related to one issue/feature
-
Run the tests to ensure your changes don't break existing functionality:
pytest
-
Run code quality checks:
flake8 apilinker mypy apilinker black apilinker --check
-
Stage and commit your changes using clear commit messages:
# Stage all changes git add . # Or stage specific files git add file1.py file2.py # Commit with a clear message git commit -m "Add feature: concise description of your changes" git commit -m "Add feature: concise description of your changes"
-
Push to your fork:
git push origin feature/your-feature-name
-
Submit a pull request to the main repository.
Use conventional commits to improve changelog generation and release notes:
feat(connector): add PubChem batch fetch endpoint
fix(security): embed salt into encrypted credentials file
docs(benchmarks): add local benchmark guide
Types: feat, fix, docs, style, refactor, perf, test, chore.
- Follow PEP 8 for Python code style
- Use Black for automatic code formatting
- Write docstrings in the Google style
- Maintain 100% test coverage for new code when possible
- One feature or bug fix per pull request to keep the review process simple
- Include tests for any new functionality
- Update documentation for any changed functionality
- Describe your changes in the pull request description
- Reference related issues in the pull request description
- Updates are scoped to a single topic
- New/changed APIs have type hints and docstrings
- Backwards compatibility considered (and documented if breaking)
- Benchmarks added/updated if performance-sensitive
- Add the new transformer function to
apilinker.core.mapper.FieldMapper._register_built_in_transformers - Add documentation for the transformer in
docs/guide/mapping.md - Add tests for the transformer in
tests/test_mapper.py
- Create a new connector class that extends the base connector
- Update the connector factory to support the new type
- Add documentation for the new connector type
- Add tests for the new connector
ApiLinker supports plugins for custom connectors, transformers, and authentication methods. See the Plugin Development Guide for details on creating plugins.
- Update the documentation when adding or changing features
- Use clear, concise language accessible to users with different experience levels
- Include examples for new features
# Install docs dependencies
pip install -e ".[docs]"
# Build the Sphinx docs
cd docs/sphinx_setup
sphinx-build -b html . _build/html
# View the docs
start _build/html/index.html # On Windows- Use the GitHub issue tracker
- Include a detailed description of the issue
- Include steps to reproduce, expected vs actual behavior
- Include version information (Python version, ApiLinker version, OS)
Project maintainers are responsible for releases, which follow this process:
- Update version in
pyproject.toml - Update the changelog with all significant changes
- Create a GitHub release with release notes
- Publish to PyPI using the CI/CD pipeline
Thank you for contributing to ApiLinker! Your help is essential for making this project better for everyone.