Skip to content

Commit

Permalink
IVS-255 - Run SPF as module & update ifcopenshell
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghesselink authored and aothms committed Nov 24, 2024
1 parent e889290 commit 2136186
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ 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.1-088bc20-linux64.zip"
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-0267e2b-linux64.zip"
mkdir -p venv/lib/python3.11/site-packages
unzip -d venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip
Expand Down
4 changes: 2 additions & 2 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
. $(VIRTUAL_ENV)/bin/activate && \
pip install --upgrade pip && \
pip install -r requirements.txt && \
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-088bc20-linux64.zip" && \
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-0267e2b-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 && \
rm /tmp/ifcopenshell_python.zip
Expand All @@ -22,7 +22,7 @@ install-macos: venv
. $(VIRTUAL_ENV)/bin/activate && \
pip install --upgrade pip && \
pip install -r requirements.txt && \
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-088bc20-macos64.zip" && \
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-0267e2b-macos64.zip" && \
mkdir -p $(VIRTUAL_ENV)/lib/python3.11/site-packages && \
unzip /tmp/ifcopenshell_python.zip -d .dev/venv/lib/python3.11/site-packages && \
rm /tmp/ifcopenshell_python.zip
Expand Down
3 changes: 1 addition & 2 deletions backend/apps/ifc_validation/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ def syntax_validation_subtask(self, prev_result, id, file_name, *args, **kwargs)
request.save()

# determine program/script to run
check_script = os.path.join(os.path.dirname(__file__), "checks", "step_file_parser", "main.py")
check_program = [sys.executable, check_script, '--json', file_path]
check_program = [sys.executable, "-m", "ifcopenshell.simple_spf", '--json', file_path]
logger.debug(f'Command for {self.__qualname__}: {" ".join(check_program)}')

# add task
Expand Down
2 changes: 1 addition & 1 deletion docker/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN --mount=type=cache,target=/root/.cache \
pip install --no-cache-dir -r /app/backend/requirements.txt && \
# 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.1-088bc20-linux64.zip" && \
wget -O /tmp/ifcopenshell_python.zip "https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-311-v0.8.1-0267e2b-linux64.zip" && \
mkdir -p /opt/venv/lib/python3.11/site-packages && \
unzip -d /opt/venv/lib/python3.11/site-packages /tmp/ifcopenshell_python.zip && \
# some cleanup
Expand Down

0 comments on commit 2136186

Please sign in to comment.