Skip to content

Commit 3cd285e

Browse files
DarkaMaulwoodruffw
andauthored
Rename to pypi-attestations (#25)
* Rename plugin to pypi-attestations * Add refactor commit to .git-blame-ignore-revs * README, cli: more renames Signed-off-by: William Woodruff <william@trailofbits.com> --------- Signed-off-by: William Woodruff <william@trailofbits.com> Co-authored-by: William Woodruff <william@trailofbits.com>
1 parent a2e48d3 commit 3cd285e

File tree

13 files changed

+45
-43
lines changed

13 files changed

+45
-43
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Renamed project to pypi-attestations
2+
2fefc5a178844cff0c0b4e192ca055e4816ca90d

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SHELL := /bin/bash
22

3-
PY_IMPORT = pypi_attestation_models
3+
PY_IMPORT = pypi_attestations
44

55
ALL_PY_SRCS := $(shell find src -name '*.py') \
66
$(shell find test -name '*.py')

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ python -m pip install pypi-attestation-models
1717
## Usage as a command line tool
1818

1919
````bash
20-
python -m pypi_attestation_models --help
21-
usage: pypi-attestation-models [-h] [-v] [-V] COMMAND ...
20+
python -m pypi_attestations --help
21+
usage: pypi-attestation [-h] [-v] [-V] COMMAND ...
2222

2323
Sign, inspect or verify PEP 740 attestations
2424

@@ -30,7 +30,7 @@ positional arguments:
3030

3131
options:
3232
-h, --help show this help message and exit
33-
-v, --verbose run with additional debug logging; supply multiple times to
33+
-v, --verbose run with additional debug logging; supply multiple times to
3434
increase verbosity (default: 0)
3535
-V, --version show program's version number and exit
3636
````
@@ -40,29 +40,29 @@ options:
4040
```bash
4141
# Generate a whl file
4242
make package
43-
python -m pypi_attestation_models sign dist/pypi_attestation_models-*.whl
43+
python -m pypi_attestations sign dist/pypi_attestations-*.whl
4444
```
4545
46-
_Note_: This will open a browser window to authenticate with the Sigstore
46+
_Note_: This will open a browser window to authenticate with the Sigstore
4747
OAuth flow.
4848
4949
### Inspecting a PEP 740 Attestation
5050
5151
```bash
52-
python -m pypi_attestation_models inspect dist/pypi_attestation_models-*.whl.publish.attestation
52+
python -m pypi_attestations inspect dist/pypi_attestations-*.whl.publish.attestation
5353
```
54-
_Warning_: Inspecting does not mean verifying. It only prints the structure of
54+
_Warning_: Inspecting does not mean verifying. It only prints the structure of
5555
the attestation.
5656
5757
### Verifying a PEP 740 Attestation
5858
5959
```bash
60-
python -m pypi_attestation_models verify --staging \
60+
python -m pypi_attestations verify --staging \
6161
--identity william@yossarian.net \
6262
test/assets/rfc8785-0.1.2-py3-none-any.whl
6363
```
64-
The attestation present in the test has been generated using the staging
65-
environment of Sigstore and signed by William.
64+
The attestation present in the test has been generated using the staging
65+
environment of Sigstore and signed by William.
6666
6767
## Usage as a library
6868
@@ -76,7 +76,7 @@ Use these APIs to create a PEP 740-compliant `Attestation` object by signing a P
7676
```python
7777
from pathlib import Path
7878
79-
from pypi_attestation_models import Attestation
79+
from pypi_attestations import Attestation
8080
from sigstore.oidc import Issuer
8181
from sigstore.sign import SigningContext
8282
from sigstore.verify import Verifier, policy
@@ -106,7 +106,7 @@ by signing a distribution file.
106106
107107
```python
108108
from pathlib import Path
109-
from pypi_attestation_models import Attestation
109+
from pypi_attestations import Attestation
110110
from sigstore.models import Bundle
111111
112112
# Sigstore Bundle -> PEP 740 Attestation object

pyproject.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["flit_core >=3.5,<4"]
33
build-backend = "flit_core.buildapi"
44

55
[project]
6-
name = "pypi-attestation-models"
6+
name = "pypi-attestations"
77
dynamic = ["version"]
88
description = "A library to convert between Sigstore Bundles and PEP-740 Attestation objects"
99
readme = "README.md"
@@ -35,28 +35,28 @@ lint = [
3535
"types-toml",
3636
"interrogate",
3737
]
38-
dev = ["pypi-attestation-models[doc,test,lint]", "twine", "wheel", "build"]
38+
dev = ["pypi-attestations[doc,test,lint]", "twine", "wheel", "build"]
3939

4040

4141
[project.urls]
42-
Homepage = "https://pypi.org/project/pypi-attestation-models"
43-
Documentation = "https://trailofbits.github.io/pypi-attestation-models/"
44-
Issues = "https://github.com/trailofbits/pypi-attestation-models/issues"
45-
Source = "https://github.com/trailofbits/pypi-attestation-models"
42+
Homepage = "https://pypi.org/project/pypi-attestations"
43+
Documentation = "https://trailofbits.github.io/pypi-attestations/"
44+
Issues = "https://github.com/trailofbits/pypi-attestations/issues"
45+
Source = "https://github.com/trailofbits/pypi-attestations"
4646

4747
[tool.flit.module]
48-
name = "pypi_attestation_models"
48+
name = "pypi_attestations"
4949

5050
[tool.coverage.run]
5151
# don't attempt code coverage for the CLI entrypoints
5252
omit = [
53-
"src/pypi_attestation_models/_cli.py",
54-
"src/pypi_attestation_models/__main__.py"
53+
"src/pypi_attestations/_cli.py",
54+
"src/pypi_attestations/__main__.py"
5555
]
5656

5757
[tool.mypy]
5858
mypy_path = "src"
59-
packages = "pypi_attestation_models"
59+
packages = "pypi_attestations"
6060
allow_redefinition = true
6161
check_untyped_defs = true
6262
disallow_incomplete_defs = true
@@ -99,8 +99,8 @@ ignore = ["ANN101", "ANN102", "D203", "D213", "COM812", "ISC001"]
9999
exclude = [
100100
"env",
101101
"test",
102-
"src/pypi_attestation_models/_cli.py",
103-
"src/pypi_attestation_models/__main__.py"
102+
"src/pypi_attestations/_cli.py",
103+
"src/pypi_attestations/__main__.py"
104104
]
105105
ignore-semiprivate = true
106106
fail-under = 100

src/pypi_attestation_models/__main__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/pypi_attestation_models/__init__.py renamed to src/pypi_attestations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""The `pypi-attestation-models` APIs."""
1+
"""The `pypi-attestations` APIs."""
22

33
__version__ = "0.0.5"
44

src/pypi_attestations/__main__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""The pypi-attestations entrypoint."""
2+
3+
if __name__ == "__main__":
4+
from pypi_attestations._cli import main
5+
6+
main()

src/pypi_attestation_models/_cli.py renamed to src/pypi_attestations/_cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from sigstore.sign import SigningContext
1414
from sigstore.verify import Verifier, policy
1515

16-
from pypi_attestation_models import Attestation, AttestationError, VerificationError, __version__
16+
from pypi_attestations import Attestation, AttestationError, VerificationError, __version__
1717

1818
if typing.TYPE_CHECKING:
1919
from collections.abc import Iterable
@@ -36,7 +36,7 @@ def _parser() -> argparse.ArgumentParser:
3636
)
3737

3838
parser = argparse.ArgumentParser(
39-
prog="pypi-attestation-models",
39+
prog="python -m pypi_attestations",
4040
description="Sign, inspect or verify PEP 740 attestations",
4141
parents=[parent_parser],
4242
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
@@ -46,7 +46,7 @@ def _parser() -> argparse.ArgumentParser:
4646
"-V",
4747
"--version",
4848
action="version",
49-
version=f"pypi-attestation-models {__version__}",
49+
version=f"pypi-attestations {__version__}",
5050
)
5151

5252
subcommands = parser.add_subparsers(

src/pypi_attestation_models/_impl.py renamed to src/pypi_attestations/_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Internal implementation module for `pypi-attestation-models`.
1+
"""Internal implementation module for `pypi-attestations`.
22
33
This module is NOT a public API, and is not considered stable.
44
"""
File renamed without changes.

0 commit comments

Comments
 (0)