Skip to content

Commit

Permalink
Added usage example to README and index of docs (#370)
Browse files Browse the repository at this point in the history
* Added usage example to README and index of docs
* changed terminal to console for syntax highlighting
  • Loading branch information
fpgmaas authored May 8, 2023
1 parent e3608e5 commit 6ae3d47
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,13 @@ Dependency issues are detected by scanning for imported modules within all Pytho

### Installation

_deptry_ can be added to your project with
To add _deptry_ to your project, run one of the following commands:

```shell
# Install with poetry
poetry add --group dev deptry
```

or with:

```shell
<activate virtual environment>
# Install with pip
pip install deptry
```

Expand All @@ -55,9 +52,20 @@ To scan your project for dependency issues, run:
deptry .
```

_deptry_ can be configured by using additional command line arguments, or by adding a `[tool.deptry]` section in _pyproject.toml_.
Example output could look as follows:

```console
Scanning 2 files...

foo/bar.py:1:0: DEP004 'numpy' imported but declared as a dev dependency
foo/bar.py:2:0: DEP001 'matplotlib' imported but missing from the dependency definitions
pyproject.toml: DEP002 'pandas' defined as a dependency but not used in the codebase
Found 3 dependency issues.
```

### Configuration

For more information, see the [documentation](https://fpgmaas.github.io/deptry/).
_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 [Usage and Configuration](https://fpgmaas.github.io/deptry/usage/) section of the documentation..

---

Expand Down
21 changes: 16 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ Dependency issues are detected by scanning for imported modules within all Pytho

### Installation

_deptry_ can be added to your project with:
To add _deptry_ to your project, run one of the following commands:

```shell
# Install with poetry
poetry add --group dev deptry
```

or with:

```shell
# Install with pip
pip install deptry
```

Expand All @@ -60,5 +58,18 @@ To scan your project for dependency issues, run
deptry .
```

Example output could look as follows:

```console
Scanning 2 files...

foo/bar.py:1:0: DEP004 'numpy' imported but declared as a dev dependency
foo/bar.py:2:0: DEP001 'matplotlib' imported but missing from the dependency definitions
pyproject.toml: DEP002 'pandas' defined as a dependency but not used in the codebase
Found 3 dependency issues.
```

### Configuration

_deptry_ can be configured by using additional command line arguments, or
by adding a `[tool.deptry]` section in `pyproject.toml`. For more information, see [Usage and Configuration](./usage.md)

0 comments on commit 6ae3d47

Please sign in to comment.