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

Feature/add geolocation #764

Merged
merged 13 commits into from
Sep 23, 2022
18 changes: 15 additions & 3 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,23 @@ Whenever you need to name a property, try to use the name that is used in <https

### Dependency management

We're using [pip-tools](https://github.com/jazzband/pip-tools) to make sure all deployments are using the same dependency versions.
This project [pip-tools](https://github.com/jazzband/pip-tools) to make sure all deployments are using exactly the same dependency versions.

If you want to add a new dependency, add it into the `setup.py` file and run `pip-compile`. Don't forget to run `pip install -r requirements.txt` to install your added/updated dependency.
If you want to add a new dependency for production use,
add it into the `setup.py` file and run:

Same goes for upgrading dependencies. Execute `pip-compile --upgrade` to upgrade all dependencies, flag `--upgrade-package <name>` will upgrade only the requested package.
```bash
# activate virtual environment
source .venv/bin/activate
# compile dependency versions from setup.py to requirements.txt
pip-compile backend/setup.py -o backend/requirements.txt
# update installed dependencies
pip install -r backend/requirements.txt
```

Same goes for upgrading dependencies.
Execute `pip-compile --upgrade` to upgrade all dependencies.
The optional flag `--upgrade-package <name>` will upgrade only the requested package.

## Troubleshooting

Expand Down
66 changes: 49 additions & 17 deletions backend/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
# pip-compile --output-file=backend/requirements.txt backend/setup.py
#
anyio==3.6.1
# via watchgod
Expand All @@ -17,8 +17,12 @@ attrs==21.4.0
# twisted
automat==20.2.0
# via twisted
black==22.8.0
# via mj (backend/setup.py)
bleach==5.0.0
# via mj (setup.py)
# via mj (backend/setup.py)
build==0.8.0
# via pip-tools
certifi==2022.5.18.1
# via requests
cffi==1.15.0
Expand All @@ -27,7 +31,9 @@ charset-normalizer==2.0.12
# via requests
click==8.1.3
# via
# mj (setup.py)
# black
# mj (backend/setup.py)
# pip-tools
# uvicorn
constantly==15.1.0
# via twisted
Expand All @@ -45,27 +51,31 @@ django==4.0.4
# django-cors-headers
# django-filter
# djangorestframework
# mj (setup.py)
# mj (backend/setup.py)
django-cors-headers==3.12.0
# via mj (setup.py)
# via mj (backend/setup.py)
django-filter==21.1
# via mj (setup.py)
# via mj (backend/setup.py)
djangorestframework==3.13.1
# via mj (setup.py)
# via mj (backend/setup.py)
djangorestframework-camel-case==1.3.0
# via mj (setup.py)
# via mj (backend/setup.py)
filelock==3.7.0
# via tldextract
geographiclib==1.52
# via geopy
geopy==2.2.0
# via mj (backend/setup.py)
gunicorn==20.1.0
# via mj (setup.py)
# via mj (backend/setup.py)
h11==0.13.0
# via uvicorn
httptools==0.4.0
# via uvicorn
hyperlink==21.0.0
# via twisted
icalendar==4.0.9
# via mj (setup.py)
# via mj (backend/setup.py)
idna==3.3
# via
# anyio
Expand All @@ -87,15 +97,27 @@ lxml==4.8.0
# parsel
# scrapy
markdown==3.3.7
# via mj (setup.py)
# via mj (backend/setup.py)
mypy-extensions==0.4.3
# via black
packaging==21.3
# via build
parsel==1.6.0
# via
# itemloaders
# scrapy
pathspec==0.10.1
# via black
pep517==0.13.0
# via build
pip-tools==6.8.0
# via mj (backend/setup.py)
platformdirs==2.5.2
# via black
protego==0.2.1
# via scrapy
psycopg2-binary==2.9.3
# via mj (setup.py)
# via mj (backend/setup.py)
pyasn1==0.4.8
# via
# pyasn1-modules
Expand All @@ -108,19 +130,21 @@ pydispatcher==2.0.5
# via scrapy
pyopenssl==22.0.0
# via scrapy
pyparsing==3.0.9
# via packaging
python-dateutil==2.8.2
# via icalendar
python-dotenv==0.20.0
# via
# mj (setup.py)
# mj (backend/setup.py)
# uvicorn
pytz==2022.1
# via
# djangorestframework
# icalendar
pyyaml==6.0
# via
# mj (setup.py)
# mj (backend/setup.py)
# uvicorn
queuelib==1.6.2
# via scrapy
Expand All @@ -131,7 +155,7 @@ requests==2.27.1
requests-file==1.5.1
# via tldextract
scrapy==2.6.1
# via mj (setup.py)
# via mj (backend/setup.py)
service-identity==21.1.0
# via scrapy
six==1.16.0
Expand All @@ -150,16 +174,21 @@ sqlparse==0.4.2
# via django
tldextract==3.3.0
# via scrapy
tomli==2.0.1
# via
# black
# build
# pep517
twisted==22.4.0
# via scrapy
typing-extensions==4.2.0
# via twisted
uritemplate==4.1.1
# via mj (setup.py)
# via mj (backend/setup.py)
urllib3==1.26.9
# via requests
uvicorn[standard]==0.17.6
# via mj (setup.py)
# via mj (backend/setup.py)
uvloop==0.16.0
# via uvicorn
w3lib==1.22.0
Expand All @@ -173,10 +202,13 @@ webencodings==0.5.1
# via bleach
websockets==10.3
# via uvicorn
wheel==0.37.1
# via pip-tools
zope-interface==5.4.0
# via
# scrapy
# twisted

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
3 changes: 3 additions & 0 deletions backend/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@
url="https://muenster-jetzt.de/",
packages=["mj", "events", "scraping"],
install_requires=[
"black",
"bleach",
"click",
"django",
"django-cors-headers",
"django-filter",
"djangorestframework",
"djangorestframework-camel-case",
"geopy",
"gunicorn",
"icalendar",
"markdown",
"pip-tools",
"psycopg2-binary",
"python-dotenv",
"pyyaml",
Expand Down