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.
Files changed (97) hide show
  1. djinitx-0.3.3/.github/workflows/dependabot-auto-merge.yml +20 -0
  2. {djinitx-0.3.2 → djinitx-0.3.3}/PKG-INFO +1 -1
  3. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/ci/github_actions.j2 +2 -2
  4. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/justfile.j2 +65 -0
  5. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/readme.j2 +9 -1
  6. {djinitx-0.3.2 → djinitx-0.3.3}/pyproject.toml +1 -1
  7. {djinitx-0.3.2 → djinitx-0.3.3}/requirements.txt +2 -3
  8. {djinitx-0.3.2 → djinitx-0.3.3}/setup.py +1 -1
  9. {djinitx-0.3.2 → djinitx-0.3.3}/uv.lock +1 -1
  10. djinitx-0.3.2/.github/workflows/dependabot-auto-merge.yml +0 -35
  11. {djinitx-0.3.2 → djinitx-0.3.3}/.github/dependabot.yml +0 -0
  12. {djinitx-0.3.2 → djinitx-0.3.3}/.github/workflows/ci.yml +0 -0
  13. {djinitx-0.3.2 → djinitx-0.3.3}/.github/workflows/codeql.yml +0 -0
  14. {djinitx-0.3.2 → djinitx-0.3.3}/.github/workflows/pre-commit.yml +0 -0
  15. {djinitx-0.3.2 → djinitx-0.3.3}/.github/workflows/publish.yml +0 -0
  16. {djinitx-0.3.2 → djinitx-0.3.3}/.gitignore +0 -0
  17. {djinitx-0.3.2 → djinitx-0.3.3}/.pre-commit-config.yaml +0 -0
  18. {djinitx-0.3.2 → djinitx-0.3.3}/.python-version +0 -0
  19. {djinitx-0.3.2 → djinitx-0.3.3}/LICENSE +0 -0
  20. {djinitx-0.3.2 → djinitx-0.3.3}/MANIFEST.in +0 -0
  21. {djinitx-0.3.2 → djinitx-0.3.3}/README.md +0 -0
  22. {djinitx-0.3.2 → djinitx-0.3.3}/TODO.md +0 -0
  23. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/__init__.py +0 -0
  24. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/cli.py +0 -0
  25. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/commands/__init__.py +0 -0
  26. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/commands/handler.py +0 -0
  27. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/core/__init__.py +0 -0
  28. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/core/config.py +0 -0
  29. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/core/types.py +0 -0
  30. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/generator.py +0 -0
  31. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/services/__init__.py +0 -0
  32. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/services/app.py +0 -0
  33. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/services/files.py +0 -0
  34. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/services/project.py +0 -0
  35. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/services/templates.py +0 -0
  36. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/admin.j2 +0 -0
  37. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/api_readme.j2 +0 -0
  38. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/apps.j2 +0 -0
  39. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/migrations_init.j2 +0 -0
  40. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/models.j2 +0 -0
  41. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/models_readme.j2 +0 -0
  42. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/routes.j2 +0 -0
  43. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/serializers.j2 +0 -0
  44. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/tests.j2 +0 -0
  45. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/urls.j2 +0 -0
  46. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/components/views.j2 +0 -0
  47. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/asgi.j2 +0 -0
  48. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/settings/base.j2 +0 -0
  49. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/settings/development.j2 +0 -0
  50. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/settings/production.j2 +0 -0
  51. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/urls/base.j2 +0 -0
  52. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/urls/with_api.j2 +0 -0
  53. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/urls/with_apps.j2 +0 -0
  54. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/config/wsgi.j2 +0 -0
  55. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/api/urls.j2 +0 -0
  56. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/api/v1/urls.j2 +0 -0
  57. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/models.j2 +0 -0
  58. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/serializers.j2 +0 -0
  59. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/services.j2 +0 -0
  60. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/tests.j2 +0 -0
  61. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/urls.j2 +0 -0
  62. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/generic/views.j2 +0 -0
  63. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/models.j2 +0 -0
  64. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/serializers.j2 +0 -0
  65. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/services.j2 +0 -0
  66. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/tests.j2 +0 -0
  67. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/urls.j2 +0 -0
  68. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/apps/users/views.j2 +0 -0
  69. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/core/exceptions.j2 +0 -0
  70. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/core/middleware/request_logger.j2 +0 -0
  71. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/core/mixins/timestamped_model.j2 +0 -0
  72. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/predefined/core/utils/responses.j2 +0 -0
  73. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/apps.j2 +0 -0
  74. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/models/__init__.py.j2 +0 -0
  75. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/models/base.py.j2 +0 -0
  76. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/models/mixins.py.j2 +0 -0
  77. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/utils/__init__.py.j2 +0 -0
  78. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/presets/unified/apps/core/utils/responses.py.j2 +0 -0
  79. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/ci/gitlab_ci.j2 +0 -0
  80. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/env_sample.j2 +0 -0
  81. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/gitignore.j2 +0 -0
  82. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/init.j2 +0 -0
  83. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/manage_py.j2 +0 -0
  84. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/procfile.j2 +0 -0
  85. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/pyproject_toml.j2 +0 -0
  86. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/requirements.j2 +0 -0
  87. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/templates/project/runtime_txt.j2 +0 -0
  88. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/ui/__init__.py +0 -0
  89. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/ui/console.py +0 -0
  90. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/ui/input.py +0 -0
  91. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/__init__.py +0 -0
  92. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/common.py +0 -0
  93. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/django.py +0 -0
  94. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/exceptions.py +0 -0
  95. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/secretkey.py +0 -0
  96. {djinitx-0.3.2 → djinitx-0.3.3}/djinit/utils/validators.py +0 -0
  97. {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 }}'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: djinitx
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: A CLI tool to setup Django project
5
5
  Project-URL: Homepage, https://github.com/S4NKALP/djinit
