Skip to content
Open
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.13

- name: Create venv
run: |
cd backend
python3.11 -m venv venv
python3.13 -m venv venv

- name: Install packages
run: |
Expand All @@ -84,9 +84,9 @@ jobs:
source venv/bin/activate
# use version of ifcopenshell with desired schema parsing
# TODO: revert to pyPI when schema parsing is published in the future
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-linux64.zip"
mkdir -p venv/lib/python3.11/site-packages
unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-313-v0.8.4-e8eb5e4-linux64.zip"
mkdir -p venv/lib/python3.13/site-packages
unzip -d venv/lib/python3.13/site-packages /tmp/ifcopenshell_python.zip

- name: Check Django config
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.13

- name: Create venv
run: |
cd backend
python3.11 -m venv venv
python3.13 -m venv venv

- name: Install packages
run: |
Expand All @@ -85,9 +85,9 @@ jobs:
source venv/bin/activate
# use version of ifcopenshell with desired schema parsing
# TODO: revert to pyPI when schema parsing is published in the future
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-linux64.zip"
mkdir -p venv/lib/python3.11/site-packages
unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-313-v0.8.4-e8eb5e4-linux64.zip"
mkdir -p venv/lib/python3.13/site-packages
unzip -d venv/lib/python3.13/site-packages /tmp/ifcopenshell_python.zip

- name: Check Django config
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.13

- name: Create venv
run: |
cd backend
python3.11 -m venv .dev/venv --clear
python3.13 -m venv .dev/venv --clear
echo "venv/bin folder content:"
ls -l .dev/venv/bin

Expand All @@ -104,14 +104,14 @@ jobs:

- name: Download and install ifcopenshell
run: |
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-linux64.zip"
mkdir -p .dev/venv/lib/python3.11/site-packages
unzip -o -d .dev/venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-313-v0.8.4-e8eb5e4-linux64.zip"
mkdir -p .dev/venv/lib/python3.13/site-packages
unzip -o -d .dev/venv/lib/python3.13/site-packages /tmp/ifcopenshell_python.zip
rm /tmp/ifcopenshell_python.zip
# Verify installation
ls -la .dev/venv/lib/python3.11/site-packages/
ls -la .dev/venv/lib/python3.13/site-packages/
echo "Checking for ifcopenshell installation:"
find .dev/venv/lib/python3.11/site-packages -name "*ifcopenshell*" || echo "No ifcopenshell files found"
find .dev/venv/lib/python3.13/site-packages -name "*ifcopenshell*" || echo "No ifcopenshell files found"
working-directory: ./backend

- name: Cache frontend dependencies
Expand Down
20 changes: 10 additions & 10 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@ none:
@echo

venv:
test -d $(VIRTUAL_ENV) || python3.11 -m venv $(VIRTUAL_ENV)
test -d $(VIRTUAL_ENV) || python3.13 -m venv $(VIRTUAL_ENV)

install: venv
$(PIP) install --upgrade pip
find . -name 'requirements.txt' -exec $(PIP) install -r {} \;
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-linux64.zip"
mkdir -p $(VIRTUAL_ENV)/lib/python3.11/site-packages
unzip -f -d $(VIRTUAL_ENV)/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-313-v0.8.4-e8eb5e4-linux64.zip"
mkdir -p $(VIRTUAL_ENV)/lib/python3.13/site-packages
unzip -f -d $(VIRTUAL_ENV)/lib/python3.13/site-packages /tmp/ifcopenshell_python.zip
rm /tmp/ifcopenshell_python.zip

install-macos: venv
find . -name 'requirements.txt' -exec $(PIP) install -r {} \;
$(PIP) install -r requirements.txt
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-macos64.zip"
mkdir -p $(VIRTUAL_ENV)/lib/python3.11/site-packages
unzip /tmp/ifcopenshell_python.zip -d $(VIRTUAL_ENV)/lib/python3.11/site-packages
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-313-v0.8.4-e8eb5e4-macos64.zip"
mkdir -p $(VIRTUAL_ENV)/lib/python3.13/site-packages
unzip /tmp/ifcopenshell_python.zip -d $(VIRTUAL_ENV)/lib/python3.13/site-packages
rm /tmp/ifcopenshell_python.zip

