Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
264 commits
Select commit Hold shift + click to select a range
cf17787
pass --settings and --pythonpath to complete on zshell, #68
bckohan Nov 21, 2024
3b482d5
pass --settings and --pythonpath on bash completions #68
bckohan Nov 21, 2024
f714459
fix #73
bckohan Nov 23, 2024
35066e2
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Nov 23, 2024
a4ad3e2
Merge branch 'main' into v3
bckohan Nov 23, 2024
851a14e
update changelog #73
bckohan Nov 24, 2024
b6353d2
fix tests to run on windows, add windows CI #146
bckohan Nov 26, 2024
c3c0364
fix test workflow dependencies
bckohan Nov 26, 2024
34274d4
run windows tests in powershell
bckohan Nov 26, 2024
0fcfd0d
fix linux tests
bckohan Nov 26, 2024
70c42ed
install poetry using pipx
bckohan Nov 26, 2024
8a44688
satisfy deprecation warning on import
bckohan Nov 26, 2024
6124f7f
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Nov 26, 2024
fd0ec98
troubleshoot windows workflow
bckohan Nov 26, 2024
b0b66e5
fix windows poetry install, remove dependency on snok action, use pip…
bckohan Nov 26, 2024
795b229
try fix windows CI
bckohan Nov 26, 2024
c44789b
try fix windows CI
bckohan Nov 26, 2024
cc90c2f
try fix windows CI
bckohan Nov 26, 2024
a160925
replace check.sh with a justfile interface, fix #147
bckohan Nov 26, 2024
5d8be34
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Nov 26, 2024
98c7b02
clarify just recipes #147
bckohan Nov 26, 2024
346c543
handle click updates for type check
bckohan Nov 26, 2024
69d8f88
set default windows shell to powershell
bckohan Nov 26, 2024
be3b9ea
flesh out justfile, make windows compatible #147
bckohan Nov 26, 2024
c342c13
fix doc lint #147
bckohan Nov 26, 2024
87003ad
add attributes file for line ending normalization
bckohan Nov 27, 2024
6780908
add common gitattributes settings
bckohan Nov 27, 2024
936ede8
ignore CRLF on windows rst doc8
bckohan Nov 27, 2024
8c4672b
try fix windows runners
bckohan Nov 27, 2024
a970369
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Nov 27, 2024
f151428
try fix CI
bckohan Nov 27, 2024
174da60
more justfile work, mark rich/no rich tests for CI efficiency
bckohan Nov 28, 2024
345b03a
add macosx tests #148
bckohan Nov 28, 2024
096d33b
merge v2.5
bckohan Nov 30, 2024
88b204d
more justfile work, fix link check, rename completer script directories
bckohan Nov 30, 2024
a04bb6a
add installer for manage script for shell_complete testing
bckohan Dec 1, 2024
889b0b0
fix #150
bckohan Dec 2, 2024
4418e96
move shell completion scripts, just file poetry lock file update
bckohan Dec 2, 2024
92c0fcf
justfile tweaks
bckohan Dec 3, 2024
e46be30
move CI towards using just interface
bckohan Dec 3, 2024
7368cdd
merge v2.6.0 from downstream
bckohan Dec 3, 2024
3738c1a
merge v2.6.0 changes from downstream
bckohan Dec 3, 2024
6647960
fix #153
bckohan Dec 3, 2024
1597b0f
start work on in house shell completer classes #156
bckohan Dec 4, 2024
f87f2d3
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Dec 4, 2024
64f607f
signficant shellcompletion refactor, move to inhouse completer classe…
bckohan Dec 9, 2024
9312498
more work on #156
bckohan Dec 18, 2024
1451da7
work on migration guide
bckohan Dec 18, 2024
775fe15
zshell tests working again #156
bckohan Dec 18, 2024
d6401e9
add tests for terminal formatting in shell completion #156 #152
bckohan Dec 19, 2024
fa39b0c
update changelog
bckohan Dec 19, 2024
91510db
add tests for #68
bckohan Dec 19, 2024
2ea9f89
increment minimum click version to 8.1.8 (fixes color issue on windows)
bckohan Dec 24, 2024
94979b1
fix bash completion scripts #156
bckohan Dec 31, 2024
bdb6be5
fix just init OoO, fix error introduced in utils
bckohan Dec 31, 2024
ed2296c
force absolute paths on install of completion scripts #156
bckohan Dec 31, 2024
5db4f95
run parser completer tests on current shell, or default to bash #156
bckohan Dec 31, 2024
f9b490a
more shellcompletion CI work #156
bckohan Dec 31, 2024
bff87d9
fix bash shellcomplete environment activation to not assume the path …
bckohan Dec 31, 2024
c47a575
simply app stack for completion CI #156
bckohan Dec 31, 2024
2217a8a
increase completion test speed and adjust it to work across a wider r…
bckohan Jan 1, 2025
5b2352e
try to use path separator that is present in path completer before de…
bckohan Jan 1, 2025
1b2256f
fix CI for windows
bckohan Jan 1, 2025
67bc455
fix path completer tests
bckohan Jan 1, 2025
84510a1
first cut at getting powershell working #156
bckohan Jan 2, 2025
ba86354
fix get_usage_script #156
bckohan Jan 2, 2025
e58baff
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Jan 2, 2025
14db8e1
powershell completion is working #156
bckohan Jan 3, 2025
53d46d7
fix --settings= and --pythonpath= passthrough for bash and zsh, start…
bckohan Jan 3, 2025
e5502f4
powershell completion tests almost working #156
bckohan Jan 4, 2025
4ce6e0f
update fish shell completion #156
bckohan Jan 5, 2025
2cb7a33
powershell completion tests working, more work on fish tests #156
bckohan Jan 5, 2025
0f7345f
fish completions working #156
bckohan Jan 5, 2025
02bda8a
minor fixes #156
bckohan Jan 6, 2025
4bc1a14
add scorecard workflow #158
bckohan Jan 6, 2025
6ba1a79
set max versions for all main deps
bckohan Jan 6, 2025
fa30d6e
add CodeQL badge #158
bckohan Jan 6, 2025
8c5d282
fix CodeQL badge #158
bckohan Jan 6, 2025
0463091
fix codeQL badge #158
bckohan Jan 6, 2025
c3aa393
update security policy
bckohan Jan 6, 2025
5015389
add docs-live command to serve/rebuild docs as files are edited
bckohan Jan 6, 2025
e5a755d
enable scorecard repo introspection #158
bckohan Jan 7, 2025
e8c4558
add documentation for completer customization #156
bckohan Jan 7, 2025
dd82e34
update CI testing #148, #146
bckohan Jan 7, 2025
f1338c6
run scorecard on push
bckohan Jan 7, 2025
daf4827
move scorecard
bckohan Jan 7, 2025
53454e1
update scorecard Ci
bckohan Jan 7, 2025
86c6c74
fix tests
bckohan Jan 7, 2025
0555e57
peg scorecard version
bckohan Jan 7, 2025
bb398e0
try fix CI
bckohan Jan 7, 2025
32b6dee
try fix CI
bckohan Jan 7, 2025
3829394
run scorecard only on main
bckohan Jan 7, 2025
d1080e3
tweak justfile tests
bckohan Jan 7, 2025
546a652
try fix bash CI tests
bckohan Jan 7, 2025
7b41c78
add scorecard badge to security #158
bckohan Jan 7, 2025
2a0d638
fix staticmethod name bug
bckohan Jan 7, 2025
077356b
try fix bash completion
bckohan Jan 7, 2025
8aaa492
fix linux bash completions
bckohan Jan 7, 2025
8678899
add zshell unlink profile test to CI
bckohan Jan 7, 2025
4a10ac0
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Jan 7, 2025
07758d0
flip skip flag on profile tests
bckohan Jan 7, 2025
26a36e2
add no profile test for bash
bckohan Jan 7, 2025
d9c2057
more tests for coverage
bckohan Jan 7, 2025
3e92759
fix missing profile zshrc install
bckohan Jan 7, 2025
f95a5bf
add completion test with no TEMPLATES configuration
bckohan Jan 7, 2025
69ee3fa
add tests for coverage
bckohan Jan 7, 2025
14c2a33
add fallback import path completer and fallback test to completion in…
bckohan Jan 7, 2025
5f1c94d
skip fallback tests when approprite
bckohan Jan 7, 2025
17abfeb
add reentrant install/uninstall test
bckohan Jan 8, 2025
ca2d25d
add multiple install test for completion coverage
bckohan Jan 8, 2025
42272f3
fix multi install test
bckohan Jan 8, 2025
74da0f0
fix CI coverage file artificats
bckohan Jan 8, 2025
4f41718
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Jan 8, 2025
872dd45
fix CI coverage file artificats
bckohan Jan 8, 2025
c37ba34
fix CI coverage file artificats
bckohan Jan 8, 2025
7fb301a
try fix coverage CI
bckohan Jan 8, 2025
892cfa4
fix coverage files
bckohan Jan 8, 2025
6db5c67
add macos bash test
bckohan Jan 8, 2025
cdec104
try default bash for completion tests on mac in CI
bckohan Jan 8, 2025
ba05b4e
add unknown shell test for coverage
bckohan Jan 8, 2025
4c67060
try to include utils.py in coverage report
bckohan Jan 8, 2025
b792375
add shell resolution test
bckohan Jan 8, 2025
480a394
test shell workflows
bckohan Jan 8, 2025
4bcab6b
fix shell detection tests in CI
bckohan Jan 9, 2025
29d3b23
simplify github actions workflows, add fish tests
bckohan Jan 9, 2025
1d3d17d
remove yaml anchors, apparently GHA doesnt support hem because it sucks
bckohan Jan 9, 2025
9d4263d
fix GHA yaml syntax
bckohan Jan 9, 2025
e4ca191
fix fish action
bckohan Jan 9, 2025
857d9a6
try fix CI
bckohan Jan 9, 2025
b10fdbe
try fix macos resolution tests
bckohan Jan 9, 2025
b94331e
add a canary test for shellingham
bckohan Jan 10, 2025
75ac5ed
try fix shellingham detection on macos runner
bckohan Jan 10, 2025
f706204
try fix osx runner shell detection
bckohan Jan 10, 2025
a07144e
temporarily disable osx shell resolution tsts
bckohan Jan 10, 2025
c4810bc
add utils tests for coverage
bckohan Jan 10, 2025
b1279cc
add utils tests for coverage
bckohan Jan 10, 2025
345406f
fix test_utils
bckohan Jan 10, 2025
e5ecc5f
fix utils
bckohan Jan 10, 2025
d64ffae
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Jan 10, 2025
ae7c7f0
fix test_utils
bckohan Jan 10, 2025
67ccc6e
complete check call frame coverage
bckohan Jan 10, 2025
d63e143
add cmd shell detection failure test
bckohan Jan 10, 2025
ea0624e
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Jan 10, 2025
d6b4aec
add mixed divider path completion test on windows
bckohan Jan 10, 2025
425c512
try fix path completion
bckohan Jan 10, 2025
f7669fc
fix pythonpath parser test
bckohan Jan 10, 2025
8712d5b
ignore shell_complete deprecation warning in tests
bckohan Jan 10, 2025
6167482
fix mixed divider test for windows
bckohan Jan 11, 2025
6429405
add bad extension registration test for coverage, try fix windows non…
bckohan Jan 11, 2025
2c584ef
update and run ruff, fix windows powershell tests
bckohan Jan 11, 2025
f1e1374
speed up completer tests
bckohan Jan 11, 2025
0c8faf8
try fix windows completion tests in CI
bckohan Jan 11, 2025
8aeed62
try fix windows completion tests in CI
bckohan Jan 11, 2025
7c6c0c9
increase timing of posix shell complete tests to try to reduce spurio…
bckohan Jan 11, 2025
81694c2
traceback config test for coverage
bckohan Jan 11, 2025
87608aa
run parser completer tests on fish
bckohan Jan 11, 2025
1002288
push all shell specific tests into just commands
bckohan Jan 13, 2025
92f4ade
simplify zsh tests on macos
bckohan Jan 13, 2025
e52dcc3
try fix shell tests in CI
bckohan Jan 13, 2025
f45558e
try fix shell tests in CI
bckohan Jan 13, 2025
b67caed
try shell detection debug
bckohan Jan 13, 2025
4d584be
try shell detection debug
bckohan Jan 13, 2025
8cffa19
try shell detection debug
bckohan Jan 13, 2025
c9c7188
echo shell
bckohan Jan 13, 2025
8166b44
update macos runner to 14
bckohan Jan 13, 2025
4f3f0a7
try fix shell detection
bckohan Jan 13, 2025
1418d9b
fix shell tests in CI
bckohan Jan 13, 2025
a37d695
set osx runner to latest
bckohan Jan 13, 2025
f3f7ae4
add tests for coverage
bckohan Jan 14, 2025
86c161d
simplify code for coverage
bckohan Jan 14, 2025
eff2e67
rearrange completion class imports, add tests for coverage #156
bckohan Jan 14, 2025
bfca82c
move shell classes into the plugin pattern so they can be reliably ov…
bckohan Jan 15, 2025
f9ffe54
try fix tests
bckohan Jan 15, 2025
7a6e1a5
fix tests in CI
bckohan Jan 15, 2025
243b3b9
fix bash complete tests in CI
bckohan Jan 15, 2025
db04071
tweak tests for coverage
bckohan Jan 15, 2025
19afa09
add code to check if any tests are missed
bckohan Jan 16, 2025
b396a53
fix test logging
bckohan Jan 16, 2025
3ae0037
fix hook name
bckohan Jan 16, 2025
02f0c59
add performance regression #157
bckohan Jan 16, 2025
56fb192
relax time inflation performance regression
bckohan Jan 16, 2025
a3cfdd3
fix #17
bckohan Jan 17, 2025
bad591f
fix #14 fix #160
bckohan Jan 17, 2025
4bf1973
ignore json files under test
bckohan Jan 17, 2025
37645b5
fix json ignore
bckohan Jan 17, 2025
ad5d937
add parser test to FileField and FilePathField tests
bckohan Jan 17, 2025
732c896
doc tweaks
bckohan Jan 17, 2025
5c89f27
move missed tests scripting
bckohan Jan 20, 2025
6573caa
fix #13 and fix #14
bckohan Jan 21, 2025
c16ea21
adjust for coverage
bckohan Jan 21, 2025
08b2806
correct datetime timezone behavior, add order_by parameter on complet…
bckohan Jan 21, 2025
a6b9fb9
fix postgres test
bckohan Jan 21, 2025
4f77428
try fix postgres CI by running migrate manually
bckohan Jan 22, 2025
ba1fd5d
remove manual migrate
bckohan Jan 22, 2025
d3bd159
try fix postgres tests
bckohan Jan 23, 2025
8138038
cleanup poll example
bckohan Jan 23, 2025
e42c23d
try fix postgres
bckohan Jan 25, 2025
791c90e
point dependabot at GHA too
bckohan Jan 28, 2025
7ef7428
Merge branch 'v3' of https://github.com/django-commons/django-typer i…
bckohan Jan 28, 2025
51f43ed
restrict dev dependency versions, rely on dependabot updates
bckohan Jan 28, 2025
6aae5ea
relax perf regression threshold b/c CI is hitting it
bckohan Jan 28, 2025
f0a3b3e
fix sphinx dep
bckohan Jan 28, 2025
7b2b0a7
first cut at duration completer, #16
bckohan Jan 28, 2025
8f03d0b
relax perf regression even more
bckohan Jan 28, 2025
e113ab0
duration autocomplete working
bckohan Feb 3, 2025
59497f7
duration autocomplete working, fix #16
bckohan Feb 3, 2025
5f09769
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
bckohan Feb 3, 2025
877c2ff
relax perf test because its triggering in CI
bckohan Feb 3, 2025
de11397
clarify parser errors a little bit better
bckohan Feb 3, 2025
d0b0c82
coverage
bckohan Feb 3, 2025
4b5c82d
fix #164
bckohan Feb 3, 2025
ad5c42c
fix #163
bckohan Feb 3, 2025
284963f
start work on #58 and #162
bckohan Feb 3, 2025
4daaa2c
fix #58 and fix #162
bckohan Feb 4, 2025
94beebd
remove unnecessary translation hooks #18
bckohan Feb 4, 2025
1f31a88
relocate model_parser_completer #163
bckohan Feb 4, 2025
96c773c
run google translate on helps #18
bckohan Feb 4, 2025
1552726
fix quotes #18
bckohan Feb 4, 2025
2425d23
try fix bash completion tests
bckohan Feb 4, 2025
6f95462
try fix linux bash tests
bckohan Feb 4, 2025
f2d6655
fix bash completion path bug in more recent bash versions
bckohan Feb 4, 2025
5d17400
tweak path completer test for coverage
bckohan Feb 4, 2025
8b500af
fix #166
bckohan Feb 5, 2025
00072fa
fix tests for no rich #166
bckohan Feb 5, 2025
7fe1dbb
fix traceback tests in CI
bckohan Feb 5, 2025
0b829ad
simplify function for coverage
bckohan Feb 5, 2025
abad5d8
remove default from --pythonpath option
bckohan Feb 5, 2025
f6a1e13
more strictly enforce 88 line length limit
bckohan Feb 7, 2025
6876b5d
fix #168
bckohan Feb 7, 2025
4bc6e98
undo help string change #168
bckohan Feb 7, 2025
49e7c5c
add root cfg to path completers, also include media and static file c…
bckohan Feb 8, 2025
bc13f33
fix test
bckohan Feb 8, 2025
58d82e4
allow callables or paths as args to completers
bckohan Feb 8, 2025
271a9ff
tests for coverage
bckohan Feb 8, 2025
98c8612
fix translations #18
bckohan Feb 13, 2025
afb6532
restrict upstream click versions b/c of impending breaking changes wi…
bckohan Feb 15, 2025
b254e35
final run of autotranslate #18
bckohan Feb 15, 2025
34ac8f0
setup dependency caching in CI
bckohan Feb 16, 2025
04c0d2a
commit the lock file and poetry config
bckohan Feb 16, 2025
fabb416
remove cache attempt - GHA requires poetry to be installed first whic…
bckohan Feb 16, 2025
6e1fbf9
verify run environment in CI
bckohan Feb 16, 2025
4355058
add python exe argument to just init
bckohan Feb 16, 2025
f65382c
try fix python env in CI
bckohan Feb 16, 2025
38eb79c
fix CI python versioning
bckohan Feb 16, 2025
acb103f
only do poetry env use in init recipe
bckohan Feb 16, 2025
c0849d0
try fix CI environment versions
bckohan Feb 16, 2025
26087f2
fix #167
bckohan Feb 16, 2025
2243773
remove unnecessary private class
bckohan Feb 16, 2025
19105a1
document just recipes, update contributing file and fix lint CI
bckohan Feb 17, 2025
08247df
remove docs action for now
bckohan Feb 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ coverage:
fixes:
- "__init__.py::django_typer/__init__.py"
- "management/__init__.py::django_typer/management/__init__.py"
- "utils.py::django_typer/utils.py"
131 changes: 131 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.



