Skip to content

Commit

Permalink
Upgraded to python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
srugano committed Oct 14, 2024
1 parent d5647ea commit 7f6c499
Show file tree
Hide file tree
Showing 8 changed files with 512 additions and 525 deletions.
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
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

0 comments on commit 7f6c499

Please sign in to comment.