Skip to content

Commit

Permalink
Merge branch 'main' into feat/sqlx-main-api
Browse files Browse the repository at this point in the history
# Conflicts:
#	server/Cargo.lock
#	server/main-api/Cargo.toml
  • Loading branch information
CommanderStorm committed Sep 28, 2023
2 parents ba51918 + b857239 commit ebef2cb
Show file tree
Hide file tree
Showing 27 changed files with 647 additions and 756 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/_docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ jobs:
outputs:
tags: ${{ steps.meta.outputs.tags }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- run: cp openapi.yaml data/output
- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- uses: docker/setup-buildx-action@v2
- uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ${{ inputs.context }}
push: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/add-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
ref: deployment
- run: git config --global user.email "github-actions[bot]@users.noreply.github.com"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/data-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/setup-node@v3
with:
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remove-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
ref: deployment
- run: git config --global user.email "github-actions[bot]@users.noreply.github.com"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/server-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Setup | Rust
uses: actions-rust-lang/[email protected]
with:
Expand All @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Setup | Rust
uses: actions-rust-lang/[email protected]
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/webclient-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
image: cypress/browsers:node16.16.0-chrome107-ff107
options: --user 1001
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/setup-node@v3
with:
cache: 'npm'
Expand All @@ -35,7 +35,7 @@ jobs:
webclient-linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/setup-node@v3
with:
cache: 'npm'
Expand Down
7 changes: 4 additions & 3 deletions data/processors/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def export_for_search(data: dict, path: str) -> None:
geo = {}
if coords := entry.get("coords"):
geo["_geo"] = {"lat": coords["lat"], "lng": coords["lon"]}
parent_building_names = extract_parent_building_names(data, entry["parents"], building_parents_index)
export.append(
{
# MeiliSearch requires an id without "."
Expand All @@ -84,9 +85,9 @@ def export_for_search(data: dict, path: str) -> None:
"room": "room",
"virtual_room": "room",
}.get(entry["type"]),
"parent_building_names": extract_parent_building_names(data, entry["parents"], building_parents_index),
"parent_building_names": parent_building_names,
# For all other parents, only the ids and their keywords (TODO) are searchable
"parent_keywords": entry["parents"][1:],
"parent_keywords": [maybe_slugify(value) for value in parent_building_names + entry["parents"][1:]],
"campus": maybe_slugify(campus_name),
"address": entry.get("tumonline_data", {}).get("address", None),
"usage": maybe_slugify(entry.get("usage", {}).get("name", None)),
Expand All @@ -107,7 +108,7 @@ def extract_parent_building_names(data: dict, parents: list[str], building_paren
# For rooms, the (joined_)building parents are extra to put more emphasis on them.
short_names = [data[p]["short_name"] for p in parents[building_parents_index:] if "short_name" in data[p]]
long_names = [data[p]["name"] for p in parents[building_parents_index:]]
return [maybe_slugify(value) for value in short_names + long_names]
return short_names + long_names


def extract_arch_name(entry: dict) -> str | None:
Expand Down
4 changes: 2 additions & 2 deletions data/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
beautifulsoup4~=4.12.2
defusedxml~=0.7.1
lxml~=4.9.2
numba~=0.57.1
numba~=0.58.0
Pillow~=10.0.0
pydantic~=2.3.0
pydantic~=2.4.2
pyyaml~=6.0
requests~=2.31.0
ruamel.yaml~=0.17.24
Expand Down
143 changes: 0 additions & 143 deletions deployment/ansible/roles/k8s-components/tasks/components/penpot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion deployment/k3s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server:
mielisearch:
image:
repository: 'getmeili/meilisearch'
tag: v1.3.3
tag: v1.4.0
calendar:
scrape_tasks:
- name: refresh-calendar-slow # takes ~6m to complete
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mypy~=1.5.0
pre-commit~=3.4.0
pylint~=2.17.4
sourcery~=1.8.0
sourcery~=1.10.0
types-Pillow~=10.0.0.2
types-PyYAML~=6.0.12.10
types-requests~=2.31.0.1
Expand Down
Loading

0 comments on commit ebef2cb

Please sign in to comment.