uvpg 1.1.3__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,57 @@
1
+ name: Release and Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+
8
+ permissions:
9
+ contents: write
10
+ id-token: write
11
+
12
+ jobs:
13
+ lint:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v6
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v7
21
+
22
+ - name: Install dependencies
23
+ run: uv sync
24
+
25
+ - name: Run Ruff check
26
+ run: uv run ruff check .
27
+
28
+ - name: Run Ruff format check
29
+ run: uv run ruff format --check .
30
+
31
+ - name: Run Ty type check
32
+ run: uv run ty check
33
+
34
+ build-release:
35
+ runs-on: ubuntu-latest
36
+ needs: lint
37
+
38
+ steps:
39
+ - name: Checkout
40
+ uses: actions/checkout@v6
41
+
42
+ - name: Setup uv
43
+ uses: astral-sh/setup-uv@v7
44
+
45
+ - name: Build (wheel + sdist)
46
+ run: uv build
47
+
48
+ - name: Create GitHub Release and upload assets
49
+ uses: softprops/action-gh-release@v2
50
+ with:
51
+ generate_release_notes: true
52
+ files: |
53
+ dist/*.whl
54
+ dist/*.tar.gz
55
+
56
+ - name: Publish to PyPI
57
+ uses: pypa/gh-action-pypi-publish@release/v1
uvpg-1.1.3/.gitignore ADDED
@@ -0,0 +1,49 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ .eggs/
9
+
10
+ # Virtual environments
11
+ .env
12
+ .envrc
13
+ .venv
14
+ env/
15
+ venv/
16
+ ENV/
17
+ env.bak/
18
+ venv.bak/
19
+
20
+ # uv
21
+ .python-version
22
+
23
+ # Testing
24
+ htmlcov/
25
+ .tox/
26
+ .nox/
27
+ .coverage
28
+ .coverage.*
29
+ .cache
30
+ nosetests.xml
31
+ coverage.xml
32
+ *.cover
33
+ *.py.cover
34
+ .hypothesis/
35
+ .pytest_cache/
36
+ cover
37
+
38
+ # Ruff
39
+ .ruff_cache/
40
+
41
+ # IDEs
42
+ .idea/
43
+ *.swp
44
+ *.swo
45
+
46
+ # OS
47
+ .DS_Store
48
+ Thumbs.db
49
+ *.Identifier
@@ -0,0 +1,16 @@
1
+ {
2
+ // Search for extensions in the Marketplace: @recommended
3
+ "recommendations": [
4
+ "dracula-theme.theme-dracula",
5
+ "pkief.material-icon-theme",
6
+ "seunlanlege.action-buttons",
7
+ "mhutchie.git-graph",
8
+ "ms-python.python",
9
+ "formulahendry.code-runner",
10
+ "tamasfe.even-better-toml",
11
+ "charliermarsh.ruff",
12
+ "astral-sh.ty",
13
+ "tal7aouy.rainbow-bracket",
14
+ "ms-vscode-remote.remote-wsl"
15
+ ]
16
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ // VsCode general settings
3
+ "editor.fontSize": 14,
4
+ "window.zoomLevel": 0,
5
+ "explorer.compactFolders": false,
6
+ // Action Buttons settings
7
+ "actionButtons": {
8
+ "defaultColor": "Lime",
9
+ "reloadButton": "$(refresh)",
10
+ "commands": [
11
+ {
12
+ "name": "$(sync)",
13
+ "tooltip": "Reload Windows",
14
+ "useVsCodeApi": true,
15
+ "command": "workbench.action.reloadWindow"
16
+ },
17
+ {
18
+ "name": "$(trash)",
19
+ "tooltip": "Clean Project",
20
+ "singleInstance": true,
21
+ "cwd": "${workspaceFolder}",
22
+ "command": "make clean"
23
+ },
24
+ {
25
+ "name": "$(beaker)",
26
+ "tooltip": "Run Tests",
27
+ "singleInstance": true,
28
+ "cwd": "${workspaceFolder}",
29
+ "command": "uv run pytest"
30
+ },
31
+ {
32
+ "name": "$(check)",
33
+ "tooltip": "Lint Project",
34
+ "singleInstance": true,
35
+ "cwd": "${workspaceFolder}",
36
+ "command": "make check"
37
+ },
38
+ {
39
+ "name": "$(terminal)",
40
+ "tooltip": "Open New Terminal",
41
+ "useVsCodeApi": true,
42
+ "command": "workbench.action.terminal.new"
43
+ },
44
+ {
45
+ "name": "$(package)",
46
+ "tooltip": "UV Sync",
47
+ "singleInstance": true,
48
+ "cwd": "${workspaceFolder}",
49
+ "command": "uv sync"
50
+ },
51
+ {
52
+ "name": "$(build)",
53
+ "tooltip": "UV Build",
54
+ "singleInstance": true,
55
+ "cwd": "${workspaceFolder}",
56
+ "command": "make build"
57
+ },
58
+ {
59
+ "name": "$(run)",
60
+ "tooltip": "UV Run",
61
+ "singleInstance": true,
62
+ "cwd": "${workspaceFolder}",
63
+ "command": "uv run src/app/main.py"
64
+ },
65
+ {
66
+ "name": "$(debug-alt)",
67
+ "tooltip": "Run Watch Files",
68
+ "singleInstance": true,
69
+ "cwd": "${workspaceFolder}",
70
+ "command": "uv run watchfiles 'python src/app/main.py'"
71
+ }
72
+ ]
73
+ },
74
+ // Code Runner settings
75
+ "code-runner.clearPreviousOutput": true,
76
+ "code-runner.ignoreSelection": true,
77
+ "code-runner.saveFileBeforeRun": true,
78
+ "code-runner.runInTerminal": true,
79
+ "code-runner.preserveFocus": false,
80
+ "code-runner.executorMap": {
81
+ "python": "clear ; python -u"
82
+ },
83
+ // Python settings
84
+ "[python]": {
85
+ "editor.formatOnSave": true,
86
+ "editor.tabSize": 4,
87
+ "editor.insertSpaces": true,
88
+ "editor.codeActionsOnSave": {
89
+ "source.fixAll": "explicit",
90
+ "source.organizeImports": "explicit"
91
+ },
92
+ "editor.defaultFormatter": "charliermarsh.ruff"
93
+ },
94
+ "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
95
+ "python.analysis.autoImportCompletions": true,
96
+ "python.terminal.activateEnvInCurrentTerminal": true,
97
+ "python.terminal.activateEnvironment": true,
98
+ "python.languageServer": "None",
99
+ "python.venvPath": ".venv",
100
+ // Ty settings (https://docs.astral.sh/ty/reference/editor-settings)
101
+ "ty.disableLanguageServices": false,
102
+ "ty.diagnosticMode": "workspace"
103
+ }
uvpg-1.1.3/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lucas Maziero
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
uvpg-1.1.3/Makefile ADDED
@@ -0,0 +1,84 @@
1
+ # Makefile for uvpg development
2
+ .PHONY: help install sync lint format clean build security version
3
+
4
+ # Default target
5
+ .DEFAULT_GOAL := help
6
+
7
+ help: ## Show this help message
8
+ @echo "Available targets:"
9
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
10
+
11
+ sync: ## Sync dependencies
12
+ uv sync
13
+
14
+ install: ## Install the package (for testing after build)
15
+ uv tool install dist/uvpg-*.whl
16
+
17
+ lint: ## Run linters
18
+ uv run ruff check .
19
+
20
+ format: ## Format code
21
+ uv run ruff format .
22
+
23
+ type: ## Run type checker
24
+ uv run ty check .
25
+
26
+ security: ## Run security checks
27
+ @uvx bandit -r .
28
+ # @uvx bandit -r . -lll
29
+
30
+ clean: ## Clean build artifacts
31
+ @echo "✅ Clean build artifacts"
32
+ @find . -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true
33
+ @find . -type d -name '*.egg-info' -exec rm -rf {} + 2>/dev/null || true
34
+ @find . -type f -name '*.pyc' -delete 2>/dev/null || true
35
+ @find . -type d -name '.pytest_cache' -exec rm -rf {} + 2>/dev/null || true
36
+ @find . -type d -name '.ruff_cache' -exec rm -rf {} + 2>/dev/null || true
37
+ @find . -type f -name '*.Identifier' -delete 2>/dev/null || true
38
+ @find . -type d -name 'dist' -exec rm -rf {} + 2>/dev/null || true
39
+ @find . -type d -name 'build' -exec rm -rf {} + 2>/dev/null || true
40
+ @find . -type d -name 'coverage' -exec rm -rf {} + 2>/dev/null || true
41
+ @find . -type d -name 'htmlcov' -exec rm -rf {} + 2>/dev/null || true
42
+
43
+ build: clean ## Build package
44
+ uv build
45
+
46
+ version: ## Show current version
47
+ uv version
48
+
49
+ version-patch: ## Bump patch version (0.1.0 -> 0.1.1)
50
+ @echo "Bumping patch version..."
51
+ @uv version --bump patch --dry-run
52
+ @printf "Continue? [y/n] "
53
+ @read REPLY; \
54
+ if [ "$$REPLY" = "y" ] || [ "$$REPLY" = "Y" ]; then \
55
+ uv version --bump patch; \
56
+ else \
57
+ echo "Aborted."; \
58
+ fi
59
+
60
+ version-minor: ## Bump minor version (0.1.0 -> 0.2.0)
61
+ @echo "Bumping minor version..."
62
+ @uv version --bump minor --dry-run
63
+ @printf "Continue? [y/n] "
64
+ @read REPLY; \
65
+ echo; \
66
+ if [ "$$REPLY" = "y" ] || [ "$$REPLY" = "Y" ]; then \
67
+ uv version --bump minor; \
68
+ else \
69
+ echo "Aborted."; \
70
+ fi
71
+
72
+ version-major: ## Bump major version (0.1.0 -> 1.0.0)
73
+ @echo "Bumping major version..."
74
+ @uv version --bump major --dry-run
75
+ @printf "Continue? [y/n] "
76
+ @read REPLY; \
77
+ echo; \
78
+ if [ "$$REPLY" = "y" ] || [ "$$REPLY" = "Y" ]; then \
79
+ uv version --bump major; \
80
+ else \
81
+ echo "Aborted."; \
82
+ fi
83
+
84
+ check: format lint type ## Run all checks (lint, format, type)
uvpg-1.1.3/PKG-INFO ADDED
@@ -0,0 +1,207 @@
1
+ Metadata-Version: 2.4
2
+ Name: uvpg
3
+ Version: 1.1.3
4
+ Summary: UV Project Generator - Create Python monorepos with workspaces.
5
+ Project-URL: repository, https://github.com/lucasmaziero/uvpg
6
+ Author-email: Lucas Maziero <lucas.mazie.ro@hotmail.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Requires-Python: >=3.12
10
+ Description-Content-Type: text/markdown
11
+
12
+ # uvpg - UV Project Generator
13
+
14
+ [![PyPI version](https://img.shields.io/pypi/v/uvpg)](https://pypi.org/project/uvpg)
15
+ [![PyPI downloads](https://img.shields.io/pypi/dm/uvpg)](https://pypi.org/project/uvpg)
16
+ [![PyPI total downloads](https://img.shields.io/pepy/dt/uvpg)](https://pypi.org/project/uvpg)
17
+ [![License](https://img.shields.io/pypi/l/uvpg)](https://github.com/lucasmaziero/uvpg/blob/main/LICENSE)
18
+ [![Release and Publish](https://github.com/lucasmaziero/uvpg/actions/workflows/release.yml/badge.svg)](https://github.com/lucasmaziero/uvpg/actions/workflows/release.yml)
19
+
20
+ A CLI tool to scaffold Python monorepo projects using [uv](https://docs.astral.sh/uv) workspaces.
21
+
22
+ ## Features
23
+
24
+ - 🚀 Creates monorepo structure with uv workspaces
25
+ - 📦 Adds internal packages with automatic dependency registration
26
+ - 🐍 Configurable Python version
27
+ - 👤 Configurable author name and email
28
+ - 📄 MIT License auto-generated
29
+ - 🔧 Pre-configured tools: Ruff, Ty, pytest, coverage
30
+ - 💻 VSCode settings with recommended extensions
31
+ - 🖥️ Auto-detects OS for correct Python interpreter path
32
+ - 🐳 Docker support with multi-stage build and compose
33
+ - ⚡ FastAPI + Uvicorn basic example included
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ # Install from PyPI
39
+ pip install uvpg
40
+
41
+ # Or install from PyPI with uv
42
+ uv tool install uvpg
43
+
44
+ # Or clone the repository
45
+ git clone https://github.com/lucasmaziero/uvpg.git
46
+ cd uvpg
47
+
48
+ # Install with uv
49
+ uv sync
50
+ uv build
51
+ uv tool install dist/uvpg-*.whl
52
+
53
+ # Or install with pip
54
+ pip install dist/uvpg-*.whl
55
+ ```
56
+
57
+ ## Uninstall
58
+
59
+ ```bash
60
+ # Via uv
61
+ uv tool uninstall uvpg
62
+
63
+ # Via pip
64
+ pip uninstall uvpg
65
+ ```
66
+
67
+ ## Upgrade
68
+
69
+ ```bash
70
+ # Via pip
71
+ pip install --upgrade uvpg
72
+
73
+ # Via uv
74
+ uv tool upgrade uvpg
75
+ ```
76
+
77
+ ## Usage
78
+
79
+ ### Create a new project
80
+
81
+ ```bash
82
+ # Basic project
83
+ uvpg my-project
84
+
85
+ # With specific Python version
86
+ uvpg my-project --python 3.14
87
+
88
+ # With author information
89
+ uvpg my-project --author "John Doe" --email "john@example.com"
90
+
91
+ # With initial packages
92
+ uvpg my-project -p core -p utils -p api
93
+
94
+ # Combining options
95
+ uvpg my-project --python 3.14 --author "John Doe" --email "john@example.com" -p core
96
+ ```
97
+
98
+ ### Add packages to existing project
99
+
100
+ ```bash
101
+ cd my-project
102
+ uvpg . -p new-package
103
+ ```
104
+
105
+ ### Show version
106
+
107
+ ```bash
108
+ uvpg --version
109
+ ```
110
+
111
+ ### Show help
112
+
113
+ ```bash
114
+ uvpg --help
115
+ ```
116
+
117
+ ## Generated Structure
118
+
119
+ ```
120
+ my-project/
121
+ ├── .vscode/
122
+ │ ├── settings.json # VSCode settings (Ruff, Ty, Action Buttons)
123
+ │ └── extensions.json # Recommended extensions
124
+ ├── packages/
125
+ │ └── core/
126
+ │ ├── pyproject.toml
127
+ │ ├── src/
128
+ │ │ └── core/
129
+ │ │ ├── __init__.py
130
+ │ │ └── main.py
131
+ │ └── tests/
132
+ ├── src/
133
+ │ └── app/
134
+ │ ├── __init__.py
135
+ │ └── main.py # FastAPI application
136
+ ├── tests/
137
+ ├── .dockerignore
138
+ ├── .gitignore
139
+ ├── .python-version
140
+ ├── compose.yaml # Docker Compose config
141
+ ├── Dockerfile # Multi-stage Docker build
142
+ ├── LICENSE # MIT License
143
+ ├── Makefile # Build automation
144
+ ├── pyproject.toml # Root config with workspace
145
+ ├── README.md
146
+ └── uv.lock
147
+ ```
148
+
149
+ ## Configuration
150
+
151
+ The generated `pyproject.toml` includes:
152
+
153
+ - **FastAPI + Uvicorn** - Web framework and ASGI server
154
+ - **Ruff** - Linting with `select = ["ALL"]`
155
+ - **Ty** - Type checking
156
+ - **pytest** - Testing (commented, ready to enable)
157
+ - **coverage** - Code coverage (commented, ready to enable)
158
+ - **uv workspaces** - Monorepo package management
159
+ - **hatchling** - Build system
160
+
161
+ ## Docker
162
+
163
+ Run with Docker Compose:
164
+
165
+ ```bash
166
+ # Build and run
167
+ docker compose up --build
168
+
169
+ # Run with watch mode (auto-reload)
170
+ docker compose up --watch
171
+ ```
172
+
173
+ ## Requirements
174
+
175
+ - Python >= 3.12
176
+ - [uv](https://docs.astral.sh/uv/) package manager
177
+
178
+ ### Windows (for Makefile support)
179
+
180
+ ```bash
181
+ # Install Make
182
+ winget install --id=GnuWin32.Make -e
183
+
184
+ # Use Git Bash terminal for make commands. Launch from batch/command line:
185
+ start "" "%ProgramFiles%\Git\bin\bash.exe"
186
+ ```
187
+
188
+ ## Development
189
+
190
+ ```bash
191
+ # Clone
192
+ git clone https://github.com/lucasmaziero/uvpg.git
193
+ cd uvpg
194
+
195
+ # Install dependencies
196
+ uv sync
197
+
198
+ # Run locally
199
+ uv run uvpg --help
200
+
201
+ # Build
202
+ uv build
203
+ ```
204
+
205
+ ## License
206
+
207
+ MIT License - See [LICENSE](https://github.com/lucasmaziero/uvpg/blob/main/LICENSE) for details.