6
6
  Author-email: Sankalp Tharu <sankalptharu50028@gmail.com>
@@ -31,10 +31,10 @@ jobs:
31
31
  steps:
32
32
  - uses: actions/checkout@v4
33
33
 
34
- {% raw %}- name: Set up Python ${{ matrix.python-version }}{% endraw %}
34
+ - name: Set up Python {{ '{{ matrix.python-version }}' }}
35
35
  uses: actions/setup-python@v5
36
36
  with:
37
- {% raw %}python-version: ${{ matrix.python-version }}{% endraw %}
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 created with [djinitx/djinit/dj](https://github.com/S4NKALP/djinit).
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
 
@@ -7,7 +7,7 @@ packages = ["djinit"]
7
7
 
8
8
  [project]
9
9
  name = "djinitx"
10
- version = "0.3.2"
10
+ version = "0.3.3"
11
11
  description = "A CLI tool to setup Django project"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.10"
@@ -1,7 +1,6 @@
1
1
  jinja2==3.1.6
2
2
  questionary==2.1.1
3
3
  rich==14.2.0
4
-
5
4
  # dev
6
- ruff==0.14.2
7
- pre-commit==4.5.0
5
+ ruff==0.14.9
6
+ pre-commit==4.5.1
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
2
2
 
3
3
  setup(
4
4
  name="djinitx",
5
- version="0.3.2",
5
+ version="0.3.3",
6
6
  description="A CLI tool to setup Django projects",
7
7
  long_description=open("README.md").read(),
8
8
  long_description_content_type="text/markdown",
@@ -22,7 +22,7 @@ wheels = [
22
22
 
23
23
  [[package]]
24
24
  name = "djinitx"
25
- version = "0.3.1"
25
+ version = "0.3.3"
26
26
  source = { editable = "." }
27
27
  dependencies = [
28
28
  { name = "jinja2" },
@@ -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