django-octo-aurora 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. django_octo_aurora-0.1.1/.github/workflows/ci.yml +51 -0
  2. django_octo_aurora-0.1.1/.github/workflows/publish.yml +46 -0
  3. django_octo_aurora-0.1.1/.github/workflows/security.yml +79 -0
  4. django_octo_aurora-0.1.1/.gitignore +30 -0
  5. django_octo_aurora-0.1.1/LICENSE +21 -0
  6. django_octo_aurora-0.1.1/PKG-INFO +112 -0
  7. django_octo_aurora-0.1.1/README.md +92 -0
  8. django_octo_aurora-0.1.1/SECURITY.md +5 -0
  9. django_octo_aurora-0.1.1/TESTING.md +47 -0
  10. django_octo_aurora-0.1.1/config/__init__.py +0 -0
  11. django_octo_aurora-0.1.1/config/asgi.py +16 -0
  12. django_octo_aurora-0.1.1/config/settings.py +135 -0
  13. django_octo_aurora-0.1.1/config/urls.py +24 -0
  14. django_octo_aurora-0.1.1/config/wsgi.py +16 -0
  15. django_octo_aurora-0.1.1/features/aurora_topology.feature +14 -0
  16. django_octo_aurora-0.1.1/features/environment.py +15 -0
  17. django_octo_aurora-0.1.1/features/steps/aurora_steps.py +65 -0
  18. django_octo_aurora-0.1.1/manage.py +23 -0
  19. django_octo_aurora-0.1.1/performance/locust_load_report.html +147 -0
  20. django_octo_aurora-0.1.1/performance/locustfile.py +10 -0
  21. django_octo_aurora-0.1.1/pyproject.toml +45 -0
  22. django_octo_aurora-0.1.1/pytest.ini +4 -0
  23. django_octo_aurora-0.1.1/requirements-dev.lock +130 -0
  24. django_octo_aurora-0.1.1/requirements.lock +20 -0
  25. django_octo_aurora-0.1.1/src/django_octo_aurora/__init__.py +3 -0
  26. django_octo_aurora-0.1.1/src/django_octo_aurora/admin.py +44 -0
  27. django_octo_aurora-0.1.1/src/django_octo_aurora/apps.py +6 -0
  28. django_octo_aurora-0.1.1/src/django_octo_aurora/migrations/0001_initial.py +125 -0
  29. django_octo_aurora-0.1.1/src/django_octo_aurora/migrations/0002_aurorasnapshot_delete_superaurorapage.py +32 -0
  30. django_octo_aurora-0.1.1/src/django_octo_aurora/migrations/__init__.py +0 -0
  31. django_octo_aurora-0.1.1/src/django_octo_aurora/models.py +19 -0
  32. django_octo_aurora-0.1.1/src/django_octo_aurora/templates/admin/django_octo_aurora/aurorasnapshot/change_list.html +13 -0
  33. django_octo_aurora-0.1.1/src/django_octo_aurora/templates/django_octo_aurora/aurora_showcase.html +169 -0
  34. django_octo_aurora-0.1.1/src/django_octo_aurora/topology.py +182 -0
  35. django_octo_aurora-0.1.1/src/django_octo_aurora/urls.py +8 -0
  36. django_octo_aurora-0.1.1/src/django_octo_aurora/views.py +34 -0
  37. django_octo_aurora-0.1.1/tests/__init__.py +0 -0
  38. django_octo_aurora-0.1.1/tests/settings.py +45 -0
  39. django_octo_aurora-0.1.1/tests/test_aurora_core.py +59 -0
  40. django_octo_aurora-0.1.1/tests/urls.py +5 -0
