Skip to content

Commit 0648ede

Browse files
committed
Update repo and CI setup
1 parent 0b74f4a commit 0648ede

File tree

1,068 files changed

+101
-25689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,068 files changed

+101
-25689
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,10 @@
11
name: CI
2-
32
on:
43
push:
54
branches:
65
- main
76
pull_request:
8-
97
jobs:
10-
11-
lint:
12-
runs-on: ubuntu-latest
13-
strategy:
14-
matrix:
15-
lint-command:
16-
- bandit -r . -x ./tests
17-
- black --check --diff .
18-
- flake8 .
19-
- isort --check-only --diff .
20-
- pydocstyle .
21-
steps:
22-
- uses: actions/checkout@v6
23-
- uses: actions/setup-python@v6
24-
with:
25-
python-version: "3.x"
26-
cache: 'pip'
27-
cache-dependency-path: 'pyproject.toml'
28-
- run: python -m pip install -e .[lint]
29-
- run: ${{ matrix.lint-command }}
30-
318
dist:
329
runs-on: ubuntu-latest
3310
steps:
@@ -41,11 +18,8 @@ jobs:
4118
- uses: actions/upload-artifact@v6
4219
with:
4320
path: dist/*
44-
4521
pytest-python:
4622
name: PyTest
47-
needs:
48-
- lint
4923
strategy:
5024
matrix:
5125
python-version:
@@ -54,7 +28,7 @@ jobs:
5428
- "3.11"
5529
- "3.12"
5630
django-version:
57-
- "4.2" # LTS
31+
- "4.2" # LTS
5832
runs-on: ubuntu-latest
5933
steps:
6034
- uses: actions/checkout@v6
@@ -69,11 +43,8 @@ jobs:
6943
with:
7044
flags: py${{ matrix.python-version }}
7145
token: ${{ secrets.CODECOV_TOKEN }}
72-
7346
pytest-django:
7447
name: PyTest
75-
needs:
76-
- lint
7748
strategy:
7849
matrix:
7950
python-version:
@@ -96,11 +67,8 @@ jobs:
9667
with:
9768
flags: dj${{ matrix.django-version }}
9869
token: ${{ secrets.CODECOV_TOKEN }}
99-
10070
pytest-extras:
10171
name: PyTest
102-
needs:
103-
- lint
10472
strategy:
10573
matrix:
10674
extras:
@@ -118,10 +86,9 @@ jobs:
11886
with:
11987
flags: dj${{ matrix.extras }}
12088
token: ${{ secrets.CODECOV_TOKEN }}
121-
12289
codeql:
12390
name: CodeQL
124-
needs: [ dist, pytest-python, pytest-django ]
91+
needs: [dist, pytest-python, pytest-django]
12592
runs-on: ubuntu-latest
12693
permissions:
12794
actions: read
@@ -130,7 +97,7 @@ jobs:
13097
strategy:
13198
fail-fast: false
13299
matrix:
133-
language: [ python ]
100+
language: [python]
134101
steps:
135102
- name: Checkout
136103
uses: actions/checkout@v6

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,6 @@ package-lock.json
169169

170170
# Django
171171
tests/staticfiles/
172+
173+
# Node.js
174+
node_modules/

.pre-commit-config.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v6.0.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: check-merge-conflict
9+
- id: check-ast
10+
- id: check-toml
11+
- id: check-yaml
12+
- id: debug-statements
13+
- id: end-of-file-fixer
14+
- id: name-tests-test
15+
args: ["--pytest-test-first"]
16+
exclude: ^tests\/(testapp\/|manage.py)
17+
- id: no-commit-to-branch
18+
args: [--branch, main]
19+
- repo: https://github.com/asottile/pyupgrade
20+
rev: v3.21.2
21+
hooks:
22+
- id: pyupgrade
23+
- repo: https://github.com/adamchainz/django-upgrade
24+
rev: 1.29.1
25+
hooks:
26+
- id: django-upgrade
27+
- repo: https://github.com/hukkin/mdformat
28+
rev: 1.0.0
29+
hooks:
30+
- id: mdformat
31+
additional_dependencies:
32+
- mdformat-ruff
33+
- mdformat-footnote
34+
- mdformat-gfm
35+
- mdformat-gfm-alerts
36+
- repo: https://github.com/astral-sh/ruff-pre-commit
37+
rev: v0.14.9
38+
hooks:
39+
- id: ruff-check
40+
args: [--fix, --exit-non-zero-on-fix]
41+
- id: ruff-format
42+
- repo: https://github.com/google/yamlfmt
43+
rev: v0.20.0
44+
hooks:
45+
- id: yamlfmt
46+
# See https://pre-commit.ci/
47+
ci:
48+
autoupdate_schedule: weekly
49+
skip:
50+
- no-commit-to-branch

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Django ESM
22

3+
<p align="center">
4+
<picture>
5+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/codingjoe/django-esm/raw/main/images/logo-dark.svg">
6+
<source media="(prefers-color-scheme: light)" srcset="https://github.com/codingjoe/django-esm/raw/main/images/logo-light.svg">
7+
<img alt="Django ESM: NextGen JavaScript ESM module support for Django" src="https://github.com/codingjoe/django-esm/raw/main/images/logo-light.svg">
8+
</picture>
9+
</p>
10+
311
NextGen JavaScript ESM module support for Django.
412

513
[![PyPi Version](https://img.shields.io/pypi/v/django-esm.svg)](https://pypi.python.org/pypi/django-esm/)
@@ -8,11 +16,11 @@ NextGen JavaScript ESM module support for Django.
816

917
## Highlights
1018

11-
* easy transition
12-
* smart cache busting
13-
* no more bundling
14-
* native ESM support
15-
* local vendoring with npm
19+
- easy transition
20+
- smart cache busting
21+
- no more bundling
22+
- native ESM support
23+
- local vendoring with npm
1624

1725
## Setup
1826

images/logo-dark.svg

Lines changed: 16 additions & 0 deletions
Loading

images/logo-light.svg

Lines changed: 16 additions & 0 deletions
Loading

tests/node_modules/.package-lock.json

Lines changed: 0 additions & 83 deletions
This file was deleted.

tests/node_modules/@lit-labs/ssr-dom-shim/README.md

Lines changed: 0 additions & 58 deletions
This file was deleted.

tests/node_modules/@lit-labs/ssr-dom-shim/index.d.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/node_modules/@lit-labs/ssr-dom-shim/index.d.ts.map

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

0 commit comments

Comments
 (0)