django-ec-calendar 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.
- django_ec_calendar-0.1.0/.github/workflows/compat-matrix.yml +27 -0
- django_ec_calendar-0.1.0/.github/workflows/js-tests.yml +24 -0
- django_ec_calendar-0.1.0/.github/workflows/pre-commit.yml +28 -0
- django_ec_calendar-0.1.0/.github/workflows/pytest.yml +31 -0
- django_ec_calendar-0.1.0/.github/workflows/release.yml +55 -0
- django_ec_calendar-0.1.0/.gitignore +42 -0
- django_ec_calendar-0.1.0/.pre-commit-config.yaml +69 -0
- django_ec_calendar-0.1.0/CHANGELOG.md +25 -0
- django_ec_calendar-0.1.0/CONTRIBUTING.md +106 -0
- django_ec_calendar-0.1.0/LICENSE +21 -0
- django_ec_calendar-0.1.0/PKG-INFO +280 -0
- django_ec_calendar-0.1.0/README.md +235 -0
- django_ec_calendar-0.1.0/biome.json +22 -0
- django_ec_calendar-0.1.0/docs/screenshots/calendar-dark.png +0 -0
- django_ec_calendar-0.1.0/docs/screenshots/calendar-days.png +0 -0
- django_ec_calendar-0.1.0/docs/screenshots/calendar-page.png +0 -0
- django_ec_calendar-0.1.0/docs/screenshots/calendar-unfold-dark.png +0 -0
- django_ec_calendar-0.1.0/docs/screenshots/calendar-unfold.png +0 -0
- django_ec_calendar-0.1.0/docs/screenshots/calendar.png +0 -0
- django_ec_calendar-0.1.0/example/agenda/__init__.py +0 -0
- django_ec_calendar-0.1.0/example/agenda/admin.py +33 -0
- django_ec_calendar-0.1.0/example/agenda/admin_unfold.py +37 -0
- django_ec_calendar-0.1.0/example/agenda/migrations/0001_initial.py +42 -0
- django_ec_calendar-0.1.0/example/agenda/migrations/__init__.py +0 -0
- django_ec_calendar-0.1.0/example/agenda/models.py +45 -0
- django_ec_calendar-0.1.0/example/agenda/templates/agenda/booking.html +9 -0
- django_ec_calendar-0.1.0/example/agenda/templates/agenda/calendar.html +16 -0
- django_ec_calendar-0.1.0/example/agenda/views.py +24 -0
- django_ec_calendar-0.1.0/example/example/__init__.py +0 -0
- django_ec_calendar-0.1.0/example/example/settings.py +68 -0
- django_ec_calendar-0.1.0/example/example/settings_unfold.py +8 -0
- django_ec_calendar-0.1.0/example/example/urls.py +10 -0
- django_ec_calendar-0.1.0/example/example/urls_unfold.py +10 -0
- django_ec_calendar-0.1.0/example/example/wsgi.py +7 -0
- django_ec_calendar-0.1.0/example/manage.py +20 -0
- django_ec_calendar-0.1.0/package-lock.json +2963 -0
- django_ec_calendar-0.1.0/package.json +16 -0
- django_ec_calendar-0.1.0/pyproject.toml +160 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/__init__.py +9 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/admin.py +294 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/apps.py +7 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/config.py +98 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/locale/es/LC_MESSAGES/django.mo +0 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/locale/es/LC_MESSAGES/django.po +82 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/py.typed +0 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/source.py +206 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/static/django_ec_calendar/calendar.css +68 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/static/django_ec_calendar/calendar.js +302 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/static/django_ec_calendar/vendor/event-calendar/LICENSE +21 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/static/django_ec_calendar/vendor/event-calendar/event-calendar.min.css +6 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/static/django_ec_calendar/vendor/event-calendar/event-calendar.min.js +7 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/templates/django_ec_calendar/admin/calendar.html +48 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/templates/django_ec_calendar/admin/change_list.html +13 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/templates/django_ec_calendar/calendar.html +5 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/templatetags/__init__.py +0 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/templatetags/ec_calendar.py +57 -0
- django_ec_calendar-0.1.0/src/django_ec_calendar/views.py +50 -0
- django_ec_calendar-0.1.0/tests/__init__.py +0 -0
- django_ec_calendar-0.1.0/tests/conftest.py +17 -0
- django_ec_calendar-0.1.0/tests/e2e/__init__.py +0 -0
- django_ec_calendar-0.1.0/tests/e2e/test_e2e.py +312 -0
- django_ec_calendar-0.1.0/tests/js/calendar.test.js +497 -0
- django_ec_calendar-0.1.0/tests/settings.py +18 -0
- django_ec_calendar-0.1.0/tests/test_admin.py +348 -0
- django_ec_calendar-0.1.0/tests/test_i18n.py +83 -0
- django_ec_calendar-0.1.0/tests/test_pages.py +109 -0
- django_ec_calendar-0.1.0/tests/test_source.py +221 -0
- django_ec_calendar-0.1.0/uv.lock +1496 -0
- django_ec_calendar-0.1.0/vitest.config.js +16 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Compatibility Matrix
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master, main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master, main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
tox:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Install uv
|
|
16
|
+
uses: astral-sh/setup-uv@v5
|
|
17
|
+
with:
|
|
18
|
+
enable-cache: true
|
|
19
|
+
|
|
20
|
+
- name: Install Python versions
|
|
21
|
+
run: uv python install 3.10 3.12 3.13 3.14
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: uv sync
|
|
25
|
+
|
|
26
|
+
- name: Run compatibility matrix (tox)
|
|
27
|
+
run: uv run tox run
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: JavaScript Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Setup Node.js
|
|
15
|
+
uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: "20"
|
|
18
|
+
cache: "npm"
|
|
19
|
+
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: npm ci
|
|
22
|
+
|
|
23
|
+
- name: Run Tests & Coverage
|
|
24
|
+
run: npm run coverage
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Pre-commit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pre-commit:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Install uv
|
|
15
|
+
uses: astral-sh/setup-uv@v5
|
|
16
|
+
with:
|
|
17
|
+
enable-cache: true
|
|
18
|
+
|
|
19
|
+
# The hooks run on python3.14 (default_language_version), found
|
|
20
|
+
# through the venv's bin on PATH under `uv run`.
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
run: uv python install 3.14
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: uv sync --python 3.14
|
|
26
|
+
|
|
27
|
+
- name: Run pre-commit
|
|
28
|
+
run: uv run pre-commit run --all-files
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Python and Playwright Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master, main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master, main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test-python:
|
|
11
|
+
name: Python Tests
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Install uv
|
|
17
|
+
uses: astral-sh/setup-uv@v5
|
|
18
|
+
with:
|
|
19
|
+
enable-cache: true
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
run: uv python install
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: uv sync
|
|
26
|
+
|
|
27
|
+
- name: Install Playwright browsers
|
|
28
|
+
run: uv run playwright install --with-deps chromium
|
|
29
|
+
|
|
30
|
+
- name: Run Pytest
|
|
31
|
+
run: uv run pytest
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- published
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release-build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Install uv
|
|
16
|
+
uses: astral-sh/setup-uv@v5
|
|
17
|
+
with:
|
|
18
|
+
enable-cache: true
|
|
19
|
+
|
|
20
|
+
- name: Show project version
|
|
21
|
+
run: |
|
|
22
|
+
grep "version" pyproject.toml
|
|
23
|
+
|
|
24
|
+
- name: Build release distributions
|
|
25
|
+
run: uv build
|
|
26
|
+
|
|
27
|
+
- name: Upload distributions
|
|
28
|
+
uses: actions/upload-artifact@v4
|
|
29
|
+
with:
|
|
30
|
+
name: release-dists
|
|
31
|
+
path: dist/
|
|
32
|
+
|
|
33
|
+
pypi-publish:
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
needs:
|
|
36
|
+
- release-build
|
|
37
|
+
permissions:
|
|
38
|
+
id-token: write
|
|
39
|
+
contents: read
|
|
40
|
+
|
|
41
|
+
environment:
|
|
42
|
+
name: pypi
|
|
43
|
+
url: https://pypi.org/project/django-ec-calendar/
|
|
44
|
+
|
|
45
|
+
steps:
|
|
46
|
+
- name: Retrieve release distributions
|
|
47
|
+
uses: actions/download-artifact@v4
|
|
48
|
+
with:
|
|
49
|
+
name: release-dists
|
|
50
|
+
path: dist/
|
|
51
|
+
|
|
52
|
+
- name: Publish release distributions to PyPI
|
|
53
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
54
|
+
with:
|
|
55
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
.installed.cfg
|
|
9
|
+
*.egg
|
|
10
|
+
|
|
11
|
+
# Virtual environments
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
env/
|
|
15
|
+
|
|
16
|
+
# Testing / coverage
|
|
17
|
+
.pytest_cache/
|
|
18
|
+
.coverage
|
|
19
|
+
.coverage.*
|
|
20
|
+
coverage/
|
|
21
|
+
htmlcov/
|
|
22
|
+
.mypy_cache/
|
|
23
|
+
.ruff_cache/
|
|
24
|
+
.tox/
|
|
25
|
+
|
|
26
|
+
# Django
|
|
27
|
+
*.log
|
|
28
|
+
local_settings.py
|
|
29
|
+
db.sqlite3
|
|
30
|
+
db.sqlite3-journal
|
|
31
|
+
media/
|
|
32
|
+
|
|
33
|
+
# Node / JS
|
|
34
|
+
node_modules/
|
|
35
|
+
|
|
36
|
+
# Editors / OS
|
|
37
|
+
.vscode/
|
|
38
|
+
.idea/
|
|
39
|
+
.DS_Store
|
|
40
|
+
|
|
41
|
+
# Docs
|
|
42
|
+
docs/_build/
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# The vendored EventCalendar build: as it is published.
|
|
2
|
+
exclude: /vendor/
|
|
3
|
+
|
|
4
|
+
default_language_version:
|
|
5
|
+
python: &python-version python3.14
|
|
6
|
+
|
|
7
|
+
repos:
|
|
8
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
9
|
+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
|
|
10
|
+
hooks:
|
|
11
|
+
- id: check-added-large-files
|
|
12
|
+
- id: check-case-conflict
|
|
13
|
+
- id: check-json
|
|
14
|
+
- id: check-merge-conflict
|
|
15
|
+
- id: check-symlinks
|
|
16
|
+
- id: check-toml
|
|
17
|
+
- id: debug-statements
|
|
18
|
+
- id: end-of-file-fixer
|
|
19
|
+
- id: trailing-whitespace
|
|
20
|
+
|
|
21
|
+
- repo: https://github.com/biomejs/pre-commit
|
|
22
|
+
rev: d1ce4972fb5ad09afd33b432bca71e8c5dfbb2b5 # frozen: v2.5.6
|
|
23
|
+
hooks:
|
|
24
|
+
- id: biome-check
|
|
25
|
+
additional_dependencies:
|
|
26
|
+
- '@biomejs/biome@2.3.8'
|
|
27
|
+
language_version: default
|
|
28
|
+
|
|
29
|
+
- repo: https://github.com/adamchainz/django-upgrade
|
|
30
|
+
rev: bdcc9646c249f00ec9781751791e7b75b48b3722 # frozen: 1.31.1
|
|
31
|
+
hooks:
|
|
32
|
+
- id: django-upgrade
|
|
33
|
+
args: [--target-version, "4.2"]
|
|
34
|
+
|
|
35
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
36
|
+
rev: 39d9ac5938dadb73df0564a45f163e25ff9fa6e2 # frozen: v0.16.1
|
|
37
|
+
hooks:
|
|
38
|
+
- id: ruff-check
|
|
39
|
+
args: [--fix]
|
|
40
|
+
- id: ruff-format
|
|
41
|
+
|
|
42
|
+
- repo: local
|
|
43
|
+
hooks:
|
|
44
|
+
- id: mypy
|
|
45
|
+
name: mypy
|
|
46
|
+
entry: mypy
|
|
47
|
+
language: python
|
|
48
|
+
additional_dependencies:
|
|
49
|
+
- mypy>=1.10
|
|
50
|
+
- django-stubs[compatible-mypy]>=5
|
|
51
|
+
- django>=4.2
|
|
52
|
+
- pytest-django>=4.8
|
|
53
|
+
types: [python]
|
|
54
|
+
files: ^(src|example)/
|
|
55
|
+
pass_filenames: false
|
|
56
|
+
args: [src/django_ec_calendar, example]
|
|
57
|
+
|
|
58
|
+
# Only needed if the library ships Django templates (src/<pkg>/templates/).
|
|
59
|
+
# Remove this hook if it doesn't.
|
|
60
|
+
- repo: https://github.com/adamchainz/djade-pre-commit
|
|
61
|
+
rev: 52a7ce253113456c2a1113186a4a19b15c8b68af # frozen: 1.9.0
|
|
62
|
+
hooks:
|
|
63
|
+
- id: djade
|
|
64
|
+
files: '(/|^)templates/'
|
|
65
|
+
|
|
66
|
+
- repo: https://github.com/tox-dev/pyproject-fmt
|
|
67
|
+
rev: d600c142bb19f521ae6a6a345f94a2efd7937759 # frozen: v2.26.0
|
|
68
|
+
hooks:
|
|
69
|
+
- id: pyproject-fmt
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-10-29
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `CalendarAdminMixin`: a calendar of a changelist's objects (its queryset,
|
|
13
|
+
filters and search), a "Calendar" link away. A click opens an object,
|
|
14
|
+
selecting dates adds one with them, dragging one (or its end) saves its
|
|
15
|
+
dates — checked by the model, saved through `save_model()` and logged.
|
|
16
|
+
In Django's admin and in Unfold, following the page's theme.
|
|
17
|
+
- `CalendarSource`: objects as EventCalendar's events by their fields
|
|
18
|
+
(`DateTimeField` or `DateField`, an end, all day, a title and a color),
|
|
19
|
+
in the site's time zone whatever the browser's.
|
|
20
|
+
- `EventFeedView` and `{% ec_calendar %}`: a calendar on your own pages.
|
|
21
|
+
- EventCalendar 5.17.1 (vkurko, MIT), its standalone build, included.
|
|
22
|
+
- Events on the calendar's element, to do otherwise without changing its
|
|
23
|
+
script: `django-ec-calendar:event-click`, `:date-click`, `:select`
|
|
24
|
+
(cancellable) and `:event-change`.
|
|
25
|
+
- Spanish translation.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Development setup
|
|
4
|
+
|
|
5
|
+
With [uv](https://docs.astral.sh/uv/) (recommended):
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
uv sync
|
|
9
|
+
uv run playwright install --with-deps chromium
|
|
10
|
+
npm install
|
|
11
|
+
uv run pre-commit install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Without uv:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install -e ".[dev]"
|
|
18
|
+
playwright install --with-deps chromium
|
|
19
|
+
npm install
|
|
20
|
+
pre-commit install
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Running the example project
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd example
|
|
27
|
+
python manage.py migrate
|
|
28
|
+
python manage.py createsuperuser
|
|
29
|
+
python manage.py runserver
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
With Unfold: `DJANGO_SETTINGS_MODULE=example.settings_unfold python manage.py runserver`.
|
|
33
|
+
The admin's bookings and holidays have a "Calendar"; `/` is a calendar on a
|
|
34
|
+
page.
|
|
35
|
+
|
|
36
|
+
EventCalendar is vendored in
|
|
37
|
+
`src/django_ec_calendar/static/django_ec_calendar/vendor/event-calendar/`,
|
|
38
|
+
as `@event-calendar/build` publishes it (`npm pack @event-calendar/build@<version>`,
|
|
39
|
+
its `dist/event-calendar.min.{js,css}` and the repository's `LICENSE`). Update
|
|
40
|
+
its version in `config.py`'s docstring, the README and the CHANGELOG too.
|
|
41
|
+
|
|
42
|
+
## Tests
|
|
43
|
+
|
|
44
|
+
Python (pytest + pytest-django, coverage always on via `addopts`):
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uv run pytest
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`tests/e2e/` (real-browser tests via pytest-playwright, driving a real
|
|
51
|
+
Chromium against `live_server`) runs as part of that same `uv run pytest`
|
|
52
|
+
— no separate command. They need `uv run playwright install chromium`
|
|
53
|
+
once (see Setup above) and are slower than the rest of the suite;
|
|
54
|
+
everything else under `tests/` is unit/integration-level and doesn't
|
|
55
|
+
touch a browser.
|
|
56
|
+
|
|
57
|
+
JavaScript (vitest + jsdom):
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm test
|
|
61
|
+
npm run coverage
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Compatibility matrix (tox)
|
|
65
|
+
|
|
66
|
+
`uv run pytest` above only runs against whatever Django version `uv.lock`
|
|
67
|
+
resolved (the newest one satisfying `dependencies`). To check the full
|
|
68
|
+
supported range — every Django series in `classifiers`, against the
|
|
69
|
+
oldest and newest Python it supports (within this package's own
|
|
70
|
+
`requires-python` floor) — run the tox matrix instead:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
uv run tox run-parallel # every env, in parallel
|
|
74
|
+
uv run tox -e py314-dj52 # a single env, e.g. to debug one failure
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`[tool.tox]` in `pyproject.toml` lists the exact envs. Each one gets its own ephemeral venv (via
|
|
78
|
+
[tox-uv](https://github.com/tox-dev/tox-uv), using uv's own Python
|
|
79
|
+
builds — `uv python install <version>` once for any you don't have yet)
|
|
80
|
+
with only `pytest`/`pytest-django`/`pytest-cov` and that env's pinned
|
|
81
|
+
Django, not the full `dev` group, and skips `tests/e2e/` (no Playwright
|
|
82
|
+
in those envs). This only tests boundaries (oldest + newest Python per
|
|
83
|
+
Django series), not every valid combination — that catches most real
|
|
84
|
+
breakage while staying fast. Runs in CI as a separate
|
|
85
|
+
`compat-matrix.yml` workflow, alongside the regular `pytest.yml`. Update
|
|
86
|
+
the `env_list` here whenever `classifiers` gains or drops a Django
|
|
87
|
+
series.
|
|
88
|
+
|
|
89
|
+
## Lint / format / type-check
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
uv run ruff check .
|
|
93
|
+
uv run ruff format --check .
|
|
94
|
+
uv run mypy src example
|
|
95
|
+
# or, everything at once:
|
|
96
|
+
uv run pre-commit run --all-files
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The mypy pre-commit hook runs against the project venv (it needs
|
|
100
|
+
django-stubs to resolve model types), not an isolated pre-commit env.
|
|
101
|
+
|
|
102
|
+
## Before opening a PR
|
|
103
|
+
|
|
104
|
+
- [ ] `uv run pytest`
|
|
105
|
+
- [ ] `npm test`
|
|
106
|
+
- [ ] `uv run pre-commit run --all-files`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rodolfo Becerra
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|