uv-lock-report 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.4
2
+ Name: uv-lock-report
3
+ Version: 0.1.0
4
+ Summary: Add your description here
5
+ Requires-Python: >=3.13
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: packaging>=25.0
8
+ Requires-Dist: pydantic>=2.11.9
9
+
10
+ ## uv Lock Report
11
+
12
+ [![codecov](https://codecov.io/gh/mw-root/uv-lock-report/graph/badge.svg?token=QQFK62PQ8G)](https://codecov.io/gh/mw-root/uv-lock-report)
13
+
14
+ ## Description
15
+
16
+ <!-- AUTO-DOC-DESCRIPTION:START - Do not remove or modify this section -->
17
+
18
+ Digests complex `uv.lock` diffs in Pull Requests and provides a
19
+ simple summary of dependency changes as a PR comment.
20
+
21
+ <!-- AUTO-DOC-DESCRIPTION:END -->
22
+
23
+ Pull Requests with lockfile changes can be difficult to evaluate at a quick glance
24
+ and diffs are usually hidden by default.
25
+
26
+ This GitHub Action transforms complex `uv.lock` diffs into a clean, easy-to-read report.
27
+ It analyzes the changes between your base and head lockfiles, then posts a formatted comment showing exactly which packages were added, updated, or removed—including version changes and their severity (major, minor, or patch).
28
+
29
+ No more parsing through hundreds of lines of TOML diffs to understand what changed.
30
+
31
+
32
+ ## Example Gitlab Actions Usage
33
+
34
+ ```yaml
35
+ name: uv Lockfile Report
36
+
37
+ on:
38
+ pull_request:
39
+
40
+ permissions:
41
+ contents: read
42
+ pull-requests: write
43
+
44
+ jobs:
45
+ report:
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@v5
49
+ with:
50
+ fetch-depth: 0
51
+
52
+ - name: Report
53
+ uses: mw-root/uv-lock-report@v0.7.0
54
+ with:
55
+ github-token: ${{ secrets.GITHUB_TOKEN }}
56
+ ```
57
+
58
+ ## Inputs
59
+
60
+ <!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
61
+
62
+ | INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
63
+ |----------------------|--------|----------|------------|-----------------------------------------------------------------|
64
+ | github-token | string | true | | GitHub Token |
65
+ | output-format | string | false | `"simple"` | The output format of the report. <br>One of: simple, table |
66
+ | show-learn-more-link | string | false | `"true"` | Whether to show a "Learn More" <br>link in the report comment. |
67
+
68
+ <!-- AUTO-DOC-INPUT:END -->
69
+
70
+
71
+
72
+ ### Output Format Examples
73
+
74
+ The formatting can be chosen with the `output-format` input.
75
+
76
+ #### Simple Format ( Default )
77
+ ![Example Comment](images/uv-lock-report-simple-comment.png "Simple Format")
78
+
79
+
80
+ #### Table Format
81
+ ![Example Comment](images/uv-lock-report-table-comment.png "Table Format")
82
+
83
+ ## CLI Usage
84
+
85
+ You can also use `uv-lock-report` as a standalone CLI tool for local development or in custom CI/CD pipelines.
86
+
87
+ ### Installation
88
+
89
+ Install the package using uv:
90
+
91
+ ```bash
92
+ uv build
93
+ pip install ./dist/uv_lock_report-0.1.0-py3-none-any.whl
94
+ ```
95
+
96
+ ### Usage
97
+
98
+ ```bash
99
+ uv-lock-report --base-sha <git-sha> --base-path <path-to-base-lockfile> --output-path <output-file>
100
+ ```
101
+
102
+ #### Arguments
103
+
104
+ - `--base-sha`: Git SHA of the base commit to compare against
105
+ - `--base-path`: Path to the base lockfile (usually `uv.lock`)
106
+ - `--output-path`: Path where the JSON report will be written
107
+ - `--output-format`: Output format (`table` or `simple`, default: `table`)
108
+ - `--show-learn-more-link`: Whether to show "Learn More" link (`true` or `false`, default: `true`)
109
+
110
+ #### Example
111
+
112
+ ```bash
113
+ # Compare current uv.lock with the one from main branch
114
+ uv-lock-report \
115
+ --base-sha main \
116
+ --base-path uv.lock \
117
+ --output-path report.json \
118
+ --output-format table
119
+ ```
120
+
121
+ ### Testing the installation
122
+
123
+ You can test that the CLI is properly installed:
124
+
125
+ ```bash
126
+ # Test with a built wheel
127
+ uv run --with ./dist/uv_lock_report-0.1.0-py3-none-any.whl uv-lock-report --help
128
+
129
+ # Or run the included test script
130
+ uv run python test_cli_install.py
131
+ ```
@@ -0,0 +1,122 @@
1
+ ## uv Lock Report
2
+
3
+ [![codecov](https://codecov.io/gh/mw-root/uv-lock-report/graph/badge.svg?token=QQFK62PQ8G)](https://codecov.io/gh/mw-root/uv-lock-report)
4
+
5
+ ## Description
6
+
7
+ <!-- AUTO-DOC-DESCRIPTION:START - Do not remove or modify this section -->
8
+
9
+ Digests complex `uv.lock` diffs in Pull Requests and provides a
10
+ simple summary of dependency changes as a PR comment.
11
+
12
+ <!-- AUTO-DOC-DESCRIPTION:END -->
13
+
14
+ Pull Requests with lockfile changes can be difficult to evaluate at a quick glance
15
+ and diffs are usually hidden by default.
16
+
17
+ This GitHub Action transforms complex `uv.lock` diffs into a clean, easy-to-read report.
18
+ It analyzes the changes between your base and head lockfiles, then posts a formatted comment showing exactly which packages were added, updated, or removed—including version changes and their severity (major, minor, or patch).
19
+
20
+ No more parsing through hundreds of lines of TOML diffs to understand what changed.
21
+
22
+
23
+ ## Example Gitlab Actions Usage
24
+
25
+ ```yaml
26
+ name: uv Lockfile Report
27
+
28
+ on:
29
+ pull_request:
30
+
31
+ permissions:
32
+ contents: read
33
+ pull-requests: write
34
+
35
+ jobs:
36
+ report:
37
+ runs-on: ubuntu-latest
38
+ steps:
39
+ - uses: actions/checkout@v5
40
+ with:
41
+ fetch-depth: 0
42
+
43
+ - name: Report
44
+ uses: mw-root/uv-lock-report@v0.7.0
45
+ with:
46
+ github-token: ${{ secrets.GITHUB_TOKEN }}
47
+ ```
48
+
49
+ ## Inputs
50
+
51
+ <!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
52
+
53
+ | INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
54
+ |----------------------|--------|----------|------------|-----------------------------------------------------------------|
55
+ | github-token | string | true | | GitHub Token |
56
+ | output-format | string | false | `"simple"` | The output format of the report. <br>One of: simple, table |
57
+ | show-learn-more-link | string | false | `"true"` | Whether to show a "Learn More" <br>link in the report comment. |
58
+
59
+ <!-- AUTO-DOC-INPUT:END -->
60
+
61
+
62
+
63
+ ### Output Format Examples
64
+
65
+ The formatting can be chosen with the `output-format` input.
66
+
67
+ #### Simple Format ( Default )
68
+ ![Example Comment](images/uv-lock-report-simple-comment.png "Simple Format")
69
+
70
+
71
+ #### Table Format
72
+ ![Example Comment](images/uv-lock-report-table-comment.png "Table Format")
73
+
74
+ ## CLI Usage
75
+
76
+ You can also use `uv-lock-report` as a standalone CLI tool for local development or in custom CI/CD pipelines.
77
+
78
+ ### Installation
79
+
80
+ Install the package using uv:
81
+
82
+ ```bash
83
+ uv build
84
+ pip install ./dist/uv_lock_report-0.1.0-py3-none-any.whl
85
+ ```
86
+
87
+ ### Usage
88
+
89
+ ```bash
90
+ uv-lock-report --base-sha <git-sha> --base-path <path-to-base-lockfile> --output-path <output-file>
91
+ ```
92
+
93
+ #### Arguments
94
+
95
+ - `--base-sha`: Git SHA of the base commit to compare against
96
+ - `--base-path`: Path to the base lockfile (usually `uv.lock`)
97
+ - `--output-path`: Path where the JSON report will be written
98
+ - `--output-format`: Output format (`table` or `simple`, default: `table`)
99
+ - `--show-learn-more-link`: Whether to show "Learn More" link (`true` or `false`, default: `true`)
100
+
101
+ #### Example
102
+
103
+ ```bash
104
+ # Compare current uv.lock with the one from main branch
105
+ uv-lock-report \
106
+ --base-sha main \
107
+ --base-path uv.lock \
108
+ --output-path report.json \
109
+ --output-format table
110
+ ```
111
+
112
+ ### Testing the installation
113
+
114
+ You can test that the CLI is properly installed:
115
+
116
+ ```bash
117
+ # Test with a built wheel
118
+ uv run --with ./dist/uv_lock_report-0.1.0-py3-none-any.whl uv-lock-report --help
119
+
120
+ # Or run the included test script
121
+ uv run python test_cli_install.py
122
+ ```
@@ -0,0 +1,24 @@
1
+ [project]
2
+ name = "uv-lock-report"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ dependencies = [
8
+ "packaging>=25.0",
9
+ "pydantic>=2.11.9",
10
+ ]
11
+
12
+ [tool.setuptools.packages.find]
13
+ where = ["uv_lock_report"]
14
+
15
+
16
+ [project.scripts]
17
+ uv-lock-report = "uv_lock_report.cli:main"
18
+
19
+
20
+ [tool.ruff]
21
+
22
+ [dependency-groups]
23
+ dev = [{ include-group = "test" }]
24
+ test = ["pytest>=8.4.2", "pytest-cov>=7.0.0"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
@@ -0,0 +1,134 @@
1
+ from uv_lock_report.models import LockfilePackage, OutputFormat, UpdatedPackage
2
+
3
+ ADDED_PACKAGES: list[LockfilePackage] = [
4
+ LockfilePackage(name="added_1", version="1.0.0"),
5
+ LockfilePackage(name="added_2", version="4.2.0"),
6
+ ]
7
+ REMOVED_PACKAGES: list[LockfilePackage] = [
8
+ LockfilePackage(name="removed_1", version="1.0.0"),
9
+ LockfilePackage(name="removed_2", version="4.2.0"),
10
+ ]
11
+ UPDATED_PACKAGES: list[UpdatedPackage] = [
12
+ UpdatedPackage(name="updated_1", old_version="1.0.0", new_version="2.0.0"),
13
+ UpdatedPackage(name="updated_2", old_version="1.0.0", new_version="2.0.0"),
14
+ ]
15
+
16
+ EXPECTED_LOCKFILE_CHANGES_FULL_TABLE = """
17
+ ## uv Lockfile Report
18
+ ### Added Packages
19
+ | Package | Version |
20
+ |--|--|
21
+ | added_1 | 1.0.0 |
22
+ | added_2 | 4.2.0 |
23
+ ### Changed Packages
24
+ | Package | Old Version | New Version |
25
+ |--|--|--|
26
+ | updated_1 | 1.0.0 | 2.0.0 |
27
+ | updated_2 | 1.0.0 | 2.0.0 |
28
+ ### Removed Packages
29
+ | Package | Version |
30
+ |--|--|
31
+ | removed_1 | 1.0.0 |
32
+ | removed_2 | 4.2.0 |
33
+ """.strip()
34
+
35
+ EXPECTED_LOCKFILE_CHANGES_FULL_SIMPLE = """
36
+ ## uv Lockfile Report
37
+ ### Added Packages
38
+ \\`added_1\\`: \\`1.0.0\\`
39
+ \\`added_2\\`: \\`4.2.0\\`
40
+ ### Changed Packages
41
+ :collision: \\`updated_1\\`: \\`1.0.0\\` -> \\`2.0.0\\`
42
+ :collision: \\`updated_2\\`: \\`1.0.0\\` -> \\`2.0.0\\`
43
+ ### Removed Packages
44
+ \\`removed_1\\`: \\`1.0.0\\`
45
+ \\`removed_2\\`: \\`4.2.0\\`
46
+ """.strip()
47
+
48
+
49
+ EXPECTED_LOCKFILE_CHANGES_FULL_SIMPLE_WITH_LINK = """
50
+ ## uv Lockfile Report
51
+ ### Added Packages
52
+ \\`added_1\\`: \\`1.0.0\\`
53
+ \\`added_2\\`: \\`4.2.0\\`
54
+ ### Changed Packages
55
+ :collision: \\`updated_1\\`: \\`1.0.0\\` -> \\`2.0.0\\`
56
+ :collision: \\`updated_2\\`: \\`1.0.0\\` -> \\`2.0.0\\`
57
+ ### Removed Packages
58
+ \\`removed_1\\`: \\`1.0.0\\`
59
+ \\`removed_2\\`: \\`4.2.0\\`
60
+
61
+ ---
62
+ Learn more about this report at https://github.com/mw-root/uv-lock-report
63
+ """.strip()
64
+
65
+
66
+ EXPECTED_LOCKFILE_CHANGES_FULL_MODEL_DUMP_TABLE = {
67
+ "added": [
68
+ {"name": "added_1", "version": "1.0.0"},
69
+ {"name": "added_2", "version": "4.2.0"},
70
+ ],
71
+ "items": 6,
72
+ "learn_more_link_text": "\n---\nLearn more about this report at https://github.com/mw-root/uv-lock-report",
73
+ "markdown": EXPECTED_LOCKFILE_CHANGES_FULL_TABLE,
74
+ "markdown_simple": EXPECTED_LOCKFILE_CHANGES_FULL_SIMPLE,
75
+ "markdown_table": EXPECTED_LOCKFILE_CHANGES_FULL_TABLE,
76
+ "output_format": OutputFormat.TABLE,
77
+ "removed": [
78
+ {"name": "removed_1", "version": "1.0.0"},
79
+ {"name": "removed_2", "version": "4.2.0"},
80
+ ],
81
+ "requires_python": {"new": None, "old": None},
82
+ "show_learn_more_link": False,
83
+ "updated": [
84
+ {"name": "updated_1", "new_version": "2.0.0", "old_version": "1.0.0"},
85
+ {"name": "updated_2", "new_version": "2.0.0", "old_version": "1.0.0"},
86
+ ],
87
+ }
88
+
89
+
90
+ EXPECTED_LOCKFILE_CHANGES_FULL_MODEL_DUMP_SIMPLE = {
91
+ "added": [
92
+ {"name": "added_1", "version": "1.0.0"},
93
+ {"name": "added_2", "version": "4.2.0"},
94
+ ],
95
+ "items": 6,
96
+ "learn_more_link_text": "\n---\nLearn more about this report at https://github.com/mw-root/uv-lock-report",
97
+ "markdown": EXPECTED_LOCKFILE_CHANGES_FULL_SIMPLE,
98
+ "markdown_simple": EXPECTED_LOCKFILE_CHANGES_FULL_SIMPLE,
99
+ "markdown_table": EXPECTED_LOCKFILE_CHANGES_FULL_TABLE,
100
+ "output_format": OutputFormat.SIMPLE,
101
+ "removed": [
102
+ {"name": "removed_1", "version": "1.0.0"},
103
+ {"name": "removed_2", "version": "4.2.0"},
104
+ ],
105
+ "requires_python": {"new": None, "old": None},
106
+ "show_learn_more_link": False,
107
+ "updated": [
108
+ {"name": "updated_1", "new_version": "2.0.0", "old_version": "1.0.0"},
109
+ {"name": "updated_2", "new_version": "2.0.0", "old_version": "1.0.0"},
110
+ ],
111
+ }
112
+
113
+ EXPECTED_LOCKFILE_CHANGES_FULL_MODEL_DUMP_SIMPLE_WITH_LINK = {
114
+ "added": [
115
+ {"name": "added_1", "version": "1.0.0"},
116
+ {"name": "added_2", "version": "4.2.0"},
117
+ ],
118
+ "items": 6,
119
+ "learn_more_link_text": "\n---\nLearn more about this report at https://github.com/mw-root/uv-lock-report",
120
+ "markdown": EXPECTED_LOCKFILE_CHANGES_FULL_SIMPLE_WITH_LINK,
121
+ "markdown_simple": EXPECTED_LOCKFILE_CHANGES_FULL_SIMPLE_WITH_LINK,
122
+ "markdown_table": EXPECTED_LOCKFILE_CHANGES_FULL_TABLE,
123
+ "output_format": OutputFormat.SIMPLE,
124
+ "removed": [
125
+ {"name": "removed_1", "version": "1.0.0"},
126
+ {"name": "removed_2", "version": "4.2.0"},
127
+ ],
128
+ "requires_python": {"new": None, "old": None},
129
+ "show_learn_more_link": True,
130
+ "updated": [
131
+ {"name": "updated_1", "new_version": "2.0.0", "old_version": "1.0.0"},
132
+ {"name": "updated_2", "new_version": "2.0.0", "old_version": "1.0.0"},
133
+ ],
134
+ }