-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
beec084
commit c426ae3
Showing
4 changed files
with
118 additions
and
153 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Contributing | ||
|
||
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. | ||
|
||
You can contribute in many ways. | ||
|
||
## Types of contributions | ||
|
||
### Reporting bugs | ||
|
||
Report bugs at https://github.com/fpgmaas/deptry/issues. | ||
|
||
If you are reporting a bug, please include: | ||
|
||
* Your operating system name and version. | ||
* Any details about your local setup that might be helpful in troubleshooting. | ||
* Detailed steps to reproduce the bug. | ||
|
||
### Fixing bugs | ||
|
||
Look through the GitHub issues for bugs. Anything tagged with `bug` and `help wanted` is open to whoever wants to implement a fix for it. | ||
|
||
### Implementing features | ||
|
||
Look through the GitHub issues for features. Anything tagged with `enhancement` and `help wanted` is open to whoever wants to implement it. | ||
|
||
### Writing documentation | ||
|
||
_deptry_ could always use more documentation, whether as part of the official documentation, in docstrings, or even on the web in blog posts, articles, and such. | ||
|
||
### Submitting feedback | ||
|
||
The best way to send feedback is to file an issue at https://github.com/fpgmaas/deptry/issues. | ||
|
||
If you are proposing a new feature: | ||
|
||
* Explain in detail how it would work. | ||
* Keep the scope as narrow as possible, to make it easier to implement. | ||
* Remember that this is a volunteer-driven project, and that contributions are welcome :) | ||
|
||
## Get started! | ||
|
||
Ready to contribute? Here's how to set up _deptry_ for local development. Please note this documentation assumes you already have [Poetry](https://python-poetry.org/) and [Git](https://git-scm.com/) installed and ready to go. | ||
|
||
1. [Fork](https://github.com/fpgmaas/deptry/fork) the _deptry_ repository on GitHub. | ||
|
||
2. Clone your fork locally: | ||
```bash | ||
cd <directory_in_which_repo_should_be_created> | ||
git clone git@github.com:YOUR_NAME/deptry.git | ||
``` | ||
|
||
3. Now you need to set up your local environment. Navigate into the directory: | ||
```bash | ||
cd deptry | ||
``` | ||
|
||
If you are using [pyenv](https://github.com/pyenv/pyenv), select a version to use locally (see installed versions with `pyenv versions`): | ||
```bash | ||
pyenv local <x.y.z> | ||
``` | ||
|
||
Then, install the virtual environment with: | ||
```bash | ||
poetry install | ||
``` | ||
|
||
4. Install [pre-commit](https://pre-commit.com/) to run linters/formatters at commit time: | ||
```bash | ||
poetry run pre-commit install | ||
``` | ||
|
||
5. Create a branch for local development: | ||
```bash | ||
git checkout -b name-of-your-bugfix-or-feature | ||
``` | ||
|
||
Now you can make your changes locally. | ||
|
||
6. If you are adding a feature or fixing a bug, make sure to add tests in the `tests` directory. | ||
|
||
7. Once you're done, validate that all unit tests are passing: | ||
```bash | ||
make test | ||
``` | ||
8. Before submitting a pull request, you should also run [tox](https://tox.wiki/en/latest/). This will run the tests across all the Python versions that _deptry_ supports: | ||
```bash | ||
tox | ||
``` | ||
This requires you to have multiple versions of Python installed. | ||
This step is also triggered in the CI pipeline, so you could also choose to skip this step locally. | ||
9. Commit your changes and push your branch to GitHub: | ||
```bash | ||
git add . | ||
git commit -m "Your detailed description of your changes." | ||
git push origin name-of-your-bugfix-or-feature | ||
``` | ||
10. Submit a pull request through GitHub. | ||
## Pull request guidelines | ||
Before you submit a pull request, ensure that it meets the following guidelines: | ||
1. If the pull request adds a functionality or fixes a bug, the pull request should include tests. | ||
2. If the pull request adds a functionality, the documentation in `docs` directory should probably be updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters