19 Commits
Author SHA1 Message Date
sankalp 431e873529 chore: bump version to 0.3.3 2025-12-24 23:13:58 +05:45
sankalp 8bacb2d32d chore: bump version to 0.3.3 2025-12-24 23:13:34 +05:45
sankalp 49a7123989 Merge pull request #18 from S4NKALP/dependabot/pip/main/ruff-0.14.10
chore(deps): bump ruff from 0.14.9 to 0.14.10
2025-12-24 23:06:48 +05:45
sankalp 311f6a7cc9 Merge branch 'main' into dependabot/pip/main/ruff-0.14.10 2025-12-24 23:06:31 +05:45
sankalp 70477190f3 Merge pull request #19 from S4NKALP/dependabot/pip/main/pre-commit-4.5.1
chore(deps): bump pre-commit from 4.5.0 to 4.5.1
2025-12-24 23:05:43 +05:45
sankalp 5c6888ff28 ci(workflows): update dependabot auto-merge workflow
The dependabot auto-merge workflow has been updated to use a new action and simplified logic for merging pull requests.

- **Enhancements & Refinements**:
  - Replaced `dependabot/fetch-metadata` and `peter-evans/enable-pull-request-automerge` with `fastify/github-action-merge-dependabot`
  - Simplified the workflow by removing conditional logic for update types
  - Updated the condition syntax to use explicit expression syntax
  - Added explicit `github-token` configuration for the new action
