File tree Expand file tree Collapse file tree 6 files changed +99
-160
lines changed
Expand file tree Collapse file tree 6 files changed +99
-160
lines changed Original file line number Diff line number Diff line change 11FROM python:3.12-slim
2- COPY --from=ghcr.io/astral-sh/uv:0.4.17 /uv /bin/uv
2+ COPY --from=ghcr.io/astral-sh/uv:0.4.29 /uv /bin/uv
33
44ARG ENVIRONMENT=prod
55
@@ -32,13 +32,13 @@ RUN --mount=type=cache,target=/root/.cache/uv \
3232 uv sync \
3333 --frozen \
3434 --no-install-project \
35- $(if [ "$ENVIRONMENT" = "prod" ]; then echo "--no-dev" ; fi)
35+ $(if [ "$ENVIRONMENT" = "prod" ]; then echo "--no-group dev" ; fi)
3636
3737ADD . /app
3838RUN --mount=type=cache,target=/root/.cache/uv \
3939 uv sync \
4040 --frozen \
41- $(if [ "$ENVIRONMENT" = "prod" ]; then echo "--no-dev" ; fi)
41+ $(if [ "$ENVIRONMENT" = "prod" ]; then echo "--no-group dev" ; fi)
4242
4343ENV PATH="/app/.venv/bin:$PATH"
4444
Original file line number Diff line number Diff line change @@ -22,16 +22,22 @@ install:
2222``` bash
2323./run.sh uv add < package==1.0.0>
2424```
25+ ``` bash
26+ ./run.sh uv add --group dev < package==1.0.0>
27+ ```
2528
2629remove:
2730``` bash
2831./run.sh uv remove < package>
2932```
33+ ``` bash
34+ ./run.sh uv remove --group dev < package>
35+ ```
3036
3137## Auto Code Linting
3238
3339``` bash
34- ./run.sh uv run black .
40+ ./run.sh uv run ruff format .
3541```
3642
3743``` bash
Original file line number Diff line number Diff line change 100100
101101# Authentication
102102
103- AUTH_PASSWORD_VALIDATORS = [
104- {
105- "NAME" : "django.contrib.auth.password_validation.UserAttributeSimilarityValidator" ,
106- },
107- {
108- "NAME" : "django.contrib.auth.password_validation.MinimumLengthValidator" ,
109- },
110- {
111- "NAME" : "django.contrib.auth.password_validation.CommonPasswordValidator" ,
112- },
113- {
114- "NAME" : "django.contrib.auth.password_validation.NumericPasswordValidator" ,
115- },
116- ]
103+ AUTH_PASSWORD_VALIDATORS = [{
104+ "NAME" : "django.contrib.auth.password_validation.UserAttributeSimilarityValidator" ,
105+ }, {
106+ "NAME" : "django.contrib.auth.password_validation.MinimumLengthValidator" ,
107+ }, {
108+ "NAME" : "django.contrib.auth.password_validation.CommonPasswordValidator" ,
109+ }, {
110+ "NAME" : "django.contrib.auth.password_validation.NumericPasswordValidator" ,
111+ }]
117112
118113AUTH_USER_MODEL = "authentication.User"
119114
Original file line number Diff line number Diff line change 77
88def env_mode ():
99 """
10- Check if we want to be in dev mode or staging mode, this will be used to pull in correct settings overrides.
10+ Check if we want to be in dev mode or staging mode,
11+ this will be used to pull in correct settings overrides.
1112 :return bool:
1213 """
1314 if environ .get ("DEV_MODE" ) is not None :
Original file line number Diff line number Diff line change @@ -16,23 +16,13 @@ dependencies = [
1616 " uvicorn>=0.30.6" ,
1717]
1818
19- [tool .uv ]
20- dev-dependencies = [
21- " black>=24.8.0" ,
19+ [dependency-groups ]
20+ dev = [
2221 " ruff>=0.6.4" ,
2322]
2423
25- [tool .black ]
26- line-length = 88
27- exclude = '''
28- /(
29- .venv
30- | migrations
31- | node_modules
32- )/
33- '''
34-
3524[tool .ruff ]
25+ line-length = 88
3626exclude = [
3727 " .venv" ,
3828 " migrations" ,
@@ -42,7 +32,6 @@ exclude = [
4232[tool .ruff .lint ]
4333select = [" E" , " F" , " I" ]
4434ignore = [
45- " E501" , # line too long, handled by black
4635 " F403" , # based on the current code, too many to go through
4736 " F405" , # based on the current code, too many to go through
4837]
@@ -51,4 +40,4 @@ ignore = [
5140"__init__.py" = [" F401" ]
5241
5342[tool .ruff .lint .isort ]
54- combine-as-imports = true
43+ combine-as-imports = true
You can’t perform that action at this time.
0 commit comments