Thank you for your interest in contributing to s3hop! This document provides guidelines and instructions for contributing to the project and publishing new releases.
- Clone the repository:
git clone https://github.com/thehamsti/s3hop.git
cd s3hop
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install development dependencies:
pip install -e ".[dev]"
pip install build twine
- Create a new branch for your feature/fix:
git checkout -b feature/your-feature-name
- Make your changes and ensure they follow the project's coding style
- Write/update tests if necessary
- Run tests and ensure they pass
- Commit your changes with clear, descriptive commit messages
- Push your branch and create a Pull Request
- Follow PEP 8 guidelines
- Use meaningful variable and function names
- Add docstrings to functions and classes
- Keep functions focused and concise
- Add comments for complex logic
- Run tests:
python -m pytest tests/
- Check code coverage:
python -m pytest --cov=s3hop tests/
- You need maintainer access to the PyPI project
- Create a PyPI account if you don't have one
- Install required tools:
pip install build twine
-
Update version number in:
s3hop/__init__.py
setup.py
-
Create a new git tag:
git tag v0.1.0 # Replace with your version
git push origin v0.1.0
- Build the distribution packages:
python -m build
- Test the build on TestPyPI first:
python -m twine upload --repository testpypi dist/*
- Test the installation from TestPyPI:
pip install --index-url https://test.pypi.org/simple/ s3hop
- If everything works, upload to PyPI:
python -m twine upload dist/*
We follow semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Incompatible API changes
- MINOR: Add functionality in a backward-compatible manner
- PATCH: Backward-compatible bug fixes
Before releasing a new version:
- Update version numbers
- Update CHANGELOG.md
- Ensure all tests pass
- Update documentation if needed
- Create and push git tag
- Build distribution packages
- Test on TestPyPI
- Publish to PyPI
- Create GitHub release
If you need help or have questions:
- Check existing issues on GitHub
- Create a new issue with a clear description
- Tag it appropriately (bug, enhancement, question, etc.)
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Follow the golden rule
By contributing, you agree that your contributions will be licensed under the MIT License.