Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
epicserve committed Aug 31, 2024
1 parent 195743a commit b357aab
Show file tree
Hide file tree
Showing 8 changed files with 1,728 additions and 2,023 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev_lock.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('uv.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Setup uv caching
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('**/dev_lock.txt') }}
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Setup Node
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Install Python requirements
run: |
pip install --upgrade uv
uv pip install --system -r config/requirements/dev_lock.txt
uv sync
- name: Run linting
run: |
PYTHON_CMD_PREFIX="" NODE_CMD_PREFIX="" just lint
Expand Down
4 changes: 2 additions & 2 deletions config/docker/Dockerfile.web
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ RUN set -ex \
&& $VIRTUAL_ENV/bin/pip install -U setuptools wheel pip uv

# Install Python packages
COPY config/requirements/${ENV_NAME}_lock.txt ./config/requirements/${ENV_NAME}_lock.txt
COPY uv.lock pyproject.toml ./

RUN set -ex \
&& $VIRTUAL_ENV/bin/uv pip install -r config/requirements/${ENV_NAME}_lock.txt \
&& $VIRTUAL_ENV/bin/uv sync --locked \
&& rm -rf /root/.cache/


Expand Down
19 changes: 0 additions & 19 deletions config/requirements/dev.in

This file was deleted.

1,510 changes: 0 additions & 1,510 deletions config/requirements/dev_lock.txt

This file was deleted.

20 changes: 0 additions & 20 deletions config/requirements/prod.in

This file was deleted.

446 changes: 0 additions & 446 deletions config/requirements/prod_lock.txt

This file was deleted.

61 changes: 38 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,44 @@
[project]
name = "django-base-site"
description = "A Django project template for creating new Django projects."
version = "0.1.0"
requires-python = ">=3.12"
dependencies = [
"Django~=5.0",
"boto3~=1.34",
"celery~=5.3",
"crispy-bootstrap5~=2024.2",
"django-alive~=2.0",
"django-allauth~=64.0",
"django-crispy-forms~=2.2",
"django-maintenance-mode~=0.19",
"django-storages~=1.8",
"environs[django]~=11.0",
"hiredis~=3.0", # needed for Django's native cache and sessions
"psycopg2-binary~=2.8",
"pytest-cov~=5.0",
"pytest-django~=4.5",
"redis~=5.0", # needed for celery
"uwsgi~=2.0",
]

#[tool.black]
#line-length = 120
#target-version = ['py311']
#skip-string-normalization = false
#exclude = '''
#(
# /(
# | \.git
# | node_modules
# )/
#)
#'''

#[tool.isort]
#line_length = 120
#multi_line_output = 5
#balanced_wrapping = true
#known_django = 'django'
#sections = 'FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER'
#skip = 'node_modules'

[tool.uv]
dev-dependencies = [
"django-debug-toolbar",
"django-stubs",
"django-test-plus",
# importlib-metadata is a dependency of djlint there is a PR to upgrade it in this issue (https://github.com/Riverside-Healthcare/djLint/pull/504) from 5.2.0 to 6.0.0
"djlint",
"ipdb",
"mkdocs-include-markdown-plugin",
"mkdocs-linkcheck",
"mkdocs-material",
"mkdocstrings[python]",
"model-bakery",
"mypy",
"ruff",
"ruff-lsp",
]

[tool.mypy]
# The mypy configurations: https://mypy.readthedocs.io/en/latest/config_file.html
Expand All @@ -46,11 +63,9 @@ plugins = [
"mypy_django_plugin.main",
]


[tool.django-stubs]
django_settings_module = "config.settings.test_runner"


[tool.pytest.ini_options]
addopts = "--nomigrations --ds config.settings.test_runner --cov-config=config/coverage.ini"

Expand Down
Loading

0 comments on commit b357aab

Please sign in to comment.