install-macos-m1: venv
find . -name 'requirements.txt' -exec $(PIP) install -r {} \;
$(PIP) install -r requirements.txt
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-macosm164.zip"
mkdir -p $(VIRTUAL_ENV)/lib/python3.11/site-packages
unzip /tmp/ifcopenshell_python.zip -d $(VIRTUAL_ENV)/lib/python3.11/site-packages
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-313-v0.8.4-e8eb5e4-macosm164.zip"
mkdir -p $(VIRTUAL_ENV)/lib/python3.13/site-packages
unzip /tmp/ifcopenshell_python.zip -d $(VIRTUAL_ENV)/lib/python3.13/site-packages
rm /tmp/ifcopenshell_python.zip

fetch-modules:
Expand Down
20 changes: 10 additions & 10 deletions backend/apps/ifc_validation/tests/tests_header_validation_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ def test_header_validation_task_correctly_parses_authoring_tool(self):
# assert
model = Model.objects.get(id=request.id)
self.assertIsNotNone(model)
self.assertEquals('MyFabTool', model.produced_by.name)
self.assertEquals('2025.1', model.produced_by.version)
self.assertEquals('Acme Inc.', model.produced_by.company.name)
self.assertEqual('MyFabTool', model.produced_by.name)
self.assertEqual('2025.1', model.produced_by.version)
self.assertEqual('Acme Inc.', model.produced_by.company.name)

def test_header_validation_task_correctly_parses_existing_authoring_tool(self):

Expand All @@ -176,10 +176,10 @@ def test_header_validation_task_correctly_parses_existing_authoring_tool(self):
# assert
model = Model.objects.get(id=request.id)
self.assertIsNotNone(model)
self.assertEquals('MyFabTool', model.produced_by.name)
self.assertEquals('2025.1', model.produced_by.version)
self.assertEquals('Acme Inc.', model.produced_by.company.name)
self.assertEquals(company.id, model.produced_by.id)
self.assertEqual('MyFabTool', model.produced_by.name)
self.assertEqual('2025.1', model.produced_by.version)
self.assertEqual('Acme Inc.', model.produced_by.company.name)
self.assertEqual(company.id, model.produced_by.id)

def test_header_validation_task_correctly_parses_existing_authoring_tool2(self):

Expand All @@ -204,6 +204,6 @@ def test_header_validation_task_correctly_parses_existing_authoring_tool2(self):
# assert
model = Model.objects.get(id=request.id)
self.assertIsNotNone(model)
self.assertEquals('MyFabTool', model.produced_by.name)
self.assertEquals('2025.1', model.produced_by.version)
self.assertEquals('Acme Inc.', model.produced_by.company.name)
self.assertEqual('MyFabTool', model.produced_by.name)
self.assertEqual('2025.1', model.produced_by.version)
self.assertEqual('Acme Inc.', model.produced_by.company.name)
10 changes: 5 additions & 5 deletions docker/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# BUILD image
FROM python:3.11-slim-bookworm AS build
FROM python:3.13-slim-bookworm AS build

ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
Expand Down Expand Up @@ -37,9 +37,9 @@ RUN --mount=type=cache,target=/root/.cache \
find /app/backend -name 'requirements.txt' -exec pip install --no-cache-dir -r {} \; && \
# use version of ifcopenshell with desired schema parsing
# TODO: revert to pyPI when schema parsing is published in the future
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.4-e8eb5e4-linux64.zip" && \
mkdir -p /opt/venv/lib/python3.11/site-packages && \
unzip -d /opt/venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip && \
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-313-v0.8.4-e8eb5e4-linux64.zip" && \
mkdir -p /opt/venv/lib/python3.13/site-packages && \
unzip -d /opt/venv/lib/python3.13/site-packages /tmp/ifcopenshell_python.zip && \
# some cleanup
find / -type d -name setuptools -prune -exec rm -rf {} \; && \
find / -type d -name pip -prune -exec rm -rf {} \; && \
Expand All @@ -55,7 +55,7 @@ ADD --chmod=777 ./docker/backend/worker-entrypoint.sh /app/backend

# RUN image
# NOTE: don't use Alpine images...
FROM python:3.11-slim-bookworm AS run
FROM python:3.13-slim-bookworm AS run

WORKDIR /app

Expand Down