# Source files
# ============
*.pxd text diff=python
*.py text diff=python
*.py3 text diff=python
*.pyw text diff=python
*.pyx text diff=python
*.pyz text diff=python
*.pyi text diff=python
*.rst text
*.md text
justfile text
*.toml text
LICENSE text
*.yaml text
*.yml text
*.po text
*.tmpl text
*.json text
*.xml text

# powershell
# ============
*.ps1 text eol=crlf
*.ps1x text eol=crlf
*.psm1 text eol=crlf
*.psd1 text eol=crlf
*.ps1xml text eol=crlf
*.pssc text eol=crlf
*.psrc text eol=crlf
*.cdxml text eol=crlf

# Jupyter notebook
*.ipynb text eol=lf

# Declare files that will always have CRLF line endings on checkout.
django_typer/management/commands/shells/powershell.tmpl text eol=crlf

# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pickle binary
*.pyc binary export-ignore
*.pyo binary export-ignore
*.pyd binary
*.png binary
*.jpg binary
*.pdf binary
*.svg binary
*.drawio binary
*.gif binary
*.mo binary
*.jpeg binary
*.tif binary
*.tiff binary
*.ico binary
*.eps binary

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.mdx text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text eol=crlf
*.tab text
*.tsv text
*.txt text
*.sql text
*.epub diff=astextplain

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.ksh text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Archives
*.7z binary
*.bz binary
*.bz2 binary
*.bzip2 binary
*.gz binary
*.lz binary
*.lzma binary
*.rar binary
*.tar binary
*.taz binary
*.tbz binary
*.tbz2 binary
*.tgz binary
*.tlz binary
*.txz binary
*.xz binary
*.Z binary
*.zip binary
*.zst binary

