djinitx 0.3.2__tar.gz → 0.3.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.
- djinitx-0.3.3/.github/workflows/dependabot-auto-merge.yml +20 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/PKG-INFO +1 -1
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/ci/github_actions.j2 +2 -2
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/justfile.j2 +65 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/readme.j2 +9 -1
- {djinitx-0.3.2 → djinitx-0.3.3}/pyproject.toml +1 -1
- {djinitx-0.3.2 → djinitx-0.3.3}/requirements.txt +2 -3
- {djinitx-0.3.2 → djinitx-0.3.3}/setup.py +1 -1
- {djinitx-0.3.2 → djinitx-0.3.3}/uv.lock +1 -1
- djinitx-0.3.2/.github/workflows/dependabot-auto-merge.yml +0 -35
- {djinitx-0.3.2 → djinitx-0.3.3}/.github/dependabot.yml +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/.github/workflows/ci.yml +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/.github/workflows/codeql.yml +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/.github/workflows/pre-commit.yml +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/.github/workflows/publish.yml +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/.gitignore +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/.pre-commit-config.yaml +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/.python-version +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/LICENSE +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/MANIFEST.in +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/README.md +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/TODO.md +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/__init__.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/cli.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/commands/__init__.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/commands/handler.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/core/__init__.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/core/config.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/core/types.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/generator.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/services/__init__.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/services/app.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/services/files.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/services/project.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/services/templates.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/admin.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/api_readme.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/apps.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/migrations_init.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/models.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/models_readme.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/routes.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/serializers.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/tests.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/urls.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/views.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/asgi.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/settings/base.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/settings/development.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/settings/production.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/urls/base.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/urls/with_api.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/urls/with_apps.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/wsgi.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/api/urls.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/api/v1/urls.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/models.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/serializers.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/services.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/tests.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/urls.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/views.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/models.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/serializers.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/services.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/tests.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/urls.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/views.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/core/exceptions.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/core/middleware/request_logger.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/core/mixins/timestamped_model.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/core/utils/responses.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/apps.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/models/__init__.py.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/models/base.py.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/models/mixins.py.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/utils/__init__.py.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/utils/responses.py.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/ci/gitlab_ci.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/env_sample.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/gitignore.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/init.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/manage_py.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/procfile.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/pyproject_toml.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/requirements.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/runtime_txt.j2 +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/ui/__init__.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/ui/console.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/ui/input.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/__init__.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/common.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/django.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/exceptions.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/secretkey.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/validators.py +0 -0
- {djinitx-0.3.2 → djinitx-0.3.3}/ruff.toml +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
name: Dependabot Auto-Merge
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
dependabot:
|
|
13
|
+
if: ${{github.actor == 'dependabot[bot]' }}
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Merge PR from dependabot
|
|
18
|
+
uses: fastify/github-action-merge-dependabot@v3
|
|
19
|
+
with:
|
|
20
|
+
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
|
@@ -31,10 +31,10 @@ jobs:
|
|
|
31
31
|
steps:
|
|
32
32
|
- uses: actions/checkout@v4
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
- name: Set up Python {{ '{{ matrix.python-version }}' }}
|
|
35
35
|
uses: actions/setup-python@v5
|
|
36
36
|
with:
|
|
37
|
-
|
|
37
|
+
python-version: {{ '{{ matrix.python-version }}' }}
|
|
38
38
|
|
|
39
39
|
- name: Install uv
|
|
40
40
|
uses: astral-sh/setup-uv@v4
|
|
@@ -128,9 +128,74 @@ clean:
|
|
|
128
128
|
rm -rf htmlcov/
|
|
129
129
|
rm -rf .pytest_cache/
|
|
130
130
|
|
|
131
|
+
# Pin dependencies in pyproject.toml using versions from uv.lock, keeping >= and extras
|
|
132
|
+
pin-deps:
|
|
133
|
+
#!/usr/bin/env -S uv run python
|
|
134
|
+
import tomllib, re
|
|
135
|
+
from pathlib import Path
|
|
136
|
+
|
|
137
|
+
lock = Path("uv.lock")
|
|
138
|
+
if not lock.exists():
|
|
139
|
+
print("uv.lock not found — run `uv sync` first")
|
|
140
|
+
raise SystemExit(0)
|
|
141
|
+
|
|
142
|
+
data = tomllib.loads(lock.read_text())
|
|
143
|
+
packages = {p["name"].lower(): p["version"] for p in data.get("package", [])}
|
|
144
|
+
|
|
145
|
+
py = Path("pyproject.toml")
|
|
146
|
+
lines = py.read_text().splitlines()
|
|
147
|
+
|
|
148
|
+
pattern = re.compile(r'^(\s*)"([^"]+)"(,?)')
|
|
149
|
+
|
|
150
|
+
out = []
|
|
151
|
+
for line in lines:
|
|
152
|
+
m = pattern.match(line)
|
|
153
|
+
if not m:
|
|
154
|
+
out.append(line)
|
|
155
|
+
continue
|
|
156
|
+
|
|
157
|
+
indent, dep, comma = m.groups()
|
|
158
|
+
|
|
159
|
+
base = dep
|
|
160
|
+
extras = ""
|
|
161
|
+
operator = ">="
|
|
162
|
+
version = None
|
|
163
|
+
|
|
164
|
+
# extras: django[postgres]
|
|
165
|
+
if "[" in base and "]" in base:
|
|
166
|
+
before, after = base.split("[", 1)
|
|
167
|
+
extras = "[" + after.split("]")[0] + "]"
|
|
168
|
+
base = before
|
|
169
|
+
|
|
170
|
+
# detect >= or ==
|
|
171
|
+
if ">=" in dep:
|
|
172
|
+
operator = ">="
|
|
173
|
+
base, version = dep.split(">=")
|
|
174
|
+
base = base.strip()
|
|
175
|
+
elif "==" in dep:
|
|
176
|
+
operator = "=="
|
|
177
|
+
base, version = dep.split("==")
|
|
178
|
+
base = base.strip()
|
|
179
|
+
else:
|
|
180
|
+
base = dep
|
|
181
|
+
|
|
182
|
+
base_lower = base.lower()
|
|
183
|
+
new_version = packages.get(base_lower)
|
|
184
|
+
|
|
185
|
+
if new_version:
|
|
186
|
+
new_dep = f'{base}{extras}{operator}{new_version}'
|
|
187
|
+
line = f'{indent}"{new_dep}"{comma}'
|
|
188
|
+
|
|
189
|
+
out.append(line)
|
|
190
|
+
|
|
191
|
+
py.write_text("\n".join(out) + "\n")
|
|
192
|
+
print("Pinned dependencies (>= preserved, extras preserved).")
|
|
193
|
+
|
|
194
|
+
|
|
131
195
|
# Setup project for development (using uv)
|
|
132
196
|
setup:
|
|
133
197
|
uv sync
|
|
198
|
+
just pin-deps
|
|
134
199
|
uv run python manage.py migrate
|
|
135
200
|
uv run python manage.py createsuperuser
|
|
136
201
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# {{ project_name }}
|
|
2
2
|
|
|
3
|
-
A Django project
|
|
3
|
+
A Django project folder structure is generated with [djinitx/djinit/dj](https://github.com/S4NKALP/djinit).
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -62,6 +62,11 @@ Run `just` to see all available commands, including:
|
|
|
62
62
|
- `just format` - Format code
|
|
63
63
|
- `just shell` - Django shell
|
|
64
64
|
- `just clean` - Clean cache files
|
|
65
|
+
- `just install <package>` - Install package
|
|
66
|
+
- `just remove <package>` - Remove package
|
|
67
|
+
- `just server` - Run production server
|
|
68
|
+
- `just ci` - Run all linting and checks
|
|
69
|
+
- `just test-coverage` - Run tests with coverage
|
|
65
70
|
|
|
66
71
|
## Project Structure
|
|
67
72
|
|
|
@@ -107,6 +112,7 @@ Run `just` to see all available commands, including:
|
|
|
107
112
|
├── manage.py
|
|
108
113
|
├── requirements.txt
|
|
109
114
|
├── pyproject.toml
|
|
115
|
+
├── uv.lock
|
|
110
116
|
├── .env.sample
|
|
111
117
|
├── justfile
|
|
112
118
|
├── Procfile
|
|
@@ -146,6 +152,7 @@ Run `just` to see all available commands, including:
|
|
|
146
152
|
├── manage.py
|
|
147
153
|
├── requirements.txt
|
|
148
154
|
├── pyproject.toml
|
|
155
|
+
├── uv.lock
|
|
149
156
|
├── .env.sample
|
|
150
157
|
├── justfile
|
|
151
158
|
├── Procfile
|
|
@@ -173,6 +180,7 @@ Run `just` to see all available commands, including:
|
|
|
173
180
|
├── manage.py
|
|
174
181
|
├── requirements.txt
|
|
175
182
|
├── pyproject.toml
|
|
183
|
+
├── uv.lock
|
|
176
184
|
├── .env.sample
|
|
177
185
|
└── README.md
|
|
178
186
|
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
name: Dependabot Auto-Approve and Auto-Merge
|
|
2
|
-
on:
|
|
3
|
-
pull_request_target:
|
|
4
|
-
types: [opened, reopened, synchronize]
|
|
5
|
-
permissions:
|
|
6
|
-
contents: write
|
|
7
|
-
pull-requests: write
|
|
8
|
-
jobs:
|
|
9
|
-
dependabot:
|
|
10
|
-
if: github.actor == 'dependabot[bot]'
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: Dependabot metadata
|
|
14
|
-
id: metadata
|
|
15
|
-
uses: dependabot/fetch-metadata@v2
|
|
16
|
-
- name: Approve PR
|
|
17
|
-
if: |
|
|
18
|
-
steps.metadata.outputs.update-type == 'version-update:semver-minor' ||
|
|
19
|
-
steps.metadata.outputs.update-type == 'version-update:semver-patch'
|
|
20
|
-
uses: actions/github-script@v8
|
|
21
|
-
with:
|
|
22
|
-
script: |
|
|
23
|
-
await github.rest.pulls.createReview({
|
|
24
|
-
owner: context.repo.owner,
|
|
25
|
-
repo: context.repo.repo,
|
|
26
|
-
pull_number: context.payload.pull_request.number,
|
|
27
|
-
event: 'APPROVE'
|
|
28
|
-
})
|
|
29
|
-
- name: Enable auto-merge (squash)
|
|
30
|
-
if: |
|
|
31
|
-
steps.metadata.outputs.update-type == 'version-update:semver-minor' ||
|
|
32
|
-
steps.metadata.outputs.update-type == 'version-update:semver-patch'
|
|
33
|
-
uses: peter-evans/enable-pull-request-automerge@v3
|
|
34
|
-
with:
|
|
35
|
-
merge-method: squash
|
|
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
|
|
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
|
|
File without changes
|
{djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/serializers.j2
RENAMED
|
File without changes
|
{djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/services.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/serializers.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/core/mixins/timestamped_model.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/models/__init__.py.j2
RENAMED
|
File without changes
|
{djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/models/base.py.j2
RENAMED
|
File without changes
|
{djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/models/mixins.py.j2
RENAMED
|
File without changes
|
{djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/utils/__init__.py.j2
RENAMED
|
File without changes
|
{djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/utils/responses.py.j2
RENAMED
|
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
|