Skip to content

Commit

Permalink
docs: move Contributing to docs (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkniewallner authored Jan 3, 2023
1 parent beec084 commit c426ae3
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 153 deletions.
143 changes: 0 additions & 143 deletions CONTRIBUTING.rst

This file was deleted.

18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>
<p align="center">
<img alt="deptry logo" width="460" height="300" src="https://raw.githubusercontent.com/fpgmaas/deptry/main/docs/static/deptry_Logo-01.svg">
</p>

Expand All @@ -19,7 +19,7 @@ Dependency issues are detected by scanning for imported modules within all Pytho

---
<p align="center">
<a href = "https://fpgmaas.github.io/deptry">Link to documentation</a>
<a href="https://fpgmaas.github.io/deptry">Documentation</a> - <a href="https://fpgmaas.github.io/deptry/contributing/">Contributing</a>
</p>

---
Expand All @@ -34,30 +34,28 @@ _deptry_ can be added to your project with
poetry add --group dev deptry
```

or with
or with:

```
```shell
<activate virtual environment>
pip install deptry
```

> **Warning**
> When using pip to install _deptry_, make sure you install it within the virtual environment of your project. Installing _deptry_ globally will not work, since it needs to have access to the metadata of the packages in the virtual environment.
> **Warning**: When using pip to install _deptry_, make sure you install it within the virtual environment of your project. Installing _deptry_ globally will not work, since it needs to have access to the metadata of the packages in the virtual environment.
### Prerequisites

_deptry_ should be run within the root directory of the project to be scanned, and the project should be running in its own dedicated virtual environment.

### Usage

To scan your project for dependency issues, run
To scan your project for dependency issues, run:

```sh
```shell
deptry .
```

_deptry_ can be configured by using additional command line arguments, or
by adding a `[tool.deptry]` section in _pyproject.toml_.
_deptry_ can be configured by using additional command line arguments, or by adding a `[tool.deptry]` section in _pyproject.toml_.

For more information, see the [documentation](https://fpgmaas.github.io/deptry/).

Expand Down
109 changes: 109 additions & 0 deletions docs/contributing.md
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.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ nav:
- Home: index.md
- Usage and Configuration: usage.md
- Issues detection: issues-detection.md
- Contributing: contributing.md

plugins:
- search
Expand Down

0 comments on commit c426ae3

Please sign in to comment.