Skip to content

Commit 3eb63e9

Browse files
authored
Merge pull request #19 from akx/renovate-2025-03
Renovations, spring 2025 🌸
2 parents 313ad82 + 7e66bb5 commit 3eb63e9

File tree

19 files changed

+86
-93
lines changed

19 files changed

+86
-93
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,18 @@ jobs:
1212
strategy:
1313
matrix:
1414
include:
15-
- python-version: '3.7'
1615
- python-version: '3.10'
1716
- python-version: '3.11'
1817
- python-version: '3.12'
1918
steps:
2019
- uses: actions/checkout@v4
21-
- uses: actions/setup-python@v5
20+
- uses: astral-sh/setup-uv@v5
2221
with:
2322
python-version: '${{ matrix.python-version }}'
24-
cache: pip
25-
cache-dependency-path: pyproject.toml
26-
- run: pip install -U tox tox-gh
27-
- run: tox
23+
cache-dependency-glob: pyproject.toml
24+
- run: uvx --with=tox-gh --with=tox-uv tox
2825
Lint:
29-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-24.04
3027
steps:
3128
- uses: actions/checkout@v4
32-
- uses: actions/setup-python@v5
33-
with:
34-
python-version: '3.11'
35-
cache: pip
36-
cache-dependency-path: pyproject.toml
37-
- uses: pre-commit/[email protected]
29+
- uses: akx/[email protected]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.egg*
22
*.py[cod]
3+
*.sqlite3
34
.*cache
45
.coverage
56
.tox

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.4.1
3+
rev: v0.9.9
44
hooks:
55
- id: ruff
66
args:
77
- --fix
88
- id: ruff-format
9-
- repo: https://github.com/codespell-project/codespell
10-
rev: v2.2.6
9+
- repo: https://github.com/crate-ci/typos
10+
rev: v1.30.1
1111
hooks:
12-
- id: codespell
12+
- id: typos
1313
- repo: https://github.com/pre-commit/mirrors-mypy
14-
rev: v1.9.0
14+
rev: v1.15.0
1515
hooks:
1616
- id: mypy
1717
args:
@@ -20,7 +20,7 @@ repos:
2020
- django-stubs
2121
- pytest
2222
- repo: https://github.com/pre-commit/pre-commit-hooks
23-
rev: v4.6.0
23+
rev: v5.0.0
2424
hooks:
2525
- id: debug-statements
2626
- id: end-of-file-fixer

MANIFEST.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ django-managerie
88
Requirements
99
------------
1010

11-
* Django 3.2+ (this project tracks Django's end-of-life policy)
12-
* Python 3.7+
11+
- Django 4.2+ (this project tracks Django's end-of-life policy)
12+
- Python 3.10+
1313

1414
Installation
1515
------------

django_managerie/managerie.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ def _augment_app_list(
106106
request: HttpRequest,
107107
app_list: List[Dict],
108108
):
109+
# TODO: apps without models won't have their commands shown here since they
110+
# don't show up in the app_list. We should probably show them anyway.
109111
all_commands: Dict[str, CommandMap] = {
110112
app_config.label: commands for (app_config, commands) in self.get_commands(request).items()
111113
}

django_managerie/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from django_managerie.managerie import Managerie
1717

1818

19-
class MenagerieBaseMixin:
19+
class ManagerieBaseMixin:
2020
managerie: Optional[Managerie] = None
2121
kwargs: Dict[str, Any]
2222
_app: Optional[AppConfig]
@@ -43,7 +43,7 @@ def dispatch(self, request, *args, **kwargs):
4343
return super().dispatch(request, *args, **kwargs)
4444

4545

46-
class ManagerieListView(MenagerieBaseMixin, StaffRequiredMixin, TemplateView):
46+
class ManagerieListView(ManagerieBaseMixin, StaffRequiredMixin, TemplateView):
4747
template_name = "django_managerie/admin/list.html"
4848

4949
def get_context_data(self, **kwargs) -> Dict[str, Any]:
@@ -66,7 +66,7 @@ def get_context_data(self, **kwargs) -> Dict[str, Any]:
6666
return context
6767

6868

69-
class ManagerieCommandView(MenagerieBaseMixin, StaffRequiredMixin, FormView):
69+
class ManagerieCommandView(ManagerieBaseMixin, StaffRequiredMixin, FormView):
7070
template_name = "django_managerie/admin/command.html"
7171

7272
@property
@@ -84,7 +84,7 @@ def get_command_object(self) -> ManagementCommand:
8484
)[self.command_name]
8585
except KeyError:
8686
raise Http404(
87-
f"Command {self.command_name} not found in {app.label} " f"(or you don't have permission to run it)",
87+
f"Command {self.command_name} not found in {app.label} (or you don't have permission to run it)",
8888
)
8989

9090
def get_form(self, form_class=None) -> ArgumentParserForm:

manage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import sys
33

4-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "managerie_tests.settings")
4+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "managerie_test_app.settings")
55

66

77
def manage():

managerie_test_app/admin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.contrib import admin
2+
3+
from managerie_test_app.models import Example
4+
5+
admin.site.register(Example)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 5.1.6 on 2025-03-05 10:05
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
initial = True
8+
9+
dependencies = []
10+
11+
operations = [
12+
migrations.CreateModel(
13+
name="Example",
14+
fields=[
15+
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
16+
],
17+
),
18+
]

0 commit comments

Comments
 (0)