First off, thank you for taking the time to contribute to snk! We welcome contributions of all kinds, including bug reports, feature requests, documentation improvements, and code contributions.
This document outlines the process and guidelines for contributing to the project to ensure that everything goes smoothly.
Please note that this project follows a Code of Conduct. By participating in this project, you agree to abide by its terms. Be respectful to others in all interactions.
Snk and Snk-CLI are sister projects. Snk is the command line tool that is used to install and manage the Snk-CLIs. Snk depends on Snk-CLI but Snk-CLI can be used without Snk. If you'd like to contribute to the Snk-CLI then you should make your changes in the snk-cli repository. If you'd like to makes changes to the way Snk installs and manages Snk-CLIs then you should make your changes in the snk repository.
If you find a bug in snk, please open an issue with a clear and detailed description of the problem. When reporting bugs, please include the following:
- A descriptive title
- Steps to reproduce the issue
- Expected and actual behavior
- Any relevant screenshots or error messages
- The environment details (e.g., OS, Python version)
We welcome ideas to improve the project. If you have a feature request, open an issue with:
- A descriptive title
- A clear explanation of the proposed feature
- Why it would be useful for other users
- Any potential implementation details (if you have ideas on how to implement it)
We encourage code contributions that improve the functionality, performance, or readability of snk and snk-cli. To contribute code, follow these steps:
Note
The same contribution guidelines apply to both snk and snk-cli. If you are contributing to snk-cli, please make your changes in the snk-cli repository.
- Fork the repository to your GitHub account by clicking the "Fork" button at the top of the repository page.
- Clone the fork to your local machine:
git clone https://github.com/your-username/snk.git
cd snk
snk uses Hatch for managing dependencies and development tasks. Activate the development environment:
hatch shell
Create a new branch for your changes. Use a descriptive branch name based on the type of contribution, such as:
feature/your-feature-name
bugfix/issue-number-description
docs/update-readme
git checkout -b feature/your-feature-name
- Make the necessary changes to the codebase.
- Ensure that your changes are properly tested. Refer to the Running Tests section.
- Follow the project's Style Guide.
- Update the documentation if needed.
Before submitting your changes, make sure all tests pass:
hatch run test
To run tests with coverage:
hatch run cov
If you are adding new features, please write tests for them to ensure code quality and to help future maintainers.
Once your changes are ready, push your branch to your fork:
git push origin feature/your-feature-name
Go to your fork on GitHub, and you should see an option to create a pull request (PR). Follow the instructions to open a PR. Be sure to include:
- A clear title and description of what your PR does (start with a gitmoji)
- A reference to any related issues (e.g.,
Closes #123
) - A summary of the changes you’ve made
Please follow these guidelines to keep the codebase consistent and clean:
-
Code Formatting: Adhere to the Python PEP 8 style guide. Use
ruff
for auto-formatting if needed:hatch run format
Here is a general development workflow for contributing to snk:
- Open an Issue: If your contribution is significant (new feature, large refactor, etc.), discuss it first by creating an issue.
- Fork and Branch: Fork the repository, create a new branch for your contribution.
- Make Changes: Make your changes in the branch and commit regularly.
- Test Your Changes: Ensure that existing tests pass and write new ones for your changes.
- Open a Pull Request: Once you're satisfied with your changes, submit a pull request.
- Code Review: Your pull request will undergo review. You may be asked to make revisions.
- Merge: After approval, your pull request will be merged into the main branch.
Thank you again for contributing to snk! We appreciate your time and effort in making this project better for everyone.