gitinspect 0.1.0__tar.gz → 0.1.1__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.
- {gitinspect-0.1.0 → gitinspect-0.1.1}/PKG-INFO +19 -19
- {gitinspect-0.1.0 → gitinspect-0.1.1}/README.md +18 -18
- {gitinspect-0.1.0 → gitinspect-0.1.1}/pyproject.toml +1 -1
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/gitinspect.egg-info/PKG-INFO +19 -19
- {gitinspect-0.1.0 → gitinspect-0.1.1}/setup.cfg +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/diffenv/__init__.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/diffenv/api.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/diffenv/cli.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/diffenv/diff_layer.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/diffenv/exceptions.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/diffenv/formatter_layer.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/diffenv/git_layer.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/diffenv/logging_config.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/diffenv/models.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/diffenv/parser_layer.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/gitinspect.egg-info/SOURCES.txt +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/gitinspect.egg-info/dependency_links.txt +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/gitinspect.egg-info/entry_points.txt +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/gitinspect.egg-info/requires.txt +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/src/gitinspect.egg-info/top_level.txt +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/tests/test_api.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/tests/test_diff_layer.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/tests/test_exceptions.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/tests/test_formatter_layer.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/tests/test_git_layer.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/tests/test_models.py +0 -0
- {gitinspect-0.1.0 → gitinspect-0.1.1}/tests/test_parser_layer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitinspect
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Compare environment-level changes between two git branches or commits
|
|
5
5
|
Author-email: Naman Bhola <bhola.naman02@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -30,12 +30,12 @@ Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
|
|
|
30
30
|
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
31
31
|
Requires-Dist: twine>=5.0.0; extra == "dev"
|
|
32
32
|
|
|
33
|
-
#
|
|
33
|
+
# GitInspect
|
|
34
34
|
|
|
35
35
|
Compare environment-level changes between two git branches or commits — dependencies, environment variables, and Python runtime version — in one unified view. No more manually diffing `requirements.txt`, `.env.example`, and `.python-version` across branches by hand.
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
|
|
38
|
+
gitinspect main feature/new-auth
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
```text
|
|
@@ -53,12 +53,12 @@ Python Runtime
|
|
|
53
53
|
|
|
54
54
|
## Why
|
|
55
55
|
|
|
56
|
-
When reviewing a PR or preparing to merge a branch, "what changed in the environment" is usually scattered across several files and requires manual cross-referencing. `
|
|
56
|
+
When reviewing a PR or preparing to merge a branch, "what changed in the environment" is usually scattered across several files and requires manual cross-referencing. `gitinspect` reads both refs directly from git (no checkout required) and reports only what's environment-relevant, in one pass.
|
|
57
57
|
|
|
58
58
|
## Installation
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
pip install
|
|
61
|
+
pip install gitinspect
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Requires Python 3.10+ and git installed and available on `PATH`.
|
|
@@ -66,7 +66,7 @@ Requires Python 3.10+ and git installed and available on `PATH`.
|
|
|
66
66
|
## CLI usage
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
|
|
69
|
+
gitinspect <ref_old> <ref_new> [OPTIONS]
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
| Option | Description | Default |
|
|
@@ -80,27 +80,27 @@ gitaudit <ref_old> <ref_new> [OPTIONS]
|
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
82
|
# Compare two branches with colored terminal output
|
|
83
|
-
|
|
83
|
+
gitinspect main feature/new-auth
|
|
84
84
|
|
|
85
85
|
# Plain text — safe for piping/redirecting
|
|
86
|
-
|
|
86
|
+
gitinspect main feature/new-auth --format text > changes.txt
|
|
87
87
|
|
|
88
88
|
# JSON — for CI pipelines or scripting
|
|
89
|
-
|
|
89
|
+
gitinspect main feature/new-auth --format json | jq '.dependencies'
|
|
90
90
|
|
|
91
91
|
# Compare commits or tags directly
|
|
92
|
-
|
|
92
|
+
gitinspect v1.2.0 v1.3.0
|
|
93
93
|
|
|
94
94
|
# Run against a repo elsewhere on disk
|
|
95
|
-
|
|
95
|
+
gitinspect main develop --repo-path ~/projects/my-app
|
|
96
96
|
|
|
97
97
|
# Non-interactive: auto-fetch missing refs instead of prompting
|
|
98
|
-
|
|
98
|
+
gitinspect main origin-only-branch --auto-fetch
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
### Exit codes
|
|
102
102
|
|
|
103
|
-
`
|
|
103
|
+
`gitinspect` is CI-friendly: it exits `0` when no environment changes are found, and `1` when changes are detected — useful for gating a build on "did the environment change without sign-off."
|
|
104
104
|
|
|
105
105
|
| Code | Meaning |
|
|
106
106
|
|---|---|
|
|
@@ -110,7 +110,7 @@ gitaudit main origin-only-branch --auto-fetch
|
|
|
110
110
|
|
|
111
111
|
### Missing branches
|
|
112
112
|
|
|
113
|
-
If a ref doesn't exist locally, `
|
|
113
|
+
If a ref doesn't exist locally, `gitinspect` will:
|
|
114
114
|
|
|
115
115
|
1. Check whether it exists on the `origin` remote.
|
|
116
116
|
2. Prompt you to confirm fetching it (unless `--auto-fetch` is set).
|
|
@@ -121,7 +121,7 @@ No raw git errors are ever shown — only clean, actionable messages.
|
|
|
121
121
|
## Python SDK
|
|
122
122
|
|
|
123
123
|
```python
|
|
124
|
-
from
|
|
124
|
+
from gitinspect import compare
|
|
125
125
|
|
|
126
126
|
# Get a structured result
|
|
127
127
|
result = compare("main", "feature/new-auth")
|
|
@@ -136,8 +136,8 @@ json_str = compare("main", "feature/new-auth", output_format="json")
|
|
|
136
136
|
By default, the SDK auto-fetches missing refs (`auto_fetch=True`) since scripted use can't respond to an interactive prompt. Pass `auto_fetch=False` to raise `RefNotFoundError` instead.
|
|
137
137
|
|
|
138
138
|
```python
|
|
139
|
-
from
|
|
140
|
-
from
|
|
139
|
+
from gitinspect import compare
|
|
140
|
+
from gitinspect.exceptions import RefNotFoundError, NotAGitRepoError, ParseError
|
|
141
141
|
|
|
142
142
|
try:
|
|
143
143
|
result = compare("main", "feature/x", repo_path="/path/to/repo")
|
|
@@ -200,7 +200,7 @@ Tests are split into fast unit tests (`test_models.py`, `test_parser_layer.py`,
|
|
|
200
200
|
|
|
201
201
|
```bash
|
|
202
202
|
# Run with coverage
|
|
203
|
-
pytest --cov=
|
|
203
|
+
pytest --cov=gitinspect --cov-report=term-missing
|
|
204
204
|
|
|
205
205
|
# Run only fast unit tests, skipping integration tests that shell out to git
|
|
206
206
|
pytest tests/test_models.py tests/test_parser_layer.py tests/test_diff_layer.py tests/test_formatter_layer.py tests/test_exceptions.py
|
|
@@ -220,7 +220,7 @@ twine check dist/*
|
|
|
220
220
|
|
|
221
221
|
# 4. Upload to TestPyPI first (recommended)
|
|
222
222
|
twine upload --repository testpypi dist/*
|
|
223
|
-
pip install --index-url https://test.pypi.org/simple/
|
|
223
|
+
pip install --index-url https://test.pypi.org/simple/ gitinspect
|
|
224
224
|
|
|
225
225
|
# 5. Upload to the real PyPI
|
|
226
226
|
twine upload dist/*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# GitInspect
|
|
2
2
|
|
|
3
3
|
Compare environment-level changes between two git branches or commits — dependencies, environment variables, and Python runtime version — in one unified view. No more manually diffing `requirements.txt`, `.env.example`, and `.python-version` across branches by hand.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
|
|
6
|
+
gitinspect main feature/new-auth
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
```text
|
|
@@ -21,12 +21,12 @@ Python Runtime
|
|
|
21
21
|
|
|
22
22
|
## Why
|
|
23
23
|
|
|
24
|
-
When reviewing a PR or preparing to merge a branch, "what changed in the environment" is usually scattered across several files and requires manual cross-referencing. `
|
|
24
|
+
When reviewing a PR or preparing to merge a branch, "what changed in the environment" is usually scattered across several files and requires manual cross-referencing. `gitinspect` reads both refs directly from git (no checkout required) and reports only what's environment-relevant, in one pass.
|
|
25
25
|
|
|
26
26
|
## Installation
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
pip install
|
|
29
|
+
pip install gitinspect
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Requires Python 3.10+ and git installed and available on `PATH`.
|
|
@@ -34,7 +34,7 @@ Requires Python 3.10+ and git installed and available on `PATH`.
|
|
|
34
34
|
## CLI usage
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
|
|
37
|
+
gitinspect <ref_old> <ref_new> [OPTIONS]
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
| Option | Description | Default |
|
|
@@ -48,27 +48,27 @@ gitaudit <ref_old> <ref_new> [OPTIONS]
|
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
# Compare two branches with colored terminal output
|
|
51
|
-
|
|
51
|
+
gitinspect main feature/new-auth
|
|
52
52
|
|
|
53
53
|
# Plain text — safe for piping/redirecting
|
|
54
|
-
|
|
54
|
+
gitinspect main feature/new-auth --format text > changes.txt
|
|
55
55
|
|
|
56
56
|
# JSON — for CI pipelines or scripting
|
|
57
|
-
|
|
57
|
+
gitinspect main feature/new-auth --format json | jq '.dependencies'
|
|
58
58
|
|
|
59
59
|
# Compare commits or tags directly
|
|
60
|
-
|
|
60
|
+
gitinspect v1.2.0 v1.3.0
|
|
61
61
|
|
|
62
62
|
# Run against a repo elsewhere on disk
|
|
63
|
-
|
|
63
|
+
gitinspect main develop --repo-path ~/projects/my-app
|
|
64
64
|
|
|
65
65
|
# Non-interactive: auto-fetch missing refs instead of prompting
|
|
66
|
-
|
|
66
|
+
gitinspect main origin-only-branch --auto-fetch
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
### Exit codes
|
|
70
70
|
|
|
71
|
-
`
|
|
71
|
+
`gitinspect` is CI-friendly: it exits `0` when no environment changes are found, and `1` when changes are detected — useful for gating a build on "did the environment change without sign-off."
|
|
72
72
|
|
|
73
73
|
| Code | Meaning |
|
|
74
74
|
|---|---|
|
|
@@ -78,7 +78,7 @@ gitaudit main origin-only-branch --auto-fetch
|
|
|
78
78
|
|
|
79
79
|
### Missing branches
|
|
80
80
|
|
|
81
|
-
If a ref doesn't exist locally, `
|
|
81
|
+
If a ref doesn't exist locally, `gitinspect` will:
|
|
82
82
|
|
|
83
83
|
1. Check whether it exists on the `origin` remote.
|
|
84
84
|
2. Prompt you to confirm fetching it (unless `--auto-fetch` is set).
|
|
@@ -89,7 +89,7 @@ No raw git errors are ever shown — only clean, actionable messages.
|
|
|
89
89
|
## Python SDK
|
|
90
90
|
|
|
91
91
|
```python
|
|
92
|
-
from
|
|
92
|
+
from gitinspect import compare
|
|
93
93
|
|
|
94
94
|
# Get a structured result
|
|
95
95
|
result = compare("main", "feature/new-auth")
|
|
@@ -104,8 +104,8 @@ json_str = compare("main", "feature/new-auth", output_format="json")
|
|
|
104
104
|
By default, the SDK auto-fetches missing refs (`auto_fetch=True`) since scripted use can't respond to an interactive prompt. Pass `auto_fetch=False` to raise `RefNotFoundError` instead.
|
|
105
105
|
|
|
106
106
|
```python
|
|
107
|
-
from
|
|
108
|
-
from
|
|
107
|
+
from gitinspect import compare
|
|
108
|
+
from gitinspect.exceptions import RefNotFoundError, NotAGitRepoError, ParseError
|
|
109
109
|
|
|
110
110
|
try:
|
|
111
111
|
result = compare("main", "feature/x", repo_path="/path/to/repo")
|
|
@@ -168,7 +168,7 @@ Tests are split into fast unit tests (`test_models.py`, `test_parser_layer.py`,
|
|
|
168
168
|
|
|
169
169
|
```bash
|
|
170
170
|
# Run with coverage
|
|
171
|
-
pytest --cov=
|
|
171
|
+
pytest --cov=gitinspect --cov-report=term-missing
|
|
172
172
|
|
|
173
173
|
# Run only fast unit tests, skipping integration tests that shell out to git
|
|
174
174
|
pytest tests/test_models.py tests/test_parser_layer.py tests/test_diff_layer.py tests/test_formatter_layer.py tests/test_exceptions.py
|
|
@@ -188,7 +188,7 @@ twine check dist/*
|
|
|
188
188
|
|
|
189
189
|
# 4. Upload to TestPyPI first (recommended)
|
|
190
190
|
twine upload --repository testpypi dist/*
|
|
191
|
-
pip install --index-url https://test.pypi.org/simple/
|
|
191
|
+
pip install --index-url https://test.pypi.org/simple/ gitinspect
|
|
192
192
|
|
|
193
193
|
# 5. Upload to the real PyPI
|
|
194
194
|
twine upload dist/*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitinspect
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Compare environment-level changes between two git branches or commits
|
|
5
5
|
Author-email: Naman Bhola <bhola.naman02@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -30,12 +30,12 @@ Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
|
|
|
30
30
|
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
31
31
|
Requires-Dist: twine>=5.0.0; extra == "dev"
|
|
32
32
|
|
|
33
|
-
#
|
|
33
|
+
# GitInspect
|
|
34
34
|
|
|
35
35
|
Compare environment-level changes between two git branches or commits — dependencies, environment variables, and Python runtime version — in one unified view. No more manually diffing `requirements.txt`, `.env.example`, and `.python-version` across branches by hand.
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
|
|
38
|
+
gitinspect main feature/new-auth
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
```text
|
|
@@ -53,12 +53,12 @@ Python Runtime
|
|
|
53
53
|
|
|
54
54
|
## Why
|
|
55
55
|
|
|
56
|
-
When reviewing a PR or preparing to merge a branch, "what changed in the environment" is usually scattered across several files and requires manual cross-referencing. `
|
|
56
|
+
When reviewing a PR or preparing to merge a branch, "what changed in the environment" is usually scattered across several files and requires manual cross-referencing. `gitinspect` reads both refs directly from git (no checkout required) and reports only what's environment-relevant, in one pass.
|
|
57
57
|
|
|
58
58
|
## Installation
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
pip install
|
|
61
|
+
pip install gitinspect
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Requires Python 3.10+ and git installed and available on `PATH`.
|
|
@@ -66,7 +66,7 @@ Requires Python 3.10+ and git installed and available on `PATH`.
|
|
|
66
66
|
## CLI usage
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
|
|
69
|
+
gitinspect <ref_old> <ref_new> [OPTIONS]
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
| Option | Description | Default |
|
|
@@ -80,27 +80,27 @@ gitaudit <ref_old> <ref_new> [OPTIONS]
|
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
82
|
# Compare two branches with colored terminal output
|
|
83
|
-
|
|
83
|
+
gitinspect main feature/new-auth
|
|
84
84
|
|
|
85
85
|
# Plain text — safe for piping/redirecting
|
|
86
|
-
|
|
86
|
+
gitinspect main feature/new-auth --format text > changes.txt
|
|
87
87
|
|
|
88
88
|
# JSON — for CI pipelines or scripting
|
|
89
|
-
|
|
89
|
+
gitinspect main feature/new-auth --format json | jq '.dependencies'
|
|
90
90
|
|
|
91
91
|
# Compare commits or tags directly
|
|
92
|
-
|
|
92
|
+
gitinspect v1.2.0 v1.3.0
|
|
93
93
|
|
|
94
94
|
# Run against a repo elsewhere on disk
|
|
95
|
-
|
|
95
|
+
gitinspect main develop --repo-path ~/projects/my-app
|
|
96
96
|
|
|
97
97
|
# Non-interactive: auto-fetch missing refs instead of prompting
|
|
98
|
-
|
|
98
|
+
gitinspect main origin-only-branch --auto-fetch
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
### Exit codes
|
|
102
102
|
|
|
103
|
-
`
|
|
103
|
+
`gitinspect` is CI-friendly: it exits `0` when no environment changes are found, and `1` when changes are detected — useful for gating a build on "did the environment change without sign-off."
|
|
104
104
|
|
|
105
105
|
| Code | Meaning |
|
|
106
106
|
|---|---|
|
|
@@ -110,7 +110,7 @@ gitaudit main origin-only-branch --auto-fetch
|
|
|
110
110
|
|
|
111
111
|
### Missing branches
|
|
112
112
|
|
|
113
|
-
If a ref doesn't exist locally, `
|
|
113
|
+
If a ref doesn't exist locally, `gitinspect` will:
|
|
114
114
|
|
|
115
115
|
1. Check whether it exists on the `origin` remote.
|
|
116
116
|
2. Prompt you to confirm fetching it (unless `--auto-fetch` is set).
|
|
@@ -121,7 +121,7 @@ No raw git errors are ever shown — only clean, actionable messages.
|
|
|
121
121
|
## Python SDK
|
|
122
122
|
|
|
123
123
|
```python
|
|
124
|
-
from
|
|
124
|
+
from gitinspect import compare
|
|
125
125
|
|
|
126
126
|
# Get a structured result
|
|
127
127
|
result = compare("main", "feature/new-auth")
|
|
@@ -136,8 +136,8 @@ json_str = compare("main", "feature/new-auth", output_format="json")
|
|
|
136
136
|
By default, the SDK auto-fetches missing refs (`auto_fetch=True`) since scripted use can't respond to an interactive prompt. Pass `auto_fetch=False` to raise `RefNotFoundError` instead.
|
|
137
137
|
|
|
138
138
|
```python
|
|
139
|
-
from
|
|
140
|
-
from
|
|
139
|
+
from gitinspect import compare
|
|
140
|
+
from gitinspect.exceptions import RefNotFoundError, NotAGitRepoError, ParseError
|
|
141
141
|
|
|
142
142
|
try:
|
|
143
143
|
result = compare("main", "feature/x", repo_path="/path/to/repo")
|
|
@@ -200,7 +200,7 @@ Tests are split into fast unit tests (`test_models.py`, `test_parser_layer.py`,
|
|
|
200
200
|
|
|
201
201
|
```bash
|
|
202
202
|
# Run with coverage
|
|
203
|
-
pytest --cov=
|
|
203
|
+
pytest --cov=gitinspect --cov-report=term-missing
|
|
204
204
|
|
|
205
205
|
# Run only fast unit tests, skipping integration tests that shell out to git
|
|
206
206
|
pytest tests/test_models.py tests/test_parser_layer.py tests/test_diff_layer.py tests/test_formatter_layer.py tests/test_exceptions.py
|
|
@@ -220,7 +220,7 @@ twine check dist/*
|
|
|
220
220
|
|
|
221
221
|
# 4. Upload to TestPyPI first (recommended)
|
|
222
222
|
twine upload --repository testpypi dist/*
|
|
223
|
-
pip install --index-url https://test.pypi.org/simple/
|
|
223
|
+
pip install --index-url https://test.pypi.org/simple/ gitinspect
|
|
224
224
|
|
|
225
225
|
# 5. Upload to the real PyPI
|
|
226
226
|
twine upload dist/*
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|