forked from Uninett/Argus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
132 changed files
with
7,475 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Format all python with ruff | ||
47f713ddce20e3c751e3cbd05a8671dda8f9a054 | ||
# Format all HTML with djLint | ||
0cd2a6561291dabccf435f19aca3f96323097e8b | ||
# Format login form with djLint | ||
07313f9fbb9384489c6aa57885f3fecba358f288 | ||
# Reformat middleware file using ruff | ||
bc456a556e0df11b0f25420c5c6933c068adef10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.bat eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Verify formatting | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
name: Verify Python formatting | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: astral-sh/ruff-action@v1 | ||
with: | ||
args: "format --check" | ||
changed-files: 'true' | ||
|
||
djlint: | ||
runs-on: ubuntu-latest | ||
name: Check HTML formatting | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -U pip | ||
pip install djlint | ||
- name: Format HTML | ||
run: djlint . --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Lint codebase | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
name: Lint Python | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: astral-sh/ruff-action@v1 | ||
with: | ||
changed-files: 'true' | ||
|
||
djlint: | ||
runs-on: ubuntu-latest | ||
name: Lint HTML | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -U pip | ||
pip install djlint | ||
- name: Lint | ||
run: djlint --lint . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.* | ||
|
||
*.egg | ||
*.egg-info | ||
*.py[cio] | ||
*.sw? | ||
|
||
__pycache__/ | ||
build/ | ||
dist/ | ||
|
||
# Tailwind CSS | ||
src/argus_htmx/static/styles.css | ||
# Autogenerated via management command | ||
src/argus_htmx/tailwindtheme/tailwind.config.js | ||
# OS specific | ||
src/argus_htmx/tailwindtheme/tailwindcss | ||
|
||
!.git-blame-ignore-revs | ||
!.gitattributes | ||
!.gitignore | ||
!.pre-commit-config.yaml | ||
!.github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
- id: end-of-file-fixer | ||
- id: debug-statements | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.7.2 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
# Run the formatter. | ||
- id: ruff-format | ||
- repo: https://github.com/djlint/djLint | ||
rev: v1.35.4 | ||
hooks: | ||
- id: djlint-reformat-django | ||
- id: djlint-django |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.PHONY: clean testclean distclean coverageclean nuke tailwind | ||
|
||
TAILWINDDIR=src/argus_htmx/tailwindtheme | ||
STATICDIR=src/argus_htmx/static | ||
|
||
clean: | ||
-find . -name __pycache__ -print0 | xargs -0 rm -rf | ||
-find . -name "*.pyc" -print0 | xargs -0 rm -rf | ||
-find . -name "*.egg-info" -print0 | xargs -0 rm -rf | ||
-find . -name ".ruff_cache" -print0 | xargs -0 rm -rf | ||
|
||
distclean: | ||
-rm -rf ./dist | ||
-rm -rf ./build | ||
|
||
coverageclean: | ||
-rm .coverage | ||
-rm .coverage.* | ||
-rm coverage.xml | ||
-rm -rf htmlcov | ||
|
||
testclean: coverageclean clean | ||
-rm -rf .tox | ||
|
||
nuke: clean distclean testclean | ||
|
||
tailwind: | ||
tailwindcss -c $(TAILWINDDIR)/tailwind.config.js -i $(TAILWINDDIR)/styles.css -o $(STATICDIR)/styles.css |
Oops, something went wrong.