Skip to content

Commit 6c4336c

Browse files
committed
refactor!: Overhaul project structure and rewrite core logic
This commit replaces the entire existing codebase with a new, refactored version. The goal of this rewrite is to establish a more scalable, maintainable, and robust foundation for the project. Key changes include: - A complete reorganization of the directory structure for better separation of concerns. - Replacement of the previous core logic with a more modular and efficient implementation. - Introduction of a new configuration system. BREAKING CHANGE: The entire project API, structure, and dependencies have changed. This version is not backward compatible with previous versions.
1 parent 6ca5232 commit 6c4336c

File tree

143 files changed

+4466
-702
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+4466
-702
lines changed

.editorconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.{py,rst,ini}]
12+
indent_style = space
13+
indent_size = 4
14+
15+
[*.{html,css,scss,json,yml,xml,toml}]
16+
indent_style = space
17+
indent_size = 2
18+
19+
[*.md]
20+
trim_trailing_whitespace = false
21+
22+
[Makefile]
23+
indent_style = tab
24+
25+
[default.conf]
26+
indent_style = space
27+
indent_size = 2

.env.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
DEBUG=True
2-
SECRET_KEY=
3-
DATABASE_URL=
4-
CACHE_URL=
2+
SECRET_KEY=yoursecretkey
3+
DATABASE_URL=postgresql://postgres:yourpassword@localhost:5432/yourdatabase
4+
REDIS_URL=redis://localhost:6379/0
55
# single
66
# ALLOWED_HOSTS=*
77
# mutiple
8-
ALLOWED_HOSTS=127.0.0.1,192.168.1.1
8+
ALLOWED_HOSTS=127.0.0.1,192.168.1.1

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.github/dependabot.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Config for Dependabot updates. See Documentation here:
2+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
3+
4+
version: 2
5+
updates:
6+
# Update GitHub actions in workflows
7+
- package-ecosystem: 'github-actions'
8+
directory: '/'
9+
# Every weekday
10+
schedule:
11+
interval: 'daily'
12+
groups:
13+
github-actions:
14+
patterns:
15+
- '*'
16+
17+
# Enable version updates for Python/Pip - Production
18+
- package-ecosystem: 'pip'
19+
# Look for a `requirements.txt` in the `root` directory
20+
# also 'setup.cfg', '.python-version' and 'requirements/*.txt'
21+
directory: '/'
22+
# Every weekday
23+
schedule:
24+
interval: 'daily'
25+
groups:
26+
python:
27+
update-types:
28+
- 'minor'
29+
- 'patch'

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
3+
# Enable Buildkit and let compose use it to speed up image building
4+
env:
5+
DOCKER_BUILDKIT: 1
6+
COMPOSE_DOCKER_CLI_BUILD: 1
7+
8+
on:
9+
pull_request:
10+
branches: ['master', 'main']
11+
paths-ignore: ['docs/**']
12+
13+
push:
14+
branches: ['master', 'main']
15+
paths-ignore: ['docs/**']
16+
17+
concurrency:
18+
group: ${{ github.head_ref || github.run_id }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
linter:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout Code Repository
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version-file: '.python-version'
32+
- name: Run pre-commit
33+
uses: pre-commit/[email protected]
34+
35+
# With no caching at all the entire ci process takes 3m to complete!
36+
pytest:
37+
runs-on: ubuntu-latest
38+
39+
services:
40+
redis:
41+
image: redis:6
42+
ports:
43+
- 6379:6379
44+
postgres:
45+
image: postgres:14
46+
ports:
47+
- 5432:5432
48+
env:
49+
POSTGRES_PASSWORD: postgres
50+
51+
env:
52+
REDIS_URL: 'redis://localhost:6379/0'
53+
# postgres://user:password@host:port/database
54+
DATABASE_URL: 'postgres://postgres:postgres@localhost:5432/postgres'
55+
56+
steps:
57+
- name: Checkout Code Repository
58+
uses: actions/checkout@v4
59+
60+
- name: Set up Python
61+
uses: actions/setup-python@v5
62+
with:
63+
python-version-file: '.python-version'
64+
cache: pip
65+
cache-dependency-path: |
66+
requirements/base.txt
67+
requirements/local.txt
68+
69+
- name: Install Dependencies
70+
run: |
71+
python -m pip install --upgrade pip
72+
pip install -r requirements/local.txt
73+
74+
- name: Check DB Migrations
75+
run: python manage.py makemigrations --check
76+
77+
- name: Run DB Migrations
78+
run: python manage.py migrate
79+
80+
- name: Test with pytest
81+
run: pytest

0 commit comments

Comments
 (0)