Skip to content

Commit 357dfe5

Browse files
committed
fix #29 fix #30 - move to justfile build tooling
1 parent 8cf50b0 commit 357dfe5

22 files changed

+757
-241
lines changed

.gitattributes

Lines changed: 131 additions & 0 deletions
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

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,74 @@
11
name: lint
22

3+
permissions: read-all
4+
35
on:
46
push:
57
pull_request:
68
workflow_dispatch:
79
inputs:
810
debug:
9-
description: 'Set to on, to open ssh debug session.'
11+
description: 'Open ssh debug session.'
1012
required: true
11-
default: 'off'
13+
default: false
14+
type: boolean
1215

1316
jobs:
1417

15-
linting:
18+
lint:
1619
runs-on: ubuntu-latest
1720
strategy:
1821
matrix:
1922
# run static analysis on bleeding and trailing edges
20-
python-version: [ '3.8', '3.10', '3.13' ]
23+
python-version: [ '3.9', '3.13' ]
2124
django-version:
2225
- '3.2' # LTS April 2024
2326
- '4.2' # LTS April 2026
2427
- '5.0' # April 2025
2528
- '5.1' # December 2025
2629
exclude:
27-
- python-version: '3.8'
28-
django-version: '4.2'
29-
- python-version: '3.13'
30+
- python-version: '3.9'
3031
django-version: '4.2'
32+
- python-version: '3.9'
33+
django-version: '5.0'
3134
- python-version: '3.13'
3235
django-version: '3.2'
33-
- python-version: '3.10'
34-
django-version: '3.2'
35-
- python-version: '3.8'
36-
django-version: '5.0'
37-
- python-version: '3.10'
38-
django-version: '5.0'
39-
- python-version: '3.8'
40-
django-version: '5.1'
41-
- python-version: '3.10'
36+
- python-version: '3.9'
4237
django-version: '5.1'
4338

39+
env:
40+
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
41+
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
42+
4443
steps:
4544
- uses: actions/checkout@v4
4645
- name: Set up Python ${{ matrix.python-version }}
4746
uses: actions/setup-python@v5
47+
id: sp
4848
with:
4949
python-version: ${{ matrix.python-version }}
50-
- name: Install Poetry
51-
run: |
52-
pip install pipx
53-
pipx ensurepath
54-
pipx install poetry
55-
poetry config --local virtualenvs.create true
56-
poetry config --local virtualenvs.in-project true
57-
poetry env use python
50+
51+
- name: Install Just
52+
uses: extractions/setup-just@v2
5853
- name: Install Dependencies
5954
run: |
60-
poetry config virtualenvs.in-project true
61-
poetry run pip install --upgrade pip
62-
poetry install -E rich
63-
poetry run pip install colorama
64-
poetry run pip install -U "django~=${{ matrix.django-version }}"
55+
just init ${{ steps.sp.outputs.python-path }} install-docs
56+
just pin-dependency Django~=${{ matrix.django-version }}.0
6557
- name: Install Emacs
66-
if: ${{ github.event.inputs.debug == 'on' }}
58+
if: ${{ github.event.inputs.debug == 'true' }}
6759
run: |
6860
sudo apt install emacs
6961
- name: Setup tmate session
70-
if: ${{ github.event.inputs.debug == 'on' }}
71-
uses: mxschmitt/action-tmate@v3
62+
if: ${{ github.event.inputs.debug == 'true' }}
63+
uses: mxschmitt/action-tmate@v3.19
7264
with:
7365
detached: true
7466
timeout-minutes: 60
7567
- name: Run Static Analysis
7668
run: |
77-
source .venv/bin/activate
78-
./check.sh --no-fix
79-
python -m readme_renderer ./README.md -o /tmp/README.html
80-
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)