identity-plan-kit 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.
Files changed (156) hide show
  1. identity_plan_kit-0.1.0/.gitignore +172 -0
  2. identity_plan_kit-0.1.0/Makefile +158 -0
  3. identity_plan_kit-0.1.0/PKG-INFO +514 -0
  4. identity_plan_kit-0.1.0/README.md +455 -0
  5. identity_plan_kit-0.1.0/alembic/env.py +131 -0
  6. identity_plan_kit-0.1.0/alembic/script.py.mako +28 -0
  7. identity_plan_kit-0.1.0/alembic/versions/20250124_000000_initial_schema.py +424 -0
  8. identity_plan_kit-0.1.0/alembic.ini +76 -0
  9. identity_plan_kit-0.1.0/examples/integration/__init__.py +1 -0
  10. identity_plan_kit-0.1.0/examples/integration/fastapi_integration.py +548 -0
  11. identity_plan_kit-0.1.0/examples/integration/sample_alembic_env.py +254 -0
  12. identity_plan_kit-0.1.0/examples/integration/webhook_integration.py +517 -0
  13. identity_plan_kit-0.1.0/examples/playing/basic_usage.py +152 -0
  14. identity_plan_kit-0.1.0/examples/playing/extending_models.html +252 -0
  15. identity_plan_kit-0.1.0/examples/playing/extension_example.py +432 -0
  16. identity_plan_kit-0.1.0/examples/prod/.env.production.example +143 -0
  17. identity_plan_kit-0.1.0/examples/prod/Dockerfile +102 -0
  18. identity_plan_kit-0.1.0/examples/prod/docker-compose.yml +248 -0
  19. identity_plan_kit-0.1.0/examples/prod/nginx.conf +302 -0
  20. identity_plan_kit-0.1.0/examples/prod/production_setup.py +678 -0
  21. identity_plan_kit-0.1.0/examples/prod/prometheus.yml +75 -0
  22. identity_plan_kit-0.1.0/loadtests/README.md +224 -0
  23. identity_plan_kit-0.1.0/loadtests/__init__.py +42 -0
  24. identity_plan_kit-0.1.0/loadtests/config.py +98 -0
  25. identity_plan_kit-0.1.0/loadtests/locustfile.py +164 -0
  26. identity_plan_kit-0.1.0/loadtests/test_auth.py +274 -0
  27. identity_plan_kit-0.1.0/loadtests/test_database_stress.py +468 -0
  28. identity_plan_kit-0.1.0/loadtests/test_mixed_scenarios.py +475 -0
  29. identity_plan_kit-0.1.0/loadtests/test_plans_quota.py +310 -0
  30. identity_plan_kit-0.1.0/loadtests/test_quota_direct.py +258 -0
  31. identity_plan_kit-0.1.0/loadtests/test_rbac_cache.py +337 -0
  32. identity_plan_kit-0.1.0/loadtests/utils.py +254 -0
  33. identity_plan_kit-0.1.0/pyproject.toml +166 -0
  34. identity_plan_kit-0.1.0/src/identity_plan_kit/__init__.py +126 -0
  35. identity_plan_kit-0.1.0/src/identity_plan_kit/admin/__init__.py +72 -0
  36. identity_plan_kit-0.1.0/src/identity_plan_kit/admin/views.py +853 -0
  37. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/__init__.py +36 -0
  38. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/dependencies.py +139 -0
  39. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/domain/__init__.py +1 -0
  40. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/domain/entities.py +130 -0
  41. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/domain/exceptions.py +77 -0
  42. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/dto/__init__.py +15 -0
  43. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/dto/requests.py +44 -0
  44. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/dto/responses.py +147 -0
  45. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/handlers/__init__.py +5 -0
  46. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/handlers/oauth_routes.py +394 -0
  47. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/models/__init__.py +11 -0
  48. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/models/refresh_token.py +93 -0
  49. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/models/user.py +66 -0
  50. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/models/user_provider.py +53 -0
  51. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/repositories/__init__.py +9 -0
  52. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/repositories/token_repo.py +201 -0
  53. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/repositories/user_repo.py +398 -0
  54. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/services/__init__.py +9 -0
  55. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/services/auth_service.py +557 -0
  56. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/services/oauth_service.py +355 -0
  57. identity_plan_kit-0.1.0/src/identity_plan_kit/auth/uow.py +59 -0
  58. identity_plan_kit-0.1.0/src/identity_plan_kit/cli.py +384 -0
  59. identity_plan_kit-0.1.0/src/identity_plan_kit/config.py +542 -0
  60. identity_plan_kit-0.1.0/src/identity_plan_kit/kit.py +574 -0
  61. identity_plan_kit-0.1.0/src/identity_plan_kit/migrations.py +249 -0
  62. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/__init__.py +41 -0
  63. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/dependencies.py +152 -0
  64. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/domain/__init__.py +1 -0
  65. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/domain/entities.py +136 -0
  66. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/domain/exceptions.py +116 -0
  67. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/dto/__init__.py +5 -0
  68. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/dto/usage.py +60 -0
  69. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/models/__init__.py +17 -0
  70. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/models/feature.py +31 -0
  71. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/models/feature_usage.py +72 -0
  72. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/models/plan.py +48 -0
  73. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/models/plan_limit.py +61 -0
  74. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/models/plan_permission.py +49 -0
  75. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/models/user_plan.py +86 -0
  76. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/repositories/__init__.py +6 -0
  77. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/repositories/plan_repo.py +439 -0
  78. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/repositories/usage_repo.py +299 -0
  79. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/services/__init__.py +5 -0
  80. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/services/plan_service.py +570 -0
  81. identity_plan_kit-0.1.0/src/identity_plan_kit/plans/uow.py +47 -0
  82. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/__init__.py +23 -0
  83. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/cache/__init__.py +5 -0
  84. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/cache/permission_cache.py +392 -0
  85. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/dependencies.py +127 -0
  86. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/domain/__init__.py +1 -0
  87. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/domain/entities.py +63 -0
  88. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/domain/exceptions.py +56 -0
  89. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/models/__init__.py +11 -0
  90. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/models/permission.py +34 -0
  91. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/models/role.py +42 -0
  92. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/models/role_permission.py +49 -0
  93. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/repositories/__init__.py +5 -0
  94. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/repositories/rbac_repo.py +206 -0
  95. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/services/__init__.py +5 -0
  96. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/services/rbac_service.py +231 -0
  97. identity_plan_kit-0.1.0/src/identity_plan_kit/rbac/uow.py +43 -0
  98. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/__init__.py +157 -0
  99. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/audit.py +404 -0
  100. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/circuit_breaker.py +251 -0
  101. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/cleanup_scheduler.py +337 -0
  102. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/database.py +396 -0
  103. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/exception_handlers.py +416 -0
  104. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/exceptions.py +82 -0
  105. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/graceful_shutdown.py +327 -0
  106. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/health.py +257 -0
  107. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/http_utils.py +63 -0
  108. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/lockout.py +354 -0
  109. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/logging.py +123 -0
  110. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/metrics.py +420 -0
  111. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/models.py +100 -0
  112. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/rate_limiter.py +130 -0
  113. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/request_id.py +121 -0
  114. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/schemas.py +127 -0
  115. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/security.py +251 -0
  116. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/state_store.py +574 -0
  117. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/uow.py +142 -0
  118. identity_plan_kit-0.1.0/src/identity_plan_kit/shared/uuid7.py +38 -0
  119. identity_plan_kit-0.1.0/tests/__init__.py +1 -0
  120. identity_plan_kit-0.1.0/tests/auth/__init__.py +1 -0
  121. identity_plan_kit-0.1.0/tests/auth/test_auth_service.py +638 -0
  122. identity_plan_kit-0.1.0/tests/auth/test_circuit_breaker.py +161 -0
  123. identity_plan_kit-0.1.0/tests/auth/test_csrf_state.py +101 -0
  124. identity_plan_kit-0.1.0/tests/auth/test_dependencies.py +211 -0
  125. identity_plan_kit-0.1.0/tests/auth/test_domain_entities.py +255 -0
  126. identity_plan_kit-0.1.0/tests/auth/test_http_utils.py +152 -0
  127. identity_plan_kit-0.1.0/tests/auth/test_lockout.py +345 -0
  128. identity_plan_kit-0.1.0/tests/auth/test_oauth_service_resilience.py +337 -0
  129. identity_plan_kit-0.1.0/tests/auth/test_security_comprehensive.py +627 -0
  130. identity_plan_kit-0.1.0/tests/auth/test_token_security.py +187 -0
  131. identity_plan_kit-0.1.0/tests/conftest.py +447 -0
  132. identity_plan_kit-0.1.0/tests/integration/__init__.py +1 -0
  133. identity_plan_kit-0.1.0/tests/integration/conftest.py +279 -0
  134. identity_plan_kit-0.1.0/tests/integration/test_concurrent_plan_operations.py +600 -0
  135. identity_plan_kit-0.1.0/tests/integration/test_concurrent_token_operations.py +458 -0
  136. identity_plan_kit-0.1.0/tests/integration/test_concurrent_user_creation.py +428 -0
  137. identity_plan_kit-0.1.0/tests/integration/test_limit_boundaries.py +707 -0
  138. identity_plan_kit-0.1.0/tests/integration/test_quota_concurrency.py +341 -0
  139. identity_plan_kit-0.1.0/tests/integration/test_token_cleanup.py +467 -0
  140. identity_plan_kit-0.1.0/tests/integration/test_token_repository.py +187 -0
  141. identity_plan_kit-0.1.0/tests/integration/test_usage_periods.py +669 -0
  142. identity_plan_kit-0.1.0/tests/integration/test_user_repository.py +179 -0
  143. identity_plan_kit-0.1.0/tests/plans/__init__.py +1 -0
  144. identity_plan_kit-0.1.0/tests/plans/test_domain_entities.py +371 -0
  145. identity_plan_kit-0.1.0/tests/plans/test_period_edge_cases.py +465 -0
  146. identity_plan_kit-0.1.0/tests/plans/test_plan_service.py +431 -0
  147. identity_plan_kit-0.1.0/tests/rbac/__init__.py +1 -0
  148. identity_plan_kit-0.1.0/tests/rbac/test_permission_cache.py +228 -0
  149. identity_plan_kit-0.1.0/tests/rbac/test_permission_cache_concurrent.py +479 -0
  150. identity_plan_kit-0.1.0/tests/rbac/test_rbac_service.py +388 -0
  151. identity_plan_kit-0.1.0/tests/shared/test_audit_pii_masking.py +462 -0
  152. identity_plan_kit-0.1.0/tests/shared/test_circuit_breaker_concurrent.py +494 -0
  153. identity_plan_kit-0.1.0/tests/shared/test_config_validation.py +426 -0
  154. identity_plan_kit-0.1.0/tests/shared/test_http_utils_security.py +458 -0
  155. identity_plan_kit-0.1.0/tests/shared/test_rate_limiter.py +27 -0
  156. identity_plan_kit-0.1.0/uv.lock +2661 -0