```
2025-12-24 23:04:36 +05:45
dependabot[bot] f0a88dfc44 chore(deps): bump pre-commit from 4.5.0 to 4.5.1
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v4.5.0...v4.5.1)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-version: 4.5.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 02:24:54 +00:00
dependabot[bot] 4c34426782 chore(deps): bump ruff from 0.14.9 to 0.14.10
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.9 to 0.14.10.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.9...0.14.10)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 02:24:49 +00:00
sankalp d1e77b5547 Merge pull request #17 from S4NKALP/dependabot/pip/main/ruff-0.14.9
chore(deps): bump ruff from 0.14.8 to 0.14.9
2025-12-17 10:23:02 +05:45
sankalp 8d38a5e9df feat(.github/workflows): improve Dependabot auto-merge workflow
- **New Features**
  - Add Dependabot Auto-Merge workflow to automatically merge Dependabot PRs.

- **Enhancements & Refinements**
  - Remove redundant comment clarifying the workflow's Dependabot-specific execution.
  - Adjust whitespace for better YAML formatting.
2025-12-17 10:18:24 +05:45
sankalp d8402927e1 feat(.github/workflows): streamline dependabot auto-merge workflow
The Dependabot auto-merge workflow has been simplified and focused on essential functionality. Approval steps have been removed, leaving only the core auto-merge capability for minor and patch updates.

**New Features**
- Added explicit conditional filtering to run jobs **only for Dependabot PRs**

**Enhancements & Refinements**
- Renamed workflow from **Dependabot Auto-Approve and Auto-Merge** to **Dependabot Auto-Merge** to reflect simplified scope
- Improved workflow structure with clearer YAML syntax separation
- Reorganized **Fetch Dependabot metadata** step placement for better readability
- Removed redundant GitHub script approval step to reduce complexity
2025-12-17 10:11:25 +05:45
dependabot[bot] 39b7704056 chore(deps): bump ruff from 0.14.8 to 0.14.9
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.8 to 0.14.9.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.8...0.14.9)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 02:28:15 +00:00
sankalp 7d04ad2f2e chore(github workflow): added dependabot workflow 2025-12-11 21:26:19 +05:45
sankalp 50061c313e fix(templates): fix justfile syntax and update readme 2025-12-09 17:23:50 +05:45
sankalp bbd4f1ddd6 Merge pull request #16 from S4NKALP/dependabot/pip/main/ruff-0.14.8
chore(deps): bump ruff from 0.14.2 to 0.14.8
2025-12-08 17:22:07 +05:45
dependabot[bot] 9ba07d5167 chore(deps): bump ruff from 0.14.2 to 0.14.8
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.2 to 0.14.8.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.2...0.14.8)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 02:23:47 +00:00
sankalp f7c5a99e41 chore: bump version to 0.3.2 and remove click dependency 2025-12-06 19:35:42 +05:45
sankalp 68f8cb81b5 chore: move dev dependencies to a separate group 2025-12-06 19:34:14 +05:45
sankalp 962fa3c504 chore: add questionary dependency for interactive prompts 2025-12-05 19:53:03 +05:45
8 changed files with 112 additions and 63 deletions

No files matched your search

+11 -26
View File
@@ -1,35 +1,20 @@
name: Dependabot Auto-Approve and Auto-Merge
name: Dependabot Auto-Merge
on:
pull_request_target:
types: [opened, reopened, synchronize]
pull_request:
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
if: github.actor == 'dependabot[bot]'
if: ${{github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
- name: Approve PR
if: |
steps.metadata.outputs.update-type == 'version-update:semver-minor' ||
steps.metadata.outputs.update-type == 'version-update:semver-patch'
uses: actions/github-script@v8
- name: Merge PR from dependabot
uses: fastify/github-action-merge-dependabot@v3
with:
script: |
await github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
})
- name: Enable auto-merge (squash)
if: |
steps.metadata.outputs.update-type == 'version-update:semver-minor' ||
steps.metadata.outputs.update-type == 'version-update:semver-patch'
uses: peter-evans/enable-pull-request-automerge@v3
with:
merge-method: squash
github-token: '${{ secrets.GITHUB_TOKEN }}'
@@ -31,10 +31,10 @@ jobs:
steps:
- uses: actions/checkout@v4
{% raw %}- name: Set up Python ${{ matrix.python-version }}{% endraw %}
- name: Set up Python {{ '{{ matrix.python-version }}' }}
uses: actions/setup-python@v5
with:
{% raw %}python-version: ${{ matrix.python-version }}{% endraw %}
python-version: {{ '{{ matrix.python-version }}' }}
- name: Install uv
uses: astral-sh/setup-uv@v4
+65
View File
@@ -128,9 +128,74 @@ clean:
rm -rf htmlcov/
rm -rf .pytest_cache/
# Pin dependencies in pyproject.toml using versions from uv.lock, keeping >= and extras
pin-deps:
#!/usr/bin/env -S uv run python
import tomllib, re
from pathlib import Path
lock = Path("uv.lock")
if not lock.exists():
print("uv.lock not found — run `uv sync` first")
raise SystemExit(0)
data = tomllib.loads(lock.read_text())
packages = {p["name"].lower(): p["version"] for p in data.get("package", [])}
py = Path("pyproject.toml")
lines = py.read_text().splitlines()
pattern = re.compile(r'^(\s*)"([^"]+)"(,?)')
out = []
for line in lines:
m = pattern.match(line)
if not m:
out.append(line)
continue
indent, dep, comma = m.groups()
base = dep
extras = ""
operator = ">="
version = None
# extras: django[postgres]
if "[" in base and "]" in base:
before, after = base.split("[", 1)
extras = "[" + after.split("]")[0] + "]"
base = before
# detect >= or ==
if ">=" in dep:
operator = ">="
base, version = dep.split(">=")
base = base.strip()
elif "==" in dep:
operator = "=="
base, version = dep.split("==")
base = base.strip()
else:
base = dep
base_lower = base.lower()
new_version = packages.get(base_lower)
if new_version:
new_dep = f'{base}{extras}{operator}{new_version}'
line = f'{indent}"{new_dep}"{comma}'
out.append(line)
py.write_text("\n".join(out) + "\n")
print("Pinned dependencies (>= preserved, extras preserved).")
# Setup project for development (using uv)
setup:
uv sync
just pin-deps
uv run python manage.py migrate
uv run python manage.py createsuperuser
+9 -1
View File
@@ -1,6 +1,6 @@
# {{ project_name }}
A Django project created with [djinitx/djinit/dj](https://github.com/S4NKALP/djinit).
A Django project folder structure is generated with [djinitx/djinit/dj](https://github.com/S4NKALP/djinit).
## Features
@@ -62,6 +62,11 @@ Run `just` to see all available commands, including:
- `just format` - Format code
- `just shell` - Django shell
- `just clean` - Clean cache files
- `just install <package>` - Install package
- `just remove <package>` - Remove package
- `just server` - Run production server
- `just ci` - Run all linting and checks
- `just test-coverage` - Run tests with coverage
## Project Structure
@@ -107,6 +112,7 @@ Run `just` to see all available commands, including:
├── manage.py
├── requirements.txt
├── pyproject.toml
├── uv.lock
├── .env.sample
├── justfile
├── Procfile
@@ -146,6 +152,7 @@ Run `just` to see all available commands, including:
├── manage.py
├── requirements.txt
├── pyproject.toml
├── uv.lock
├── .env.sample
├── justfile
├── Procfile
@@ -173,6 +180,7 @@ Run `just` to see all available commands, including:
├── manage.py
├── requirements.txt
├── pyproject.toml
├── uv.lock
├── .env.sample
└── README.md
+7 -4
View File
@@ -7,7 +7,7 @@ packages = ["djinit"]
[project]
name = "djinitx"
version = "0.3.1"
version = "0.3.3"
description = "A CLI tool to setup Django project"
readme = "README.md"
requires-python = ">=3.10"
@@ -47,11 +47,8 @@ classifiers=[
"Topic :: Software Development :: Code Generators",
]
dependencies = [
"click>=8.3.0",
"rich>=14.2.0",
"ruff>=0.14.2",
"jinja2>=3.1.0",
"pre-commit>=4.5.0",
"questionary>=2.0.1",
]
@@ -61,3 +58,9 @@ Homepage = "https://github.com/S4NKALP/djinit"
[project.scripts]
djinit = "djinit.generator:main"
dj = "djinit.generator:main"
[dependency-groups]
dev = [
"pre-commit>=4.5.0",
"ruff>=0.14.2",
]
+5 -3
View File
@@ -1,4 +1,6 @@
click==8.3.1
jinja2==3.1.6
questionary==2.1.1
rich==14.2.0
ruff==0.14.7
jinja2>=3.1.0
# dev
ruff==0.14.9
pre-commit==4.5.1
+2 -1
View File
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup(
name="djinitx",
version="0.3.1",
version="0.3.3",
description="A CLI tool to setup Django projects",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
@@ -16,6 +16,7 @@ setup(
"click>=8.3.0",
"rich>=14.2.0",
"jinja2>=3.1.0",
"questionary>=2.0.1",
],
entry_points={
"console_scripts": [
Generated
+11 -26
View File
@@ -11,27 +11,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/db/3c/33bac158f8ab7f89b2e59426d5fe2e4f63f7ed25df84c036890172b412b5/cfgv-3.5.0-py2.py3-none-any.whl", hash = "sha256:a8dc6b26ad22ff227d2634a65cb388215ce6cc96bbcc5cfde7641ae87e8dacc0", size = 7445, upload-time = "2025-11-19T20:55:50.744Z" },
]
[[package]]
name = "click"
version = "8.3.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "colorama", marker = "sys_platform == 'win32'" },
]
sdist = { url = "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz", hash = "sha256:e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4", size = 276943, upload-time = "2025-09-18T17:32:23.696Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/db/d3/9dcc0f5797f070ec8edf30fbadfb200e71d9db6b84d211e3b2085a7589a0/click-8.3.0-py3-none-any.whl", hash = "sha256:9b9f285302c6e3064f4330c05f05b81945b2a39544279343e6e7c5f27a9baddc", size = 107295, upload-time = "2025-09-18T17:32:22.42Z" },
]
[[package]]
name = "colorama"
version = "0.4.6"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
]
[[package]]
name = "distlib"
version = "0.4.0"
@@ -43,24 +22,30 @@ wheels = [
[[package]]
name = "djinitx"
version = "0.3.1"
version = "0.3.3"
source = { editable = "." }
dependencies = [
{ name = "click" },
{ name = "jinja2" },
{ name = "pre-commit" },
{ name = "questionary" },
{ name = "rich" },
]
[package.dev-dependencies]
dev = [
{ name = "pre-commit" },
{ name = "ruff" },
]
[package.metadata]
requires-dist = [
{ name = "click", specifier = ">=8.3.0" },
{ name = "jinja2", specifier = ">=3.1.0" },
{ name = "pre-commit", specifier = ">=4.5.0" },
{ name = "questionary", specifier = ">=2.0.1" },
{ name = "rich", specifier = ">=14.2.0" },
]
[package.metadata.requires-dev]
dev = [
{ name = "pre-commit", specifier = ">=4.5.0" },
{ name = "ruff", specifier = ">=0.14.2" },
]