@@ -0,0 +1,51 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+ jobs:
10
+ qa-pipeline:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Setup Rye
18
+ uses: eifinger/setup-rye@v4
19
+ with:
20
+ enable-cache: true
21
+
22
+ - name: Synchronize dependencies
23
+ run: |
24
+ rye sync
25
+ rye add --dev pytest-cov
26
+
27
+ - name: Check migrations & apply database schema
28
+ env:
29
+ PYTHONPATH: src
30
+ run: |
31
+ rye run python manage.py makemigrations --check --dry-run
32
+ rye run python manage.py migrate
33
+
34
+ - name: Execute Unit & Query-Count Suite (pytest)
35
+ env:
36
+ PYTHONPATH: src
37
+ run: rye run pytest --cov=django_octo_aurora --cov-report=xml
38
+
39
+ - name: Execute Behavioral Specifications (behave)
40
+ env:
41
+ PYTHONPATH: src
42
+ run: rye run behave
43
+
44
+ - name: Upload coverage to Codecov
45
+ if: always()
46
+ uses: codecov/codecov-action@v5
47
+ with:
48
+ files: ./coverage.xml
49
+ token: ${{ secrets.CODECOV_TOKEN }}
50
+ fail_ci_if_error: false
51
+
@@ -0,0 +1,46 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ pypi-publish:
9
+ name: Build and publish distribution to PyPI
10
+ runs-on: ubuntu-latest
11
+ environment:
12
+ name: pypi
13
+ url: https://pypi.org
14
+ permissions:
15
+ id-token: write
16
+
17
+ steps:
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Setup Rye
22
+ uses: eifinger/setup-rye@v4
23
+
24
+ - name: Build distribution packages
25
+ run: rye build
26
+
27
+ - name: Publish package to PyPI via Trusted Publisher
28
+ uses: pypa/gh-action-pypi-publish@release/v1
29
+
30
+ - name: Trigger Django-Octo Core Sync
31
+ if: success()
32
+ run: |
33
+ API_URL="https://github.com"
34
+ ENDPOINT="/repos/jeanpmodev/django_octo/dispatches"
35
+ curl -X POST \
36
+ -H "Accept: application/vnd.github+json" \
37
+ -H "Authorization: Bearer ${{ secrets.OCTO_DISPATCH_TOKEN }}" \
38
+ "${API_URL}${ENDPOINT}" \
39
+ -d '{
40
+ "event_type": "octo-module-released",
41
+ "client_payload": {
42
+ "module": "${{ github.event.repository.name }}",
43
+ "version": "${{ github.ref_name }}",
44
+ "summary": "Automated module release propagated to Django-Octo Core."
45
+ }
46
+ }'
@@ -0,0 +1,79 @@
1
+ name: Security Audit
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ branches: ["main"]
8
+ schedule:
9
+ - cron: "0 6 * * 1"
10
+
11
+ permissions: read-all
12
+
13
+ jobs:
14
+ snyk-scan:
15
+ name: Snyk Security Scan
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ contents: read
19
+ security-events: write
20
+ steps:
21
+ - name: Checkout code
22
+ uses: actions/checkout@v4
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.12"
28
+
29
+ - name: Install project and dependencies
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ pip install -e .
33
+
34
+ - name: Install Snyk CLI
35
+ uses: snyk/actions/setup@master
36
+
37
+ - name: Run Snyk to check for vulnerabilities
38
+ run: snyk test --package-manager=pip --file=requirements.lock --sarif-file-output=snyk.sarif
39
+ env:
40
+ SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
41
+
42
+ - name: Upload Snyk report to GitHub Code Scanning
43
+ uses: github/codeql-action/upload-sarif@v4
44
+ if: always()
45
+ with:
46
+ sarif_file: snyk.sarif
47
+
48
+ ossf-scorecard:
49
+ name: OpenSSF Scorecard
50
+ runs-on: ubuntu-latest
51
+ permissions:
52
+ security-events: write
53
+ id-token: write
54
+ contents: read
55
+ actions: read
56
+ steps:
57
+ - name: Checkout code
58
+ uses: actions/checkout@v4
59
+ with:
60
+ persist-credentials: false
61
+
62
+ - name: Run analysis
63
+ uses: ossf/scorecard-action@v2.5.0
64
+ with:
65
+ results_file: results.sarif
66
+ results_format: sarif
67
+ publish_results: true
68
+
69
+ - name: Upload artifact
70
+ uses: actions/upload-artifact@v4
71
+ with:
72
+ name: SARIF file
73
+ path: results.sarif
74
+ retention-days: 5
75
+
76
+ - name: Upload to code-scanning
77
+ uses: github/codeql-action/upload-sarif@v4
78
+ with:
79
+ sarif_file: results.sarif
@@ -0,0 +1,30 @@
1
+ # python generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # ==========================================
10
+ # Rye / Python Environment
11
+ # ==========================================
12
+ .venv/
13
+ .python-version
14
+ .project-id
15
+ __pycache__/
16
+ *.pyc
17
+ *.pyo
18
+ *.pyd
19
+ .pytest_cache/
20
+ .ruff_cache/
21
+ .mypy_cache/
22
+
23
+ # ==========================================
24
+ # Django Local Configurations & Media
25
+ # ==========================================
26
+ .env
27
+ local_settings.py
28
+ media/
29
+ staticfiles/
30
+ db.sqlite3
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 jeanpmodev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.3
2
+ Name: django-octo-aurora
3
+ Version: 0.1.1
4
+ Summary: Decoupled Django runtime software topology visualizer and interactive architecture showcase module under the Django-Octo ecosystem.
5
+ Project-URL: Homepage, https://github.com/jeanpmodev/django_octo_aurora
6
+ Project-URL: Repository, https://github.com/jeanpmodev/django_octo_aurora
7
+ Author-email: jeanpmodev <jeanpmodev@gmail.com>
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: architecture,django,django-octo,introspection,showcase,topology,visualization
11
+ Classifier: Framework :: Django
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Software Development :: Documentation
16
+ Requires-Python: >=3.12
17
+ Requires-Dist: django>=6.1.2
18
+ Requires-Dist: python-dotenv
19
+ Description-Content-Type: text/markdown
20
+
21
+ # django_octo_aurora
22
+
23
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)
24
+ [![Python](https://img.shields.io/badge/Python-3.11+-blue)](https://python.org)
25
+ [![Framework: Django](https://img.shields.io/badge/Framework-Django-darkgreen)](https://djangoproject.com)
26
+ [![Package Manager: Rye](https://img.shields.io/badge/Package_Manager-Rye-orange)](https://astral.sh)
27
+ ![PyPI Version](https://img.shields.io/pypi/v/django-octo-aurora)
28
+ [![Latest on Django Packages](https://img.shields.io/badge/Django_Packages-django__octo__aurora-8c3c26.svg)](https://djangopackages.org/packages/p/django_octo_aurora/)
29
+ [![Tests: pytest](https://img.shields.io/badge/Tests-pytest%20passed-2ea44f.svg)](https://github.com/jeanpmodev/django_octo_aurora/blob/main/TESTING.md)
30
+ [![BDD: Behave](https://img.shields.io/badge/BDD-Behave%20verified-009688.svg)](https://github.com/jeanpmodev/django_octo_aurora/blob/main/TESTING.md)
31
+ [![Load Test: Locust](https://img.shields.io/badge/Load_Test-11ms_median_%7C_0%25_fails-blueviolet.svg)](https://github.com/jeanpmodev/django_octo_aurora/blob/main/performance/locust_load_report.pdf)
32
+ [![CI](https://img.shields.io/github/actions/workflow/status/jeanpmodev/django_octo_aurora/ci.yml?branch=main&label=CI)](https://github.com/jeanpmodev/django_octo_aurora/actions/workflows/ci.yml)
33
+ [![Code Style: PEP 8](https://img.shields.io/badge/code%20style-PEP%208-blue)](https://peps.python.org/pep-0008/)
34
+ [![PyPI Provenance](https://img.shields.io/badge/PyPI-With%20Provenance-blue?logo=pypi&logoColor=white)](https://pypi.org/project/django-octo-aurora/#provenance)
35
+ [![Snyk Vulnerabilities](https://img.shields.io/badge/Snyk%20Vulnerabilities-0%20known-brightgreen?logo=snyk&logoColor=white)](https://security.snyk.io/package/pip/django-octo-aurora)
36
+ [![Security Audit](https://github.com/jeanpmodev/django_octo_aurora/actions/workflows/security.yml/badge.svg)](https://github.com/jeanpmodev/django_octo_aurora/actions/workflows/security.yml)
37
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/jeanpmodev/django_octo_aurora/badge)](https://scorecard.dev/viewer/?uri=github.com/jeanpmodev/django_octo_aurora)
38
+ [![Socket Badge](https://badge.socket.dev/pypi/package/django-octo-aurora/0.1.6?artifact_id=tar-gz)](https://badge.socket.dev/pypi/package/django-octo-aurora/0.1.6?artifact_id=tar-gz)
39
+ [![codecov](https://codecov.io/gh/jeanpmodev/django_octo_aurora/graph/badge.svg?token=FO3B4DS2RH)](https://codecov.io/gh/jeanpmodev/django_octo_aurora)
40
+
41
+ **django_octo_aurora** is a decoupled runtime software topology visualizer and interactive architecture showcase module under the **Django-Octo** ecosystem.
42
+
43
+ It inspects the host Django project structure, installed apps, AST metrics, and local Git commit history in real time, persisting lightweight snapshots for single-query rendering across both a public showcase endpoint and the Django Admin interface.
44
+
45
+ ---
46
+
47
+ ## Core Architecture
48
+
49
+ - **Dual-Channel Access:** Exposes an interactive HTML5 Canvas topology view on a dedicated route (`/aurora/`) and embeds the same preview directly inside the Django Admin (`Aurora Snapshots`).
50
+ - **Runtime Introspection:** Scans active project directories (`pathlib`), extracts Python class/function counts (`ast`), detects coupled `INSTALLED_APPS`, and parses local Git history (`git log`) using only the Python standard library.
51
+ - **Single-Query Persistence:** Stores serialized topology payloads in `AuroraSnapshot`, ensuring subsequent page loads execute in a single ORM query.
52
+ - **Interactive Canvas Controls:** Supports directional navigation (keyboard arrows / `WASD` and on-screen D-Pad), module filtering checklists, file-type counters, commit timeline playback, presentation mode (`H`), and clean PNG export.
53
+
54
+ ---
55
+
56
+ ## Installation & Quick Start
57
+
58
+ ### 1. Install Package
59
+ ```bash
60
+ pip install django-octo-aurora
61
+ ```
62
+ Or using **Rye**:
63
+ ```bash
64
+ rye add django-octo-aurora
65
+ ```
66
+
67
+ ### 2. Register App & Migrate
68
+ Add `"django_octo_aurora"` to `INSTALLED_APPS` in `settings.py`:
69
+ ```python
70
+ INSTALLED_APPS = [
71
+ # ...
72
+ "django_octo_aurora",
73
+ ]
74
+ ```
75
+ Run migrations:
76
+ ```bash
77
+ python3 manage.py migrate
78
+ ```
79
+
80
+ ### 3. Mount Routes
81
+ Include the module URLs in your project's `urls.py`:
82
+ ```python
83
+ from django.contrib import admin
84
+ from django.urls import include, path
85
+
86
+ urlpatterns = [
87
+ path("admin/", admin.site.urls),
88
+ path("aurora/", include("django_octo_aurora.urls")),
89
+ ]
90
+ ```
91
+ Start the server (`python3 manage.py runserver`) and open `http://127.0.0.1:8000` or `http://127.0.0.1:8000/admin/django_octo_aurora/aurorasnapshot/`.
92
+
93
+ ---
94
+
95
+ ## Local Development (Rye)
96
+
97
+ ```bash
98
+ git clone https://github.com/jeanpmodev/django_octo_aurora.git
99
+ cd django_octo_aurora
100
+ rye sync
101
+ rye run pytest
102
+ rye run behave
103
+ ```
104
+
105
+ See [TESTING.md](TESTING.md) for full QA and load testing instructions.
106
+
107
+ ---
108
+
109
+ ## License
110
+
111
+ Distributed under the **MIT License**. See [LICENSE](LICENSE) for details.
112
+
@@ -0,0 +1,92 @@
1
+ # django_octo_aurora
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)
4
+ [![Python](https://img.shields.io/badge/Python-3.11+-blue)](https://python.org)
5
+ [![Framework: Django](https://img.shields.io/badge/Framework-Django-darkgreen)](https://djangoproject.com)
6
+ [![Package Manager: Rye](https://img.shields.io/badge/Package_Manager-Rye-orange)](https://astral.sh)
7
+ ![PyPI Version](https://img.shields.io/pypi/v/django-octo-aurora)
8
+ [![Latest on Django Packages](https://img.shields.io/badge/Django_Packages-django__octo__aurora-8c3c26.svg)](https://djangopackages.org/packages/p/django_octo_aurora/)
9
+ [![Tests: pytest](https://img.shields.io/badge/Tests-pytest%20passed-2ea44f.svg)](https://github.com/jeanpmodev/django_octo_aurora/blob/main/TESTING.md)
10
+ [![BDD: Behave](https://img.shields.io/badge/BDD-Behave%20verified-009688.svg)](https://github.com/jeanpmodev/django_octo_aurora/blob/main/TESTING.md)
11
+ [![Load Test: Locust](https://img.shields.io/badge/Load_Test-11ms_median_%7C_0%25_fails-blueviolet.svg)](https://github.com/jeanpmodev/django_octo_aurora/blob/main/performance/locust_load_report.pdf)
12
+ [![CI](https://img.shields.io/github/actions/workflow/status/jeanpmodev/django_octo_aurora/ci.yml?branch=main&label=CI)](https://github.com/jeanpmodev/django_octo_aurora/actions/workflows/ci.yml)
13
+ [![Code Style: PEP 8](https://img.shields.io/badge/code%20style-PEP%208-blue)](https://peps.python.org/pep-0008/)
14
+ [![PyPI Provenance](https://img.shields.io/badge/PyPI-With%20Provenance-blue?logo=pypi&logoColor=white)](https://pypi.org/project/django-octo-aurora/#provenance)
15
+ [![Snyk Vulnerabilities](https://img.shields.io/badge/Snyk%20Vulnerabilities-0%20known-brightgreen?logo=snyk&logoColor=white)](https://security.snyk.io/package/pip/django-octo-aurora)
16
+ [![Security Audit](https://github.com/jeanpmodev/django_octo_aurora/actions/workflows/security.yml/badge.svg)](https://github.com/jeanpmodev/django_octo_aurora/actions/workflows/security.yml)
17
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/jeanpmodev/django_octo_aurora/badge)](https://scorecard.dev/viewer/?uri=github.com/jeanpmodev/django_octo_aurora)
18
+ [![Socket Badge](https://badge.socket.dev/pypi/package/django-octo-aurora/0.1.6?artifact_id=tar-gz)](https://badge.socket.dev/pypi/package/django-octo-aurora/0.1.6?artifact_id=tar-gz)
19
+ [![codecov](https://codecov.io/gh/jeanpmodev/django_octo_aurora/graph/badge.svg?token=FO3B4DS2RH)](https://codecov.io/gh/jeanpmodev/django_octo_aurora)
20
+
21
+ **django_octo_aurora** is a decoupled runtime software topology visualizer and interactive architecture showcase module under the **Django-Octo** ecosystem.
22
+
23
+ It inspects the host Django project structure, installed apps, AST metrics, and local Git commit history in real time, persisting lightweight snapshots for single-query rendering across both a public showcase endpoint and the Django Admin interface.
24
+
25
+ ---
26
+
27
+ ## Core Architecture
28
+
29
+ - **Dual-Channel Access:** Exposes an interactive HTML5 Canvas topology view on a dedicated route (`/aurora/`) and embeds the same preview directly inside the Django Admin (`Aurora Snapshots`).
30
+ - **Runtime Introspection:** Scans active project directories (`pathlib`), extracts Python class/function counts (`ast`), detects coupled `INSTALLED_APPS`, and parses local Git history (`git log`) using only the Python standard library.
31
+ - **Single-Query Persistence:** Stores serialized topology payloads in `AuroraSnapshot`, ensuring subsequent page loads execute in a single ORM query.
32
+ - **Interactive Canvas Controls:** Supports directional navigation (keyboard arrows / `WASD` and on-screen D-Pad), module filtering checklists, file-type counters, commit timeline playback, presentation mode (`H`), and clean PNG export.
33
+
34
+ ---
35
+
36
+ ## Installation & Quick Start
37
+
38
+ ### 1. Install Package
39
+ ```bash
40
+ pip install django-octo-aurora
41
+ ```
42
+ Or using **Rye**:
43
+ ```bash
44
+ rye add django-octo-aurora
45
+ ```
46
+
47
+ ### 2. Register App & Migrate
48
+ Add `"django_octo_aurora"` to `INSTALLED_APPS` in `settings.py`:
49
+ ```python
50
+ INSTALLED_APPS = [
51
+ # ...
52
+ "django_octo_aurora",
53
+ ]
54
+ ```
55
+ Run migrations:
56
+ ```bash
57
+ python3 manage.py migrate
58
+ ```
59
+
60
+ ### 3. Mount Routes
61
+ Include the module URLs in your project's `urls.py`:
62
+ ```python
63
+ from django.contrib import admin
64
+ from django.urls import include, path
65
+
66
+ urlpatterns = [
67
+ path("admin/", admin.site.urls),
68
+ path("aurora/", include("django_octo_aurora.urls")),
69
+ ]
70
+ ```
71
+ Start the server (`python3 manage.py runserver`) and open `http://127.0.0.1:8000` or `http://127.0.0.1:8000/admin/django_octo_aurora/aurorasnapshot/`.
72
+
73
+ ---
74
+
75
+ ## Local Development (Rye)
76
+
77
+ ```bash
78
+ git clone https://github.com/jeanpmodev/django_octo_aurora.git
79
+ cd django_octo_aurora
80
+ rye sync
81
+ rye run pytest
82
+ rye run behave
83
+ ```
84
+
85
+ See [TESTING.md](TESTING.md) for full QA and load testing instructions.
86
+
87
+ ---
88
+
89
+ ## License
90
+
91
+ Distributed under the **MIT License**. See [LICENSE](LICENSE) for details.
92
+
@@ -0,0 +1,5 @@
1
+ # Security Policy
2
+
3
+ This module is part of the **Django-Octo** ecosystem and is governed centrally by the core security policy.
4
+
5
+ Please refer to the [Django-Octo Core Security Policy & Live Posture](https://github.com/jeanpmodev/django-octo/) for supported versions, live ecosystem audit scores, and Coordinated Vulnerability Disclosure (CVD) instructions.
@@ -0,0 +1,47 @@
1
+ # 🧪 Quality Assurance & Testing Methodology
2
+
3
+ [![Tests: pytest](https://img.shields.io/badge/Tests-pytest%20passed-2ea44f.svg)](#2-unit--query-count-validation-pytest)
4
+ [![BDD: Behave](https://img.shields.io/badge/BDD-Behave%20verified-009688.svg)](#3-behavioral--bdd-specifications-behave)
5
+ [![Load Test: Locust](https://img.shields.io/badge/Load_Test-11ms_median_%7C_0%25_fails-blueviolet.svg)](performance/locust_load_report.pdf)
6
+
7
+
8
+ ---
9
+
10
+ ## 1. Local QA Environment Setup
11
+ Synchronize the development dependencies using **Rye**:
12
+ ```bash
13
+ rye sync
14
+ ```
15
+
16
+ ---
17
+
18
+ ## 2. Unit & Query-Count Validation (`pytest`)
19
+ Verifies AST directory introspection, schema migrations, Django Admin snapshot refresh actions, and enforces the **Single Database Lookup (`django_assert_num_queries(1)`)** contract:
20
+ ```bash
21
+ PYTHONPATH=src pytest
22
+ ```
23
+
24
+ ---
25
+
26
+ ## 3. Behavioral / BDD Specifications (`behave`)
27
+ Executes Gherkin scenarios (`features/aurora_topology.feature`) validating single-query showcase rendering and administrative snapshot persistence end-to-end:
28
+ ```bash
29
+ PYTHONPATH=src behave
30
+ ```
31
+
32
+ ---
33
+
34
+ ## 4. Load & Concurrency Stress Benchmark (`locust`)
35
+ Simulates 50 concurrent users hitting the single-query Aurora showcase endpoint:
36
+
37
+ ```bash
38
+ # Terminal 1: Start runtime service
39
+ PYTHONPATH=src python3 manage.py runserver --noreload
40
+
41
+ # Terminal 2: Execute 15s headless load test
42
+ locust -f performance/locustfile.py --headless -u 50 -r 10 --run-time 15s --host http://127.0.0.1:8000
43
+ ```
44
+
45
+
46
+ 📄 **[View Official Locust Load Test Report (PDF)](performance/locust_load_report.pdf)**
47
+
File without changes
@@ -0,0 +1,16 @@
1
+ """
2
+ ASGI config for config project.
3
+
4
+ It exposes the ASGI callable as a module-level variable named ``application``.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/6.1/howto/deployment/asgi/
8
+ """
9
+
10
+ import os
11
+
12
+ from django.core.asgi import get_asgi_application
13
+
14
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
15
+
16
+ application = get_asgi_application()
@@ -0,0 +1,135 @@
1
+ """
2
+ Django settings for config project.
3
+
4
+ Generated by 'django-admin startproject' using Django 6.1.2.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/6.1/topics/settings/
8
+
9
+ For the full list of settings and their values, see
10
+ https://docs.djangoproject.com/en/6.1/ref/settings/
11
+ """
12
+
13
+ import os
14
+ from pathlib import Path
15
+ from dotenv import load_dotenv
16
+
17
+ # 1. First, build paths inside the project like this: BASE_DIR / 'subdir'.
18
+ BASE_DIR = Path(__file__).resolve().parent.parent
19
+
20
+ # 2. Then, load environment variables from the .env file using BASE_DIR
21
+ load_dotenv(BASE_DIR / ".env")
22
+
23
+ # Quick-start development settings - unsuitable for production
24
+ # See https://docs.djangoproject.com/en/6.1/howto/deployment/checklist/
25
+
26
+ # SECURITY WARNING: keep the secret key used in production secret!
27
+ SECRET_KEY = os.getenv(
28
+ "SECRET_KEY", "django-insecure-production-fallback-key-change-in-env"
29
+ )
30
+
31
+ # SECURITY WARNING: don't run with debug turned on in production!
32
+ DEBUG = True
33
+
34
+ ALLOWED_HOSTS = []
35
+
36
+
37
+ # Application definition
38
+
39
+ INSTALLED_APPS = [
40
+ "django.contrib.admin",
41
+ "django.contrib.auth",
42
+ "django.contrib.contenttypes",
43
+ "django.contrib.sessions",
44
+ "django.contrib.messages",
45
+ "django.contrib.staticfiles",
46
+ "src.django_octo_aurora.apps.DjangoOctoSeoConfig",
47
+ ]
48
+
49
+ MIDDLEWARE = [
50
+ "django.middleware.security.SecurityMiddleware",
51
+ "django.contrib.sessions.middleware.SessionMiddleware",
52
+ "django.middleware.common.CommonMiddleware",
53
+ "django.middleware.csrf.CsrfViewMiddleware",
54
+ "django.contrib.auth.middleware.AuthenticationMiddleware",
55
+ "django.contrib.messages.middleware.MessageMiddleware",
56
+ "django.middleware.clickjacking.XFrameOptionsMiddleware",
57
+ ]
58
+
59
+ ROOT_URLCONF = "config.urls"
60
+
61
+ TEMPLATES = [
62
+ {
63
+ "BACKEND": "django.template.backends.django.DjangoTemplates",
64
+ "DIRS": [BASE_DIR / "templates"],
65
+ "APP_DIRS": True,
66
+ "OPTIONS": {
67
+ "context_processors": [
68
+ "django.template.context_processors.debug",
69
+ "django.template.context_processors.request",
70
+ "django.contrib.auth.context_processors.auth",
71
+ "django.contrib.messages.context_processors.messages",
72
+ ],
73
+ },
74
+ },
75
+ ]
76
+
77
+ WSGI_APPLICATION = "config.wsgi.application"
78
+
79
+
80
+ # Database
81
+ # https://docs.djangoproject.com/en/6.1/ref/settings/#databases
82
+
83
+ DATABASES = {
84
+ "default": {
85
+ "ENGINE": "django.db.backends.sqlite3",
86
+ "NAME": BASE_DIR / "db.sqlite3",
87
+ }
88
+ }
89
+
90
+
91
+ # Password validation
92
+ # https://docs.djangoproject.com/en/6.1/ref/settings/#auth-password-validators
93
+
94
+ AUTH_PASSWORD_VALIDATORS = [
95
+ {
96
+ "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
97
+ },
98
+ {
99
+ "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
100
+ },
101
+ {
102
+ "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
103
+ },
104
+ {
105
+ "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
106
+ },
107
+ ]
108
+
109
+
110
+ # Internationalization
111
+ # https://docs.djangoproject.com/en/6.1/topics/i18n/
112
+
113
+ LANGUAGE_CODE = "en-us"
114
+
115
+ TIME_ZONE = "UTC"
116
+
117
+ USE_I18N = True
118
+
119
+ USE_TZ = True
120
+
121
+
122
+ # Static files (CSS, JavaScript, Images)
123
+ # https://docs.djangoproject.com/en/6.1/howto/static-files/
124
+
125
+ STATIC_URL = "static/"
126
+
127
+
128
+ # Email
129
+ # https://docs.djangoproject.com/en/6.1/topics/email/#topic-email-configuration
130
+
131
+ MAILERS = {
132
+ "default": {
133
+ "BACKEND": "django.core.mail.backends.console.EmailBackend",
134
+ },
135
+ }
@@ -0,0 +1,24 @@
1
+ """
2
+ URL configuration for config project.
3
+
4
+ The `urlpatterns` list routes URLs to views. For more information please see:
5
+ https://docs.djangoproject.com/en/6.1/topics/http/urls/
6
+ Examples:
7
+ Function views
8
+ 1. Add an import: from my_app import views
9
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
10
+ Class-based views
11
+ 1. Add an import: from other_app.views import Home
12
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
13
+ Including another URLconf
14
+ 1. Import the include() function: from django.urls import include, path
15
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
16
+ """
17
+
18
+ from django.contrib import admin
19
+ from django.urls import path, include
20
+
21
+ urlpatterns = [
22
+ path("admin/", admin.site.urls),
23
+ path("", include("django_octo_aurora.urls")),
24
+ ]