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

Kk-792 Fixes to the dev environment #237

Merged
merged 4 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all 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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,5 @@ var/
venv/
.pytest_cache/
docker-compose.env.yaml

.vscode/
1 change: 1 addition & 0 deletions docker-compose.env.yaml.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DEBUG=1
CORS_ORIGIN_ALLOW_ALL=1
APPLY_MIGRATIONS=1
CREATE_SUPERUSER=1
ADD_DEFAULT_LANGUAGES=1
Expand Down
6 changes: 5 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ drf-oidc-auth==0.10.0
factory-boy
graphene-django
graphene-file-upload
psycopg2
# Django 2.2 needs psycopg2 2.8. Mac needs the binary.
# The psycopg2-binary should be replacesd
# with psycopg2 when possible
# https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary
psycopg2-binary < 2.9
sentry-sdk
Pillow
pycountry
Expand Down
42 changes: 21 additions & 21 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.7
# To update, run:
#
# pip-compile requirements.in
# pip-compile
#
aniso8601==7.0.0
# via graphene
Expand All @@ -26,6 +26,20 @@ chardet==3.0.4
# via requests
cryptography==3.3.2
# via azure-storage-common
django==2.2.24
# via
# -r requirements.in
# django-anymail
# django-cors-headers
# django-filter
# django-graphql-jwt
# django-guardian
# django-helusers
# django-ilmoitin
# django-mailer
# django-storages
# drf-oidc-auth
# graphene-django
django-anymail==7.0.0
# via django-ilmoitin
django-cleanup==4.0.0
Expand All @@ -52,20 +66,6 @@ django-parler==2.1
# django-ilmoitin
django-storages[azure,google]==1.9.1
# via -r requirements.in
django==2.2.24
# via
# -r requirements.in
# django-anymail
# django-cors-headers
# django-filter
# django-graphql-jwt
# django-guardian
# django-helusers
# django-ilmoitin
# django-mailer
# django-storages
# drf-oidc-auth
# graphene-django
djangorestframework==3.10.3
# via drf-oidc-auth
drf-oidc-auth==0.10.0
Expand Down Expand Up @@ -96,14 +96,14 @@ google-resumable-media==0.5.0
# via google-cloud-storage
googleapis-common-protos==1.51.0
# via google-api-core
graphene==2.1.8
# via graphene-django
graphene-django==2.13.0
# via
# -r requirements.in
# django-graphql-jwt
graphene-file-upload==1.2.2
# via -r requirements.in
graphene==2.1.8
# via graphene-django
graphql-core==2.2.1
# via
# django-graphql-jwt
Expand Down Expand Up @@ -131,14 +131,14 @@ protobuf==3.11.3
# via
# google-api-core
# googleapis-common-protos
psycopg2==2.8.4
psycopg2-binary==2.8.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the binary package removes the requirement to have postgres libraries installed for building the psycopg2 package, which is convenient. However psycopg2 documentation states that especially production environments should only use the non-binary version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, nice catch! I'll try to address the problems in some other ways. Using psycopg2-binary was adviced by stack overflow.

Copy link
Contributor Author

@nikomakela nikomakela Oct 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Django 2.2 needs psycopg2 2.8. Mac needs the binary. The psycopg2-binary should be replacesd with psycopg2 when possible: https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary.

So, still using the binary version, but commented in requirements.in that it should be replaced with psycopg2 when possible.

# via -r requirements.in
pyasn1-modules==0.2.8
# via google-auth
pyasn1==0.4.7
# via
# pyasn1-modules
# rsa
pyasn1-modules==0.2.8
# via google-auth
pycountry==20.7.3
# via -r requirements.in
pycparser==2.20
Expand Down