Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 6 additions & 4 deletions .github/workflows/bandit.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Bandit Security Analysis
name: Security Analysis (bandit)

on: [push]
on:
push:
branches-ignore:
- main

jobs:
bandit:
Expand All @@ -11,5 +14,4 @@ jobs:
with:
src: "src"
options: "-c pyproject.toml -r"
pip_install_command: "pip install .[dev]"
python_version: "3.11"
python_version: "3.13"
31 changes: 31 additions & 0 deletions .github/workflows/django.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Django Check

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
django-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: "3.13"

- name: Install dependencies
run: |
pip install -e .

- name: Run Django check
env:
DJANGO_SETTINGS_MODULE: core.settings
DB_ENGINE: django.db.backends.sqlite3
DB_NAME: test_db.sqlite3
SECRET_KEY: test_secret_key
DJANGO_DEBUG: False
run: |
cd src/django_project
python manage.py check
21 changes: 21 additions & 0 deletions .github/workflows/fawltydeps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Dependency Consistency Check (fawltydeps)

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
fawltydeps:
runs-on: ubuntu-latest
name: "fawltydeps"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.13"
- name: Install dependencies
run: |
pip install -e .[dev]
- name: Run fawltydeps
run: |
fawltydeps
Comment thread
davidslusser marked this conversation as resolved.
10 changes: 7 additions & 3 deletions .github/workflows/isort.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: isort
name: Import Order Validation (isort)

on: [push]
on:
push:
branches-ignore:
- main

jobs:
isort:
runs-on: ubuntu-latest
name: "isort"
if: github.event.created == false # Skip if this push created a new branch
steps:
- uses: davidslusser/actions_python_isort@v1.0.1
with:
src: "src/django_project"
options: "--check --diff"
python_version: "3.11"
python_version: "3.13"
11 changes: 8 additions & 3 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
name: mypy
name: Type Checking (mypy)

on: [push]
on:
push:
branches-ignore:
- main

jobs:
mypy:
runs-on: ubuntu-latest
name: "mypy"
if: github.event.created == false # Skip if this push created a new branch
steps:
- uses: davidslusser/actions_python_mypy@v1.0.1
with:
src: "src"
options: "-v"
options: ""
pip_install_command: "pip install -e .[dev]"
python_version: "3.13"
8 changes: 6 additions & 2 deletions .github/workflows/radon.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: radon
name: Code Metrics Analysis (radon)

on: [push]
on:
push:
branches-ignore:
- main

jobs:
radon:
runs-on: ubuntu-latest
name: "radon"
if: github.event.created == false # Skip if this push created a new branch
steps:
- uses: actions/checkout@v3
- uses: davidslusser/actions_python_radon@v1.0.0
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/ruff_format.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: ruff_format
name: Code Consistency Check (ruff format)

on: [push]
on:
push:
branches-ignore:
- main

jobs:
ruff:
runs-on: ubuntu-latest
name: "ruff"
if: github.event.created == false # Skip if this push created a new branch
steps:
- name: actions_python_ruff
uses: davidslusser/actions_python_ruff@v1.0.3
with:
src: "src/django_project"
command: ruff format src --check
python_version: "3.11"
python_version: "3.13"
12 changes: 8 additions & 4 deletions .github/workflows/ruff_lint.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: ruff_lint
name: Code Consistency Check (ruff format)

on: [push]
on:
push:
branches-ignore:
- main

jobs:
ruff:
runs-on: ubuntu-latest
name: "ruff"
if: github.event.created == false # Skip if this push created a new branch
steps:
- name: actions_python_ruff
uses: davidslusser/actions_python_ruff@v1.0.3
with:
src: "src/django_project"
options: "-v"
python_version: "3.11"
command: ruff format src --check
python_version: "3.13"
43 changes: 38 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
dependencies = [
"django~=5.2",
"django~=5.2.12",
"django-braces",
"django-debug-toolbar",
"django-environ",
Expand All @@ -10,8 +10,8 @@ dependencies = [
"djangorestframework",
"djangorestframework-filters==1.0.0.dev0",
"drf-flex-fields",
"drf-spectacular",
"drf-renderer-xlsx",
"drf-spectacular",
"whitenoise",
]
description = "Spokane Python Community"
Expand All @@ -20,14 +20,14 @@ keywords = ["django"]
license = {file = "LICENSE"}
name = "my_django_project"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.12"


[project.optional-dependencies]
dev = [
"bandit",
"coveralls",
"faker",
"fawltydeps",
"isort",
"model-bakery",
"mypy",
Expand All @@ -37,7 +37,6 @@ dev = [
"pytest-cov",
"pytest-django",
"radon",
"safety",
"types-python-dateutil",
"types-requests",
"typing_extensions",
Expand Down Expand Up @@ -72,6 +71,40 @@ omit = [
]


[tool.fawltydeps]
code = ["src/django_project"]
deps = ["pyproject.toml"]
ignore_unused = [
"bandit",
"black",
"django-braces",
"django-celery-beat",
"django-debug-toolbar",
"django-extensions",
"django-filter",
"drf-renderer-xlsx",
"gunicorn",
"faker",
"fawltydeps",
"isort",
"model-bakery",
"mypy",
"mypy-extensions",
"ruff",
"psycopg2-binary",
"pytest",
"pytest-cov",
"pytest-django",
"radon",
"redis",
"types-python-dateutil",
"types-requests",
"typing_extensions",
"whitenoise"
]
output_format = "human_detailed"


[tool.isort]
profile = "black"

Expand Down
Loading