-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 upgrade tooling, use pyproject.toml
- Loading branch information
Showing
12 changed files
with
382 additions
and
1,265 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -9,57 +9,43 @@ jobs: | |
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
cache: 'yarn' | ||
- name: Cache pip | ||
uses: actions/cache@v1 | ||
with: | ||
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }} | ||
path: ~/.cache/pip | ||
restore-keys: | | ||
v0-${{ runner.os }}-pip-lint- | ||
v0-${{ runner.os }}-pip- | ||
- name: Install system-level dependencies | ||
run: sudo apt-get update && sudo apt-get install python3-dev libmagic-dev libmagickwand-dev poppler-utils libpoppler-cpp-dev | ||
- name: Install dependencies | ||
run: | | ||
pip install -e ".[test]" | ||
yarn install | ||
- name: Run flake8 | ||
run: flake8 src tests test_project --statistics | ||
- name: Run black | ||
run: black --check src tests test_project | ||
- name: Run isort | ||
run: isort --check src tests test_project | ||
- name: Run eslint | ||
run: yarn lint | ||
- uses: actions/checkout@v4 | ||
- uses: pre-commit/[email protected] | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.10'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
- name: Install system-level dependencies | ||
run: sudo apt-get update && sudo apt-get install python3-dev libmagic-dev libmagickwand-dev poppler-utils libpoppler-cpp-dev | ||
- name: uv cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: /tmp/.uv-cache | ||
key: uv-${{ runner.os }}-${{ hashFiles('requirements-dev.txt') }} | ||
restore-keys: | | ||
uv-${{ runner.os }}-${{ hashFiles('requirements-dev.txt') }} | ||
uv-${{ runner.os }} | ||
- name: Install dependencies | ||
run: | | ||
pip install -e ".[test]" | ||
playwright install --with-deps chromium | ||
python -m pip install uv | ||
uv pip install ".[test]" | ||
yarn install | ||
- name: Build frontend | ||
run: yarn run build | ||
- name: Run tests | ||
run: coverage run --branch -m pytest -m "not slow" | ||
- name: Show coverage report | ||
run: coverage report | ||
- name: Minimize uv cache | ||
run: uv cache prune --ci |
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 |
---|---|---|
@@ -1,43 +1,26 @@ | ||
repos: | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.3 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
- repo: https://github.com/psf/black | ||
rev: "22.3.0" # Replace by any tag/version: https://github.com/psf/black/tags | ||
hooks: | ||
- id: black | ||
language_version: python3 # Should be a command that runs python3.6+ | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: "3.9.2" # pick a git hash / tag to point to | ||
- id: ruff | ||
args: [--fix] | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/Riverside-Healthcare/djLint | ||
rev: v1.35.2 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-bugbear==21.4.3] | ||
exclude: ^.*/migrations/.*$ | ||
- id: djlint-reformat-django | ||
- id: djlint-django | ||
|
||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v8.21.0 | ||
rev: v9.9.1 | ||
hooks: | ||
- id: eslint | ||
files: \.(js|ts|vue)?$ | ||
files: \.(js|vue)?$ | ||
types: [file] | ||
args: [--no-warn-ignored] | ||
additional_dependencies: | ||
- [email protected] | ||
- eslint-config-standard-with-typescript | ||
- eslint-plugin-html | ||
- eslint-plugin-import | ||
- eslint-plugin-n | ||
- eslint-plugin-promise | ||
- eslint-plugin-vue | ||
- eslint | ||
- prettier | ||
- eslint-plugin-prettier | ||
- eslint-config-standard | ||
- repo: local | ||
hooks: | ||
- id: make-messages | ||
name: Update translation files | ||
entry: make messagesde | ||
language: system | ||
pass_filenames: false | ||
|
||
exclude: ^.*/migrations/.*$ | ||
- eslint-config-prettier | ||
- eslint-plugin-vue |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
include README.md LICENSE.txt | ||
include README.md LICENSE.txt package.json | ||
recursive-include src/filingcabinet/templates * | ||
recursive-include src/filingcabinet/static * | ||
recursive-include src/filingcabinet/locale *.po | ||
recursive-include frontend * |
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,13 @@ | ||
|
||
import prettier from 'eslint-config-prettier' | ||
import pluginVue from 'eslint-plugin-vue' | ||
import js from '@eslint/js' | ||
|
||
export default [ | ||
{ | ||
ignores: ['node_modules', '**/static', '**/build'] | ||
}, | ||
js.configs.recommended, | ||
...pluginVue.configs['flat/strongly-recommended'], | ||
prettier | ||
] |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.