Skip to content

Commit

Permalink
Merge branch 'main' into modal_for_roomfinder
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius1501 committed Nov 29, 2022
2 parents e299d52 + 809eac3 commit 4aa90f3
Show file tree
Hide file tree
Showing 34 changed files with 1,104,197 additions and 349 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion .github/workflows/server.yml
Expand Up @@ -91,7 +91,7 @@ jobs:
- uses: actions/checkout@v3.0.0
- uses: ATiltedTree/setup-rust@v1.0.5
with:
rust-version: 1.62.1
rust-version: 1.65
# run project's dependencies
- run: cargo build
working-directory: server
Expand Down
4 changes: 2 additions & 2 deletions data/Dockerfile
@@ -1,4 +1,4 @@
FROM python:3.11.0rc2-bullseye as build-stage
FROM python:3.11-bullseye as build-stage
WORKDIR /app

ARG GIT_COMMIT_SHA
Expand Down Expand Up @@ -29,7 +29,7 @@ COPY search_synonyms.json output/
# compress data (only using gzip, because brotli on ngnix is a royal pain)
RUN gzip --force --keep --recursive output/

FROM nginx as production-stage
FROM nginx:latest as production-stage
RUN mkdir /cdn
COPY --from=build-stage /app/output /cdn
COPY nginx.conf /etc/nginx/nginx.conf
5 changes: 4 additions & 1 deletion data/external/main.py
@@ -1,7 +1,7 @@
import logging
import os

from external.scrapers import roomfinder, tumonline
from external.scrapers import nat, roomfinder, tumonline
from external.scraping_utils import CACHE_PATH
from utils import setup_logging

Expand All @@ -11,6 +11,7 @@
os.makedirs(CACHE_PATH, exist_ok=True)
os.makedirs(CACHE_PATH / "filter", exist_ok=True)
os.makedirs(CACHE_PATH / "tumonline", exist_ok=True)
os.makedirs(CACHE_PATH / "nat", exist_ok=True)
os.makedirs(CACHE_PATH / "room", exist_ok=True)
os.makedirs(CACHE_PATH / "maps" / "roomfinder", exist_ok=True)
os.makedirs(CACHE_PATH / "maps" / "roomfinder" / "kmz", exist_ok=True)
Expand All @@ -19,9 +20,11 @@
# The downloader will automatically create a cache in `cache/`.
roomfinder.scrape_buildings()
tumonline.scrape_buildings()
nat.scrape_buildings()

roomfinder.scrape_rooms()
tumonline.scrape_rooms()
nat.scrape_rooms()

tumonline.scrape_usages()

Expand Down

0 comments on commit 4aa90f3

Please sign in to comment.