Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to python 3.12 and smartenv #62

Merged
merged 8 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 3.11
python_version = 3.12
files = src/hope_country_report
;exclude = ~OLD
; ~management
Expand Down
36 changes: 18 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,54 +38,54 @@ repos:
entry: mypy
language: python
types: [ python ]
stages: [ commit ]
stages: [ pre-commit ]
additional_dependencies: [mypy]

- repo: https://github.com/Yelp/detect-secrets
rev: 0.9.1
rev: v1.5.0
hooks:
- id: detect-secrets
args: [ '--baseline', '.secrets.baseline' ]
exclude: (tests/.*|.*/tenant\.sql|Pipfile\.lock|.*\.js|.gitlab-ci.yml|poetry.lock)
stages: [ push ]
stages: [ pre-push ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
rev: v5.0.0
hooks:
# - id: double-quote-string-fixer
# stages: [commit]

- id: debug-statements
stages: [ commit ]
stages: [ pre-commit ]

- id: end-of-file-fixer
exclude: .bumpversion.cfg
stages: [ commit ]
stages: [ pre-commit ]

- id: check-merge-conflict
stages: [ commit ]
stages: [ pre-commit ]

- id: check-case-conflict
stages: [ commit ]
stages: [ pre-commit ]

- repo: https://github.com/saxix/pch
rev: fc387f4
rev: '0.1'
hooks:
- id: check-missed-migrations
args:
- src
stages: [ commit ]
stages: [ pre-commit ]

- id: check-untracked
args:
- src
- tests
stages: [ push ]
stages: [ pre-push ]

- id: check-forbidden
args:
- -p
- /\.showbrowser\(/
- -p
- /print\(111/
stages: [ commit ]
# - id: check-forbidden
# args:
# - -p
# - /\.showbrowser\(/
# - -p
# - /print\(111/
# stages: [ pre-commit ]
#
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ABOUT HOPE Country Report

### System Requirements

- python 3.11
- python 3.12
- [direnv](https://direnv.net/) - not mandatory but strongly recommended
- [pdm](https://pdm.fming.dev/2.9/)

Expand All @@ -23,7 +23,7 @@ ABOUT HOPE Country Report

### 1. Clone repo and install requirements
git clone https://github.com/unicef/hope-country-report
pdm venv create 3.11
pdm venv create 3.12
pdm install
pdm venv activate in-project
pre-commit install
Expand Down
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ x-django-env: &django-env
- AZURE_TENANT_ID=
- AZURE_CLIENT_KEY=
- FLOWER_URL=http://flower:5555
- STATIC_FILE_STORAGE=hope_country_report.apps.power_query.storage.DataSetStorage
- STATIC_FILE_STORAGE=django.core.files.storage.FileSystemStorage

services:
backend:
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim-bookworm as base
FROM python:3.12-slim-bookworm as base

RUN apt update \
&& apt install --no-install-recommends -y \
Expand All @@ -13,7 +13,7 @@ RUN apt update \
&& chown -R hcr:hcr /code /tmp /data /static

ENV PACKAGES_DIR=/packages
ENV PYPACKAGES=$PACKAGES_DIR/__pypackages__/3.11
ENV PYPACKAGES=$PACKAGES_DIR/__pypackages__/3.12
ENV LIB_DIR=$PYPACKAGES/lib
ENV PYTHONPATH=$PYTHONPATH:$LIB_DIR:/code/src
ENV PATH=$PATH:$PYPACKAGES/bin
Expand Down
Loading
Loading