Skip to content

Commit b8b93ad

Browse files
committed
first commit
0 parents  commit b8b93ad

Some content is hidden

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

58 files changed

+13917
-0
lines changed

.editorconfig

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
end_of_line = lf
11+
charset = utf-8
12+
quote_style = double
13+
14+
# Use 2 spaces for the HTML files
15+
[*.html]
16+
indent_size = 2
17+
18+
# The JSON files contain newlines inconsistently
19+
[*.json]
20+
indent_size = 2
21+
insert_final_newline = ignore
22+
23+
[**/admin/js/vendor/**]
24+
indent_style = ignore
25+
indent_size = ignore
26+
27+
# Minified JavaScript files shouldn't be changed
28+
[**.min.js]
29+
indent_style = ignore
30+
insert_final_newline = ignore
31+
32+
# Makefiles always use tabs for indentation
33+
[Makefile]
34+
indent_style = tab
35+
36+
# Batch files use tabs for indentation
37+
[*.bat]
38+
indent_style = tab
39+
40+
[*.txt]
41+
insert_final_newline = false

.github/release-drafter.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
change-template: '- $TITLE (#$NUMBER) @$AUTHOR'
4+
categories:
5+
- title: '⚠️ Breaking'
6+
labels: ['breaking', 'semver:major']
7+
- title: '✨ Features'
8+
labels: ['feature', 'enhancement', 'semver:minor']
9+
- title: '🐞 Fixes'
10+
labels: ['bug', 'fix', 'semver:patch']
11+
- title: '🧰 Maintenance'
12+
labels: ['chore', 'refactor']
13+
- title: '📝 Docs'
14+
labels: ['docs']
15+
- title: '⚙️ CI'
16+
labels: ['ci']
17+
exclude-labels:
18+
- 'skip-changelog'
19+
template: |
20+
## Changes
21+
$CHANGES
22+
23+
## Contributors
24+
$CONTRIBUTORS
25+
autolabeler:
26+
- label: 'docs'
27+
files: ['docs/**', '**/*.rst', '**/*.md']
28+
- label: 'ci'
29+
files: ['.github/workflows/**']
30+
- label: 'feature'
31+
title:
32+
- '/^feat(\(.+\))?:/i'
33+
- label: 'fix'
34+
title:
35+
- '/^fix(\(.+\))?:/i'
36+
version-resolver:
37+
major:
38+
labels: ['breaking','semver:major']
39+
minor:
40+
labels: ['feature','enhancement','semver:minor']
41+
patch:
42+
labels: ['fix','bug','semver:patch']
43+
default: patch

.github/workflows/docs_deploy.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/**"
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: "3.10"
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install sphinx sphinx_rtd_theme
37+
pip install -e .
38+
if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi
39+
40+
- name: Build docs
41+
run: |
42+
cd docs
43+
make html
44+
# Create .nojekyll file to prevent GitHub Pages from ignoring files that start with an underscore
45+
touch _build/html/.nojekyll
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: docs/_build/html
51+
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
needs: build
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: astral-sh/setup-uv@v5
15+
with:
16+
version: "0.6.5"
17+
python-version: "3.12"
18+
enable-cache: true
19+
20+
- name: Clean build artifacts
21+
run: rm -rf dist/ build/ *.egg-info
22+
23+
- name: Install build tooling
24+
run: |
25+
uv venv
26+
uv pip install --upgrade build twine
27+
28+
- name: Build sdist+wheel
29+
run: uv run python -m build
30+
31+
- name: Verify metadata
32+
run: uv run python -m twine check dist/*
33+
34+
- name: Publish to PyPI (password)
35+
env:
36+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
37+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
38+
run: uv run python -m twine upload --non-interactive dist/*

.github/workflows/publish_to_testpypi.yml

Whitespace-only changes.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- main
8+
# pull_request event is required only for autolabeler
9+
# pull_request:
10+
# # Only following types are handled by the action, but one can default to all as well
11+
# types: [opened, reopened, synchronize]
12+
# pull_request_target event is required for autolabeler to support PRs from forks
13+
pull_request_target:
14+
types: [opened, reopened, synchronize, edited]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
update_release_draft:
21+
permissions:
22+
# write permission is required to create a github release
23+
contents: write
24+
# write permission is required for autolabeler
25+
# otherwise, read permission is required at least
26+
pull-requests: write
27+
runs-on: ubuntu-latest
28+
steps:
29+
# (Optional) GitHub Enterprise requires GHE_HOST variable set
30+
#- name: Set GHE_HOST
31+
# run: |
32+
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
33+
34+
# Drafts your next Release notes as Pull Requests are merged into "master"
35+
- uses: release-drafter/release-drafter@v6
36+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
37+
# with:
38+
# config-name: my-config.yml
39+
# disable-autolabeler: true
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
config-name: release-drafter.yml

.github/workflows/testing.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore:
7+
- "README.md"
8+
pull_request:
9+
paths-ignore:
10+
- "README.md"
11+
branches: [main]
12+
13+
jobs:
14+
test:
15+
name: Run Tests
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
# supporting Python 3.10-3.12
22+
- python-version: "3.10"
23+
django-version: "4.2"
24+
- python-version: "3.11"
25+
django-version: "4.2"
26+
- python-version: "3.12"
27+
django-version: "4.2"
28+
- python-version: "3.13"
29+
django-version: "4.2"
30+
31+
- python-version: "3.10"
32+
django-version: "5.0"
33+
- python-version: "3.11"
34+
django-version: "5.0"
35+
- python-version: "3.12"
36+
django-version: "5.0"
37+
- python-version: "3.13"
38+
django-version: "5.0"
39+
40+
- python-version: "3.10"
41+
django-version: "5.1"
42+
- python-version: "3.11"
43+
django-version: "5.1"
44+
- python-version: "3.12"
45+
django-version: "5.1"
46+
- python-version: "3.13"
47+
django-version: "5.1"
48+
49+
- python-version: "3.10"
50+
django-version: "5.2"
51+
- python-version: "3.11"
52+
django-version: "5.2"
53+
- python-version: "3.12"
54+
django-version: "5.2"
55+
- python-version: "3.13"
56+
django-version: "5.2"
57+
58+
steps:
59+
- uses: actions/checkout@v4
60+
61+
- name: Install UV
62+
uses: astral-sh/setup-uv@v5
63+
with:
64+
version: "0.6.5"
65+
python-version: ${{ matrix.python-version }}
66+
enable-cache: true
67+
68+
- name: Create venv and install dependencies
69+
run: |
70+
uv venv
71+
uv pip install "django==${{ matrix.django-version }}"
72+
uv sync --all-extras --dev
73+
74+
- name: Run Tests
75+
run: uv run python manage.py test -v 2
76+
77+
# lint:
78+
# name: Lint Code
79+
# runs-on: ubuntu-latest
80+
# steps:
81+
# - uses: actions/checkout@v4
82+
83+
# - name: Install UV
84+
# uses: astral-sh/setup-uv@v5
85+
# with:
86+
# version: "0.6.5"
87+
# python-version: "3.12"
88+
# enable-cache: true
89+
90+
# - name: Create venv and install dependencies
91+
# run: |
92+
# uv venv
93+
94+
# - name: Run Ruff
95+
# run: uv run ruff check .

0 commit comments

Comments
 (0)