Skip to content

Commit

Permalink
Merge pull request #815 from kobotoolbox/upgrade-django3.2
Browse files Browse the repository at this point in the history
Upgrade to Django 3.2
  • Loading branch information
noliveleger authored Aug 23, 2022
2 parents e86da04 + 20eb901 commit 5162bc8
Show file tree
Hide file tree
Showing 36 changed files with 148 additions and 417 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
python-version: ['3.8', '3.10']
services:
postgres:
image: postgis/postgis:9.5-2.5
image: postgis/postgis:14-3.2
env:
POSTGRES_USER: kobo
POSTGRES_PASSWORD: kobo
Expand All @@ -29,7 +29,7 @@ jobs:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis_cache:
image: redis:3.2
image: redis:6.2
ports:
- 6380:6379
steps:
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Install apt dependencies
run: sudo apt-get install ghostscript libxml2-dev libxslt-dev python3-dev gdal-bin libproj-dev gettext postgresql-client openjdk-11-jre
- name: Install Python dependencies
run: pip install -r dependencies/pip/dev.txt
run: pip install -r dependencies/pip/dev_requirements.txt
- name: Run pytest
run: pytest -vv -rf
env:
Expand Down
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ test:
POSTGRES_PASSWORD: kobo
POSTGRES_DB: kobocat_test
services:
- name: postgis/postgis:9.5-2.5
- name: postgis/postgis:14-3.2
alias: postgres
- name: redis:3.2
- name: redis:6.2
alias: redis_cache
script:
- apt-get update && apt-get install -y ghostscript gdal-bin libproj-dev gettext openjdk-11-jre
- pip install -r dependencies/pip/dev.txt
- pip install -r dependencies/pip/dev_requirements.txt
- pytest -vv -rf

deploy-beta:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN python3 -m venv "$VIRTUAL_ENV"
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --quiet pip==22.0.4 && \
pip install --quiet pip-tools
COPY ./dependencies/pip/prod.txt "${TMP_DIR}/pip_dependencies.txt"
COPY ./dependencies/pip/requirements.txt "${TMP_DIR}/pip_dependencies.txt"
RUN pip-sync "${TMP_DIR}/pip_dependencies.txt" 1>/dev/null

FROM python:3.10-slim
Expand Down Expand Up @@ -79,7 +79,7 @@ RUN adduser --disabled-password --gecos '' "$UWSGI_USER"

# Copy virtualenv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY ./dependencies/pip/prod.txt "${TMP_DIR}/pip_dependencies.txt"
COPY ./dependencies/pip/requirements.txt "${TMP_DIR}/pip_dependencies.txt"
COPY --from=build-python "$VIRTUAL_ENV" "$VIRTUAL_ENV"
COPY . "${KOBOCAT_SRC_DIR}"

