-
Notifications
You must be signed in to change notification settings - Fork 9
IVS-516 - Use simple_spf only in parse_info task #188
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
IVS-516 - Use simple_spf only in parse_info task #188
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests following the PR build are failing?
Example: https://github.com/buildingSMART/validate/actions/runs/14812516097/job/41588969992
======================================================================
ERROR: test_parse_info_task_valid_file_does_not_create_validation_outcome (apps.ifc_validation.tests.tests_parse_info_task.ParseInfoTaskTestCase.test_parse_info_task_valid_file_does_not_create_validation_outcome)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/validate/validate/backend/apps/ifc_validation/tests/tests_parse_info_task.py", line 28, in test_parse_info_task_valid_file_does_not_create_validation_outcome
parse_info_subtask(
File "/home/runner/work/validate/validate/backend/venv/lib/python3.11/site-packages/celery/local.py", line 182, in __call__
return self._get_current_object()(*a, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/validate/validate/backend/venv/lib/python3.11/site-packages/celery/app/task.py", line 411, in __call__
return self.run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/validate/validate/backend/core/utils.py", line 71, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/validate/validate/backend/apps/ifc_validation_models/decorators.py", line 54, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/validate/validate/backend/apps/ifc_validation/tasks.py", line 380, in parse_info_subtask
raise RuntimeError(error_message)
RuntimeError: Running /home/runner/work/validate/validate/backend/venv/bin/python3 /home/runner/work/validate/validate/backend/apps/ifc_validation/checks/header_policy/validate_header.py /home/runner/work/validate/validate/backend/apps/ifc_validation/fixtures/valid_file.ifc failed with exit code 1
Error opening file '/home/runner/work/validate/validate/backend/apps/ifc_validation/fixtures/valid_file.ifc': open() got an unexpected keyword argument 'only_header'
There is a new SPF API to parse only the header, which is contained in this PR. I tested it locally by adding this to the .dev/venv folder (in ifcopenshell.simple_spf). To be really complete, also this PR should be merged into ifcopenshell before this PR is merged. But it's not strictly necessary. |
a877858
to
3dc6695
Compare
0edc9e6
to
3dc6695
Compare
7383f19
to
3dc6695
Compare
Depending on (and requires a new ifcopenshell build here):
Ifcopenshell.validate
(for allowing running schema pre-validation on headers using a simple_spf type) validate ifcopenshell.simple_spf.file IfcOpenShell/IfcOpenShell#6650simple_spf.open
: align header structure with ifcopenshell structure and added a API to only parse info (otherwise, the runtime will be long with large files and we don't need to parse the entities). Align header with IfcOpenShell structure IfcOpenShell/step-file-parser#13Not strictly necessary, but nice to have everything aligned.
Ifcopenshell MVD parser
: This is also available in SPF, e.g. the view definitions is available through file.mvd.view_definitions. parsed mvd description in ifcopenshell.file IfcOpenShell/IfcOpenShell#6154