# Text files where line endings should be preserved
*.patch -text

.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
16 changes: 13 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: ⬆
# Python
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: ⬆
29 changes: 15 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Lint

on:
push:
branches: main
pull_request:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -37,24 +38,22 @@ jobs:
- python-version: '3.10'
django-version: '5.1'

env:
TEST_PYTHON_VERSION: ${{ matrix.python-version }}
TEST_DJANGO_VERSION: ${{ matrix.django-version }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
id: sp
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install Just
uses: extractions/setup-just@v2
- name: Install Dependencies
run: |
poetry config virtualenvs.in-project true
poetry run pip install --upgrade pip
poetry install -E rich
poetry run pip install colorama
poetry run pip install -U "django~=${{ matrix.django-version }}"
just init ${{ steps.sp.outputs.python-path }} install
just pin-dependency Django~=${{ matrix.django-version }}.0
- name: Install Emacs
if: ${{ github.event.inputs.debug == 'true' }}
run: |
Expand All @@ -67,7 +66,9 @@ jobs:
timeout-minutes: 60
- name: Run Static Analysis
run: |
source .venv/bin/activate
./check.sh --no-fix
python -m readme_renderer ./README.md -o /tmp/README.html
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
just test ./tests/verify_environment.py
just check-lint
just check-format
just check-types
just check-package
just check-readme
61 changes: 61 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: OpenSSF Scorecard
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
push:
branches: [ main ]

permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
security-events: write
id-token: write

steps:
- name: "Checkout code"
uses: actions/checkout@v4
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/[email protected]
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@v4
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
Loading
Loading