Skip to content

Commit 913f2f6

Browse files
committed
modernize pyproject.toml, switch from check.sh->justfile, remove support for 3.8 #82 #83 #84
1 parent d5cafd3 commit 913f2f6

17 files changed

+789
-367
lines changed

.gitattributes

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
7+
8+
9+
# Source files
10+
# ============
11+
*.pxd text diff=python
12+
*.py text diff=python
13+
*.py3 text diff=python
14+
*.pyw text diff=python
15+
*.pyx text diff=python
16+
*.pyz text diff=python
17+
*.pyi text diff=python
18+
*.rst text
19+
*.md text
20+
justfile text
21+
*.toml text
22+
LICENSE text
23+
*.yaml text
24+
*.yml text
25+
*.po text
26+
*.tmpl text
27+
*.json text
28+
*.xml text
29+
30+
# powershell
31+
# ============
32+
*.ps1 text eol=crlf
33+
*.ps1x text eol=crlf
34+
*.psm1 text eol=crlf
35+
*.psd1 text eol=crlf
36+
*.ps1xml text eol=crlf
37+
*.pssc text eol=crlf
38+
*.psrc text eol=crlf
39+
*.cdxml text eol=crlf
40+
41+
# Jupyter notebook
42+
*.ipynb text eol=lf
43+
44+
# Declare files that will always have CRLF line endings on checkout.
45+
django_typer/management/commands/shells/powershell.tmpl text eol=crlf
46+
47+
# Binary files
48+
# ============
49+
*.db binary
50+
*.p binary
51+
*.pkl binary
52+
*.pickle binary
53+
*.pyc binary export-ignore
54+
*.pyo binary export-ignore
55+
*.pyd binary
56+
*.png binary
57+
*.jpg binary
58+
*.pdf binary
59+
*.svg binary
60+
*.drawio binary
61+
*.gif binary
62+
*.mo binary
63+
*.jpeg binary
64+
*.tif binary
65+
*.tiff binary
66+
*.ico binary
67+
*.eps binary
68+
69+
# Documents
70+
*.bibtex text diff=bibtex
71+
*.doc diff=astextplain
72+
*.DOC diff=astextplain
73+
*.docx diff=astextplain
74+
*.DOCX diff=astextplain
75+
*.dot diff=astextplain
76+
*.DOT diff=astextplain
77+
*.pdf diff=astextplain
78+
*.PDF diff=astextplain
79+
*.rtf diff=astextplain
80+
*.RTF diff=astextplain
81+
*.md text diff=markdown
82+
*.mdx text diff=markdown
83+
*.tex text diff=tex
84+
*.adoc text
85+
*.textile text
86+
*.mustache text
87+
*.csv text eol=crlf
88+
*.tab text
89+
*.tsv text
90+
*.txt text
91+
*.sql text
92+
*.epub diff=astextplain
93+
94+
# Scripts
95+
*.bash text eol=lf
96+
*.fish text eol=lf
97+
*.ksh text eol=lf
98+
*.sh text eol=lf
99+
*.zsh text eol=lf
100+
# These are explicitly windows files and should use crlf
101+
*.bat text eol=crlf
102+
*.cmd text eol=crlf
103+
*.ps1 text eol=crlf
104+
105+
# Archives
106+
*.7z binary
107+
*.bz binary
108+
*.bz2 binary
109+
*.bzip2 binary
110+
*.gz binary
111+
*.lz binary
112+
*.lzma binary
113+
*.rar binary
114+
*.tar binary
115+
*.taz binary
116+
*.tbz binary
117+
*.tbz2 binary
118+
*.tgz binary
119+
*.tlz binary
120+
*.txz binary
121+
*.xz binary
122+
*.Z binary
123+
*.zip binary
124+
*.zst binary
125+
126+
# Text files where line endings should be preserved
127+
*.patch -text
128+
129+
.gitattributes export-ignore
130+
.gitignore export-ignore
131+
.gitkeep export-ignore

.github/workflows/lint.yml

+46-22
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,74 @@
11
name: lint
22

3-
on: [push, pull_request, workflow_dispatch]
3+
permissions: read-all
4+
5+
on:
6+
push:
7+
pull_request:
8+
workflow_dispatch:
9+
inputs:
10+
debug:
11+
description: 'Open ssh debug session.'
12+
required: true
13+
default: false
14+
type: boolean
415

516
jobs:
617

7-
static-analysis:
18+
lint:
819
runs-on: ubuntu-latest
920
strategy:
1021
matrix:
1122
# run static analysis on bleeding and trailing edges
1223
python-version: [ '3.9', '3.13' ]
1324
django-version:
25+
- '3.2' # LTS April 2024
1426
- '4.2' # LTS April 2026
27+
- '5.0' # April 2025
1528
- '5.1' # December 2025
1629
exclude:
1730
- python-version: '3.9'
18-
django-version: '5.1'
19-
- python-version: '3.13'
2031
django-version: '4.2'
32+
- python-version: '3.9'
33+
django-version: '5.0'
34+
- python-version: '3.13'
35+
django-version: '3.2'
36+
- python-version: '3.9'
37+
django-version: '5.1'
38+
39+
env:
40+
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
41+
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
2142

2243
steps:
2344
- uses: actions/checkout@v4
2445
- name: Set up Python ${{ matrix.python-version }}
2546
uses: actions/setup-python@v5
47+
id: sp
2648
with:
2749
python-version: ${{ matrix.python-version }}
2850

29-
- name: Install Poetry
30-
run: |
31-
pip install pipx
32-
pipx ensurepath
33-
pipx install poetry
34-
poetry config --local virtualenvs.create true
35-
poetry config --local virtualenvs.in-project true
36-
poetry env use python
51+
- name: Install Just
52+
uses: extractions/setup-just@v2
3753
- name: Install Dependencies
3854
run: |
39-
poetry config virtualenvs.in-project true
40-
poetry run pip install --upgrade pip
41-
sed -i 's/^python = .*/python = "^${{ matrix.python-version }}"/' pyproject.toml
42-
poetry add django@^${{ matrix.django-version }}
43-
poetry install --no-interaction -E all --with psycopg2
44-
55+
just init ${{ steps.sp.outputs.python-path }} install-docs
56+
just pin-dependency Django~=${{ matrix.django-version }}.0
57+
- name: Install Emacs
58+
if: ${{ github.event.inputs.debug == 'true' }}
59+
run: |
60+
sudo apt install emacs
61+
- name: Setup tmate session
62+
if: ${{ github.event.inputs.debug == 'true' }}
63+
uses: mxschmitt/[email protected]
64+
with:
65+
detached: true
66+
timeout-minutes: 60
4567
- name: Run Static Analysis
4668
run: |
47-
source .venv/bin/activate
48-
./check.sh --no-fix
49-
python -m readme_renderer ./README.md -o /tmp/README.html
50-
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
69+
just test ./tests/verify_environment.py
70+
just check-lint
71+
just check-format
72+
just check-types
73+
just check-package
74+
just check-readme

0 commit comments

Comments
 (0)