@@ -0,0 +1,172 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ .claude
5
+ .mypy_cache
6
+ .idea
7
+ .ruff_cache
8
+ # C extensions (but keep Cython compiled extensions)
9
+ # *.so is commented - we want to track compiled Cython .so files
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ experiments.py
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+ src/fastapi_advanced.egg-info
32
+ # PyInstaller
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ .python-version
88
+
89
+ # pipenv
90
+ Pipfile.lock
91
+
92
+ # poetry
93
+ poetry.lock
94
+
95
+ # pdm
96
+ .pdm.toml
97
+
98
+ # PEP 582
99
+ __pypackages__/
100
+
101
+ # Celery stuff
102
+ celerybeat-schedule
103
+ celerybeat.pid
104
+
105
+ # SageMath parsed files
106
+ *.sage.py
107
+ .pypirc
108
+ # Environments
109
+ .env
110
+ .env.*
111
+ !.env.*.example
112
+ *.env
113
+ .venv
114
+ env/
115
+ venv/
116
+ ENV/
117
+ env.bak/
118
+ venv.bak/
119
+ .venv_build
120
+
121
+ # Spyder project settings
122
+ .spyderproject
123
+ .spyproject
124
+
125
+ # Rope project settings
126
+ .ropeproject
127
+
128
+ # mkdocs documentation
129
+ /site
130
+
131
+ # mypy
132
+ .mypy_cache/
133
+ .dmypy.json
134
+ dmypy.json
135
+
136
+ # Pyre type checker
137
+ .pyre/
138
+
139
+ # pytype static type analyzer
140
+ .pytype/
141
+
142
+ # Cython debug symbols
143
+ cython_debug/
144
+
145
+ # Cython generated files (ignore in src, but allow in build/)
146
+ src/**/*.c
147
+ src/**/*.cpp
148
+ src/**/*.html
149
+ src/**/*.so
150
+
151
+ # Cython annotation files (from make annotate-cython)
152
+ src/**/*_annotated.html
153
+
154
+ # Object files
155
+ *.o
156
+
157
+ # IDEs
158
+ .vscode/
159
+ .idea/
160
+ *.swp
161
+ *.swo
162
+ *~
163
+
164
+ # OS
165
+ .DS_Store
166
+ Thumbs.db
167
+
168
+ # Ruff
169
+ .ruff_cache/
170
+
171
+ # uv
172
+ .uv/
@@ -0,0 +1,158 @@
1
+ .PHONY: help install install-dev install-build lint format typecheck test clean clean-all build build-wheels publish bump-patch bump-minor bump-major
2
+
3
+ # Default target
4
+ .DEFAULT_GOAL := help
5
+
6
+ # Variables
7
+ PYTHON := python3
8
+ UV := uv
9
+ VENV_PYTHON := .venv/bin/python
10
+ PACKAGE_NAME := identity_plan_kit
11
+ SRC_DIR := src/identity_plan_kit
12
+ TESTS_DIR := tests
13
+
14
+ # Environment file (override with: make test ENV_FILE=path/to/.env)
15
+ # Searches: .env.local, .env, examples/playing/.env.local
16
+ ENV_FILE ?= $(shell \
17
+ if [ -f .env.local ]; then echo ".env.local"; \
18
+ elif [ -f .env ]; then echo ".env"; \
19
+ elif [ -f examples/playing/.env.local ]; then echo "examples/playing/.env.local"; \
20
+ else echo ""; \
21
+ fi)
22
+
23
+ help: ## Show this help message
24
+ @echo "Usage: make [target]"
25
+ @echo ""
26
+ @echo "Available targets:"
27
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
28
+
29
+ install: ## Install package dependencies using uv
30
+ $(UV) pip install -e .
31
+
32
+ install-dev: ## Install package with development dependencies using uv
33
+ $(UV) pip install -e ".[dev]"
34
+
35
+ install-build: ## Install build dependencies
36
+ @echo "Installing build dependencies..."
37
+ $(UV) pip install build twine
38
+ @echo "✓ Build dependencies installed!"
39
+
40
+ lint: ## Run ruff linter
41
+ @echo "Running ruff linter..."
42
+ $(UV) run ruff check $(SRC_DIR)
43
+
44
+ lint-fix: ## Run ruff linter with auto-fix
45
+ @echo "Running ruff linter with auto-fix..."
46
+ $(UV) run ruff check --fix $(SRC_DIR)
47
+
48
+ format: ## Format code with ruff
49
+ @echo "Formatting code with ruff..."
50
+ $(UV) run ruff format $(SRC_DIR)
51
+
52
+ format-check: ## Check code formatting without making changes
53
+ @echo "Checking code formatting..."
54
+ $(UV) run ruff format --check $(SRC_DIR)
55
+
56
+ typecheck: ## Run mypy type checker
57
+ @echo "Running mypy type checker..."
58
+ $(UV) run mypy $(SRC_DIR) --explicit-package-bases
59
+
60
+ check: lint format-check typecheck ## Run all checks (lint, format, typecheck)
61
+ @echo "All checks passed!"
62
+
63
+ test: ## Run tests with pytest (loads env from ENV_FILE)
64
+ @echo "Running tests..."
65
+ ifneq ($(ENV_FILE),)
66
+ @echo "Loading environment from $(ENV_FILE)"
67
+ @set -a && . $(ENV_FILE) && set +a && $(UV) run pytest $(TESTS_DIR) -v
68
+ else
69
+ @echo "No env file found, running without environment"
70
+ @$(UV) run pytest $(TESTS_DIR) -v
71
+ endif
72
+
73
+ test-integration: ## Run integration tests with pytest (loads env from ENV_FILE)
74
+ @echo "Running integration tests..."
75
+ ifneq ($(ENV_FILE),)
76
+ @echo "Loading environment from $(ENV_FILE)"
77
+ @set -a && . $(ENV_FILE) && set +a && $(UV) run pytest $(TESTS_DIR)/integration -v
78
+ else
79
+ @echo "No env file found, running without environment"
80
+ @$(UV) run pytest $(TESTS_DIR)/integration -v
81
+ endif
82
+
83
+ test-cov: ## Run tests with coverage report (loads env from ENV_FILE)
84
+ @echo "Running tests with coverage..."
85
+ ifneq ($(ENV_FILE),)
86
+ @echo "Loading environment from $(ENV_FILE)"
87
+ @set -a && . $(ENV_FILE) && set +a && $(UV) run pytest $(TESTS_DIR) --cov=$(SRC_DIR) --cov-report=html --cov-report=term
88
+ else
89
+ @echo "No env file found, running without environment"
90
+ @$(UV) run pytest $(TESTS_DIR) --cov=$(SRC_DIR) --cov-report=html --cov-report=term
91
+ endif
92
+
93
+ clean: ## Clean up build artifacts and cache
94
+ @echo "Cleaning up..."
95
+ rm -rf build/
96
+ rm -rf dist/
97
+ rm -rf *.egg-info
98
+ rm -rf .pytest_cache
99
+ rm -rf .mypy_cache
100
+ rm -rf .ruff_cache
101
+ rm -rf htmlcov/
102
+ rm -rf .coverage
103
+ find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
104
+ find . -type f -name "*.pyc" -delete
105
+
106
+ clean-all: clean ## Clean all build artifacts
107
+ @echo "✓ All artifacts cleaned!"
108
+
109
+ build: clean ## Build package distribution (source + wheel)
110
+ @echo "Building package..."
111
+ $(UV) build
112
+
113
+ build-wheels: ## Build binary wheels for distribution
114
+ @echo "Building binary wheels..."
115
+ $(UV) build --wheel
116
+ @echo "✓ Wheels built in dist/"
117
+ @ls -lh dist/*.whl
118
+
119
+ publish-test: build ## Publish package to TestPyPI
120
+ @echo "Publishing to TestPyPI..."
121
+ $(UV) publish --index testpypi
122
+
123
+ publish: build ## Publish package to PyPI
124
+ @echo "Publishing to PyPI..."
125
+ $(UV) publish
126
+
127
+ ci: check test-cov ## Run all CI checks (lint, format, typecheck, tests with coverage)
128
+ @echo "✓ All CI checks passed!"
129
+
130
+ pre-commit: check test ## Run all pre-commit checks
131
+ @echo "Pre-commit checks passed!"
132
+
133
+ version: ## Show current version
134
+ @$(UV) run bump-my-version show current_version
135
+
136
+ bump-patch: ## Bump patch version (0.1.0 -> 0.1.1)
137
+ @echo "Bumping patch version..."
138
+ $(UV) run bump-my-version bump patch
139
+ @echo "✓ Version bumped!"
140
+
141
+ bump-minor: ## Bump minor version (0.1.0 -> 0.2.0)
142
+ @echo "Bumping minor version..."
143
+ $(UV) run bump-my-version bump minor
144
+ @echo "✓ Version bumped!"
145
+
146
+ bump-major: ## Bump major version (0.1.0 -> 1.0.0)
147
+ @echo "Bumping major version..."
148
+ $(UV) run bump-my-version bump major
149
+ @echo "✓ Version bumped!"
150
+
151
+ bump-patch-dry: ## Preview patch version bump
152
+ @$(UV) run bump-my-version bump patch --dry-run --verbose
153
+
154
+ bump-minor-dry: ## Preview minor version bump
155
+ @$(UV) run bump-my-version bump minor --dry-run --verbose
156
+
157
+ bump-major-dry: ## Preview major version bump
158
+ @$(UV) run bump-my-version bump major --dry-run --verbose