uvrev 0.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.
uvrev-0.1/.gitignore ADDED
@@ -0,0 +1,219 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+ .uv-cache/
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ # Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ # poetry.lock
109
+ # poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ # pdm.lock
116
+ # pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ # pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ # .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ # .vscode/
203
+
204
+ # Ruff stuff:
205
+ .ruff_cache/
206
+
207
+ # PyPI configuration file
208
+ .pypirc
209
+
210
+ # Marimo
211
+ marimo/_static/
212
+ marimo/_lsp/
213
+ __marimo__/
214
+
215
+ # Streamlit
216
+ .streamlit/secrets.toml
217
+
218
+ # IDEA
219
+ .idea/
@@ -0,0 +1,80 @@
1
+ stages:
2
+ - test
3
+ - publish
4
+
5
+ # Template: https://docs.astral.sh/uv/guides/integration/gitlab/#using-the-uv-image
6
+ # Key points:
7
+ # - Use ghcr.io/astral-sh/uv:<UV_VERSION>-python<PYTHON_VERSION>-<BASE_LAYER>
8
+ # - Set UV_LINK_MODE=copy for GitLab’s mount behavior
9
+ variables:
10
+ UV_VERSION: "0.9.23"
11
+ BASE_LAYER: "trixie"
12
+ UV_LINK_MODE: "copy"
13
+ UV_CACHE_DIR: "${CI_PROJECT_DIR}/.uv-cache"
14
+
15
+ default:
16
+ image: "ghcr.io/astral-sh/uv:${UV_VERSION}-python${PYTHON_VERSION}-${BASE_LAYER}"
17
+ cache:
18
+ - key:
19
+ files:
20
+ - uv.lock
21
+ prefix: "uv-${PYTHON_VERSION}"
22
+ paths:
23
+ - $UV_CACHE_DIR
24
+
25
+ # -------------------------
26
+ # Tests (matrix 3.12..3.14)
27
+ # -------------------------
28
+ test:
29
+ stage: test
30
+ parallel:
31
+ matrix:
32
+ - PYTHON_VERSION: ["3.12", "3.13", "3.14"]
33
+ script:
34
+ - uv run --locked pre-commit run --all-files
35
+
36
+ after_script:
37
+ # Recommended by Astral to keep cache size under control in CI
38
+ - uv cache prune --ci
39
+ artifacts:
40
+ when: always
41
+ paths:
42
+ - htmlcov/
43
+ - coverage.xml
44
+ reports:
45
+ coverage_report:
46
+ coverage_format: cobertura
47
+ path: coverage.xml
48
+
49
+ # -------------------------
50
+ # Publish to PyPI (Trusted Publisher / OIDC)
51
+ # -------------------------
52
+ publish:pypi:
53
+ stage: publish
54
+ # Build/publish once (pick a stable version for publishing)
55
+ variables:
56
+ PYTHON_VERSION: "3.12"
57
+ rules:
58
+ # Typical choice: publish only for tags
59
+ - if: $CI_COMMIT_TAG
60
+ # Request an OIDC token from GitLab with the audience expected by PyPI ("pypi")
61
+ # This matches PyPI's GitLab Trusted Publishing guidance.
62
+ id_tokens:
63
+ PYPI_ID_TOKEN:
64
+ aud: pypi
65
+ environment:
66
+ name: 'release'
67
+ url: 'https://pypi.org/project/uvrev'
68
+ script:
69
+ # If your tooling expects CI_JOB_JWT_V2, map the token (safe no-op if unused).
70
+ - export CI_JOB_JWT_V2="$PYPI_ID_TOKEN"
71
+
72
+ # Build distributions
73
+ - uv build
74
+
75
+ # Publish using Trusted Publishing (OIDC). No API token needed if PyPI Trusted Publisher is configured.
76
+ - uv publish --trusted-publishing=always
77
+ artifacts:
78
+ when: always
79
+ paths:
80
+ - dist/
@@ -0,0 +1,56 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: ruff-format
5
+ name: ruff format
6
+ entry: uv run ruff format .
7
+ language: system
8
+ pass_filenames: false
9
+
10
+ - id: ruff-fix
11
+ name: ruff fix
12
+ entry: uv run ruff check --fix --quiet --exit-zero .
13
+ language: system
14
+ pass_filenames: false
15
+
16
+ - id: ruff-check
17
+ name: ruff check
18
+ entry: uv run ruff check .
19
+ language: system
20
+ pass_filenames: false
21
+
22
+ - id: mypy
23
+ name: mypy
24
+ entry: uv run mypy .
25
+ language: system
26
+ pass_filenames: false
27
+
28
+ # Run doctests under coverage (no reports yet; just collect data)
29
+ - id: pytest-doctest
30
+ name: pytest (doctest src)
31
+ entry: uv run coverage run --parallel-mode --source=src -m pytest --doctest-modules src
32
+ language: system
33
+ pass_filenames: false
34
+
35
+ # Run tests under coverage (no reports yet; just collect data)
36
+ - id: pytest-tests
37
+ name: pytest (tests)
38
+ entry: uv run coverage run --parallel-mode --source=src -m pytest tests
39
+ language: system
40
+ pass_filenames: false
41
+
42
+ # Combine + always output coverage + always generate HTML + enforce minimum
43
+ # Runs alone AFTER all other hooks (pre-commit will not run it concurrently).
44
+ - id: coverage-report
45
+ name: coverage (combine, html, report, fail-under)
46
+ entry: >
47
+ bash -c
48
+ 'uv run coverage combine &&
49
+ uv run coverage html --fail-under=0 &&
50
+ uv run coverage xml --fail-under=0 &&
51
+ uv run coverage report --show-missing'
52
+ language: system
53
+ verbose: true
54
+ pass_filenames: false
55
+ require_serial: true
56
+
@@ -0,0 +1 @@
1
+ 3.12
uvrev-0.1/PKG-INFO ADDED
@@ -0,0 +1,136 @@
1
+ Metadata-Version: 2.4
2
+ Name: uvrev
3
+ Version: 0.1
4
+ Summary: uv env manager to enable conda-style revision tracking
5
+ Author-email: Carli* Freudenberg <kound@posteo.de>
6
+ License-Expression: MIT
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Natural Language :: English
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: Implementation :: CPython
20
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.12
24
+ Requires-Dist: click>=8
25
+ Requires-Dist: platformdirs>=4
26
+ Requires-Dist: tomlkit>=0.13
27
+ Description-Content-Type: text/markdown
28
+
29
+ # uvrev
30
+
31
+ **uvrev** is a CLI tool that wraps the **uv** package manager and adds **git-based, conda-style revision tracking** for Python environments.
32
+
33
+ It allows you to manage UV projects as isolated environments with a full, inspectable revision history. Every package change (add, remove, update) creates a new Git commit and tag, making it easy to understand what changed and to roll back to any previous state.
34
+
35
+ ---
36
+
37
+ ## Overview
38
+
39
+ - Manage UV environments with automatic revision tracking
40
+ - Track dependency changes over time using Git
41
+ - Restore environments to any previous revision
42
+ - Inspect package history in a familiar conda-style format
43
+
44
+ Each environment is stored as a Git repository. Dependency changes are committed automatically, providing a complete and auditable history of your environment state.
45
+
46
+ ---
47
+
48
+ ## Installation
49
+
50
+ ### Prerequisites
51
+
52
+ - `git`
53
+ - `uv`
54
+
55
+ ### Install with uv
56
+
57
+ ```bash
58
+ uv tool install uvrev
59
+ ```
60
+
61
+ After installation, ensure that `uvrev` is available on your `PATH`:
62
+
63
+ ```bash
64
+ uvrev --help
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Key Features
70
+
71
+ - Conda-style revision history showing added, removed, and updated packages
72
+ - Git-based storage with automatic commits and tags
73
+ - Rollback to any previous revision
74
+ - Detailed changelog tracking both dependencies and pinned versions
75
+
76
+ ---
77
+
78
+ ## Commands
79
+
80
+ | Command | Description |
81
+ |--------------------|-------------|
82
+ | `uvrev env create` | Create a new UV project with revision tracking |
83
+ | `uvrev env list` | List all UV projects |
84
+ | `uvrev add` | Add packages to the current project |
85
+ | `uvrev remove` | Remove packages from the current project |
86
+ | `uvrev sync` | Sync project dependencies |
87
+ | `uvrev list` | List installed packages in the current environment |
88
+ | `uvrev history` | Show revision history with package changes |
89
+ | `uvrev restore` | Restore project to a specific revision |
90
+ | `uvrev path` | Show the path to the current project |
91
+ | `uvrev run` | Run uv commands in the project |
92
+
93
+ ---
94
+
95
+ ## Environment Selection
96
+
97
+ `uvrev` determines the active environment based on the **currently activated virtual environment**.
98
+
99
+ Activate an environment as usual:
100
+
101
+ ```bash
102
+ source .venv/bin/activate
103
+ ```
104
+
105
+ Once activated, all `uvrev` commands operate on that environment automatically. No additional flags or environment variables are required.
106
+
107
+ This mirrors standard Python workflows and avoids implicit global state.
108
+
109
+ ---
110
+
111
+ ## Examples
112
+
113
+ ```bash
114
+ uvrev env create myproject --python 3.12
115
+
116
+ # activate venv
117
+ source "$(uvrev path -e myproject)/.venv/bin/activate"
118
+
119
+ uvrev add pandas numpy
120
+ uvrev add requests
121
+
122
+ uvrev list
123
+ uvrev history
124
+ uvrev restore 3
125
+ uvrev run pip list
126
+ ```
127
+
128
+ ---
129
+
130
+ ## Why uvrev?
131
+
132
+ `uvrev` combines the speed and simplicity of **uv** with the safety and transparency of **Git**, giving you:
133
+
134
+ - Reproducible environments
135
+ - Clear insight into dependency changes
136
+ - Confidence to experiment, knowing you can always roll back
uvrev-0.1/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # uvrev
2
+
3
+ **uvrev** is a CLI tool that wraps the **uv** package manager and adds **git-based, conda-style revision tracking** for Python environments.
4
+
5
+ It allows you to manage UV projects as isolated environments with a full, inspectable revision history. Every package change (add, remove, update) creates a new Git commit and tag, making it easy to understand what changed and to roll back to any previous state.
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ - Manage UV environments with automatic revision tracking
12
+ - Track dependency changes over time using Git
13
+ - Restore environments to any previous revision
14
+ - Inspect package history in a familiar conda-style format
15
+
16
+ Each environment is stored as a Git repository. Dependency changes are committed automatically, providing a complete and auditable history of your environment state.
17
+
18
+ ---
19
+
20
+ ## Installation
21
+
22
+ ### Prerequisites
23
+
24
+ - `git`
25
+ - `uv`
26
+
27
+ ### Install with uv
28
+
29
+ ```bash
30
+ uv tool install uvrev
31
+ ```
32
+
33
+ After installation, ensure that `uvrev` is available on your `PATH`:
34
+
35
+ ```bash
36
+ uvrev --help
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Key Features
42
+
43
+ - Conda-style revision history showing added, removed, and updated packages
44
+ - Git-based storage with automatic commits and tags
45
+ - Rollback to any previous revision
46
+ - Detailed changelog tracking both dependencies and pinned versions
47
+
48
+ ---
49
+
50
+ ## Commands
51
+
52
+ | Command | Description |
53
+ |--------------------|-------------|
54
+ | `uvrev env create` | Create a new UV project with revision tracking |
55
+ | `uvrev env list` | List all UV projects |
56
+ | `uvrev add` | Add packages to the current project |
57
+ | `uvrev remove` | Remove packages from the current project |
58
+ | `uvrev sync` | Sync project dependencies |
59
+ | `uvrev list` | List installed packages in the current environment |
60
+ | `uvrev history` | Show revision history with package changes |
61
+ | `uvrev restore` | Restore project to a specific revision |
62
+ | `uvrev path` | Show the path to the current project |
63
+ | `uvrev run` | Run uv commands in the project |
64
+
65
+ ---
66
+
67
+ ## Environment Selection
68
+
69
+ `uvrev` determines the active environment based on the **currently activated virtual environment**.
70
+
71
+ Activate an environment as usual:
72
+
73
+ ```bash
74
+ source .venv/bin/activate
75
+ ```
76
+
77
+ Once activated, all `uvrev` commands operate on that environment automatically. No additional flags or environment variables are required.
78
+
79
+ This mirrors standard Python workflows and avoids implicit global state.
80
+
81
+ ---
82
+
83
+ ## Examples
84
+
85
+ ```bash
86
+ uvrev env create myproject --python 3.12
87
+
88
+ # activate venv
89
+ source "$(uvrev path -e myproject)/.venv/bin/activate"
90
+
91
+ uvrev add pandas numpy
92
+ uvrev add requests
93
+
94
+ uvrev list
95
+ uvrev history
96
+ uvrev restore 3
97
+ uvrev run pip list
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Why uvrev?
103
+
104
+ `uvrev` combines the speed and simplicity of **uv** with the safety and transparency of **Git**, giving you:
105
+
106
+ - Reproducible environments
107
+ - Clear insight into dependency changes
108
+ - Confidence to experiment, knowing you can always roll back