Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chris48s committed Dec 9, 2023
1 parent 300e50b commit 469c552
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 📦 0.4.0

* Add ability to search a requirements file.
It is now possible to invoke `pip-abandoned search -r requirements.txt`

## 📦 0.3.2

* Tested on python 3.12
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@ Some package registries like NPM and Packagist allow a user to mark a package as

## Usage

An example invocation of `pip-abandoned` looks like:

```bash
# Search a virtualenv path:
pip-abandoned search /home/alice/.virtualenvs/myproject/lib/python3.10/site-packages
```

```bash
# Search a requirements file:
pip-abandoned search -r /path/to/requirements.txt
```

When searching one or more requirements files, your packages will be installed into a temporary virtualenv. This means this search will include transitive dependencies.

## Exit Codes

`pip-abandoned search` exits with
Expand Down
14 changes: 12 additions & 2 deletions pip_abandoned/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import textwrap
from pathlib import Path

from . import lib
Expand All @@ -7,7 +8,7 @@

def get_parser():
parser = argparse.ArgumentParser(
description="Search for abandoned and deprecated python packages"
description="Search for abandoned and deprecated python packages",
)
parser.add_argument(
"--version", action="version", version=f"%(prog)s {__version__}"
Expand All @@ -17,7 +18,16 @@ def get_parser():
)

search = subparsers.add_parser(
"search", help="Search for abandoned and deprecated python packages"
"search",
help="Search for abandoned and deprecated python packages",
epilog=textwrap.dedent(
"""\
Examples:
pip-abandoned search myproject/lib/python3.10/site-packages
pip-abandoned search -r requirements.txt
"""
),
formatter_class=argparse.RawDescriptionHelpFormatter,
)

dep_source_args = search.add_mutually_exclusive_group()
Expand Down

0 comments on commit 469c552

Please sign in to comment.