Contributing
We welcome contributions to the GS1 GPC Import project! This document provides guidelines for contributing to the project.
Setting Up Development Environment
Clone the repository:
git clone https://github.com/mcgarrah/gs1_gpc_import.git cd gs1_gpc_import
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install development dependencies:
pip install -r requirements.txt pip install -e ".[dev]"
Code Style
We use the following tools to maintain code quality:
Black: Code formatter
Flake8: Linter
isort: Import sorter
mypy: Type checker
You can run these tools with:
# Format code
black gs1_gpc
# Sort imports
isort gs1_gpc
# Lint code
flake8 gs1_gpc
# Type check
mypy gs1_gpc
Pull Request Process
Fork the repository
Create a feature branch
Make your changes
Run tests and ensure they pass
Submit a pull request
When submitting a pull request, please:
Include a clear description of the changes
Update documentation if necessary
Add tests for new features
Ensure all tests pass
Testing
We use pytest for testing. Run the tests with:
pytest
To run tests with coverage:
pytest --cov=gs1_gpc
Documentation
We use Sphinx for documentation. To build the documentation:
cd docs
make html
The documentation will be built in the docs/_build/html directory.