Expand Down
File renamed without changes.
38 changes: 21 additions & 17 deletions dependencies/pip/dev.txt → dependencies/pip/dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile dependencies/pip/dev.in
# pip-compile dependencies/pip/dev_requirements.in
#
-e git+https://github.com/dimagi/django-digest@419f7306443f9a800b07d832b2cc147941062d59#egg=django_digest
# via -r dependencies/pip/requirements.in
Expand All @@ -14,6 +14,8 @@ amqp==5.1.1
# via
# -r dependencies/pip/requirements.in
# kombu
asgiref==3.5.0
# via django
asttokens==2.0.5
# via stack-data
async-timeout==4.0.2
Expand All @@ -28,9 +30,9 @@ backcall==0.2.0
# via ipython
billiard==3.6.4.0
# via celery
boto3==1.22.0
boto3==1.22.2
# via django-storages
botocore==1.25.0
botocore==1.25.2
# via
# boto3
# s3transfer
Expand Down Expand Up @@ -59,7 +61,7 @@ click-plugins==1.1.1
# via celery
click-repl==0.2.0
# via celery
cryptography==36.0.2
cryptography==37.0.0
# via
# azure-storage-blob
# jwcrypto
Expand All @@ -77,7 +79,7 @@ deprecated==1.2.13
# redis
dict2xml==1.7.1
# via -r dependencies/pip/requirements.in
django==2.2.28
django==3.2.15
# via
# -r dependencies/pip/requirements.in
# django-celery-beat
Expand Down Expand Up @@ -125,7 +127,7 @@ django-redis-sessions==0.6.2
# via -r dependencies/pip/requirements.in
django-render-block==0.9.1
# via django-templated-email
django-reversion==3.0.1
django-reversion==5.0.0
# via -r dependencies/pip/requirements.in
django-storages[azure,boto3]==1.12.3
# via -r dependencies/pip/requirements.in
Expand Down Expand Up @@ -163,16 +165,16 @@ executing==0.8.3
gdata-python3==3.0.1
# via -r dependencies/pip/requirements.in
httmock==1.4.0
# via -r dependencies/pip/dev.in
# via -r dependencies/pip/dev_requirements.in
idna==3.3
# via requests
iniconfig==1.1.1
# via pytest
ipdb==0.13.9
# via -r dependencies/pip/dev.in
# via -r dependencies/pip/dev_requirements.in
ipython==8.2.0
# via
# -r dependencies/pip/dev.in
# -r dependencies/pip/dev_requirements.in
# ipdb
isodate==0.6.1
# via msrest
Expand All @@ -197,11 +199,11 @@ markdown==3.3.6
matplotlib-inline==0.1.3
# via ipython
mock==4.0.3
# via -r dependencies/pip/dev.in
# via -r dependencies/pip/dev_requirements.in
modilabs-python-utils==0.1.5
# via -r dependencies/pip/requirements.in
mongomock==4.0.0
# via -r dependencies/pip/dev.in
# via -r dependencies/pip/dev_requirements.in
msrest==0.6.21
# via azure-storage-blob
numpy==1.22.3
Expand Down Expand Up @@ -237,7 +239,7 @@ prompt-toolkit==3.0.29
# via
# click-repl
# ipython
psycopg2==2.8.6
psycopg2==2.9.3
# via -r dependencies/pip/requirements.in
ptyprocess==0.7.0
# via pexpect
Expand All @@ -255,13 +257,13 @@ pyparsing==3.0.8
# via packaging
pytest==7.1.2
# via
# -r dependencies/pip/dev.in
# -r dependencies/pip/dev_requirements.in
# pytest-django
# pytest-env
pytest-django==4.5.2
# via -r dependencies/pip/dev.in
# via -r dependencies/pip/dev_requirements.in
pytest-env==0.6.2
# via -r dependencies/pip/dev.in
# via -r dependencies/pip/dev_requirements.in
python-crontab==2.6.0
# via django-celery-beat
python-dateutil==2.8.2
Expand Down Expand Up @@ -300,7 +302,7 @@ sentinels==1.0.0
sentry-sdk==1.5.10
# via -r dependencies/pip/requirements.in
shell-command==0.1
# via -r dependencies/pip/dev.in
# via -r dependencies/pip/dev_requirements.in
simplejson==3.17.6
# via -r dependencies/pip/requirements.in
six==1.16.0
Expand All @@ -315,7 +317,7 @@ six==1.16.0
# python-dateutil
sqlparse==0.4.2
# via
# -r dependencies/pip/dev.in
# -r dependencies/pip/dev_requirements.in
# django
stack-data==0.2.0
# via ipython
Expand All @@ -338,6 +340,8 @@ urllib3==1.26.9
# botocore
# requests
# sentry-sdk
uwsgi==2.0.20
# via -r dependencies/pip/requirements.in
vine==5.0.0
# via
# amqp
Expand Down
3 changes: 0 additions & 3 deletions dependencies/pip/prod.in

This file was deleted.

Loading

0 comments on commit 5162bc8

Please sign in to comment.