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
2 changes: 0 additions & 2 deletions backend/apps/ifc_validation/tasks/processing/bsdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,3 @@ def process_bsdd(context:TaskContext):
agg_status = context.task.determine_aggregate_status()
model.status_bsdd = agg_status
model.save(update_fields=['status_bsdd'])

return f"agg_status = {Model.Status(agg_status).label}\nmessages = {json_output['messages']}"
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def create_outcome(di):
ValidationOutcome.objects.bulk_create(list(map(create_outcome, output)), batch_size=DJANGO_DB_BULK_CREATE_BATCH_SIZE)

model.save(update_fields=['status_signatures'])
return 'Digital signature check completed' if success else f"Script returned exit code {context.result.returncode} and {context.result.stderr}"
logger.info('Digital signature check completed' if success else f"Script returned exit code {context.result.returncode} and {context.result.stderr}")
2 changes: 0 additions & 2 deletions backend/apps/ifc_validation/tasks/processing/gherkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ def process_gherkin_outcomes(context:TaskContext):
agg_status = context.task.determine_aggregate_status()
setattr(model, status_field, agg_status)
model.save(update_fields=[status_field])

return f'agg_status = {Model.Status(agg_status).label}\nraw_output = {context.result}'

def process_normative_ia(context:TaskContext):
return process_gherkin_outcomes(context)
Expand Down
2 changes: 0 additions & 2 deletions backend/apps/ifc_validation/tasks/processing/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,3 @@ def process_header(context:TaskContext):
model.header_validation = header_validation
model.save(update_fields=['status_header', 'header_validation'])
model.save()

return f'agg_status = {Model.Status(agg_status).label}\nraw_output = {header_validation}'
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def process_instance_completion(context:TaskContext):
inst.ifc_type = ifc_file[inst.stepfile_id].is_a()
inst.save()

return f'Updated {instance_count:,} ModelInstance record(s)'
logger.info(f'Updated {instance_count:,} ModelInstance record(s)')
4 changes: 1 addition & 3 deletions backend/apps/ifc_validation/tasks/processing/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,4 @@ def process_schema(context:TaskContext):

ValidationOutcome.objects.bulk_create(outcomes_to_save, batch_size=DJANGO_DB_BULK_CREATE_BATCH_SIZE)

model.save(update_fields=['status_schema'])

return "No IFC schema errors." if success else f"'ifcopenshell.validate' returned exit code {context.proc.returncode} and {len(output):,} errors."
model.save(update_fields=['status_schema'])
2 changes: 1 addition & 1 deletion backend/apps/ifc_validation/tasks/processing/syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def process_syntax_outcomes(context:TaskContext):
model.save(update_fields=[status_field])

# return reason for logging
return "No IFC syntax error(s)." if success else f"Found IFC syntax errors:\n\nConsole: \n{output}\n\nError: {error_output}"
logger.info("No IFC syntax error(s)." if success else f"Found IFC syntax errors:\n\nConsole: \n{output}\n\nError: {error_output}")


def process_syntax(context:TaskContext):
Expand Down