Skip to content

Commit 37a0f60

Browse files
authored
Merge pull request #37 from buildingSMART/IVS-520-tasks-orchestration
IVS-520 - Syntax split into header & syntax
2 parents 96aa911 + 1083d2d commit 37a0f60

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 5.1.4 on 2025-06-26 21:35
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('ifc_validation_models', '0013_model_status_signatures_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='model',
15+
name='status_header_syntax',
16+
field=models.CharField(choices=[('v', 'Valid'), ('i', 'Invalid'), ('n', 'Not Validated'), ('w', 'Warning'), ('-', 'Not Applicable')], db_index=True, default='n', help_text='Status of the Syntax Validation of the header section.', max_length=1),
17+
),
18+
migrations.AlterField(
19+
model_name='validationtask',
20+
name='type',
21+
field=models.CharField(choices=[('SYNTAX', 'STEP Physical File Syntax'), ('HEADER_SYNTAX', 'STEP Physical File Syntax (HEADER section)'), ('SCHEMA', 'Schema (EXPRESS language)'), ('MVD', 'Model View Definitions'), ('BSDD', 'bSDD Compliance'), ('INFO', 'Parse Info'), ('PREREQ', 'Prerequisites'), ('HEADER', 'Header Validation'), ('NORMATIVE_IA', 'Implementer Agreements (IA)'), ('NORMATIVE_IP', 'Informal Propositions (IP)'), ('INDUSTRY', 'Industry Practices'), ('INST_COMPLETION', 'Instance Completion'), ('DIGITAL_SIGNATURES', 'Digital Signatures')], db_index=True, help_text='Type of the Validation Task.', max_length=25),
22+
),
23+
]

models.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,16 @@ class License(models.TextChoices):
584584
help_text="Status of the Syntax Validation."
585585
)
586586

587+
status_header_syntax = models.CharField(
588+
max_length=1,
589+
choices=Status.choices,
590+
default=Status.NOT_VALIDATED,
591+
db_index=True,
592+
null=False,
593+
blank=False,
594+
help_text="Status of the Syntax Validation of the header section."
595+
)
596+
587597
status_industry_practices = models.CharField(
588598
max_length=1,
589599
choices=Status.choices,
@@ -663,6 +673,7 @@ def reset_status(self):
663673
self.status_mvd = Model.Status.NOT_VALIDATED
664674
self.status_schema = Model.Status.NOT_VALIDATED
665675
self.status_syntax = Model.Status.NOT_VALIDATED
676+
self.status_header_syntax = Model.Status.NOT_VALIDATED
666677
self.status_industry_practices = Model.Status.NOT_VALIDATED
667678
self.status_prereq = Model.Status.NOT_VALIDATED
668679
self.status_header = Model.Status.NOT_VALIDATED
@@ -896,6 +907,7 @@ class Type(models.TextChoices):
896907
The type of an Validation Task.
897908
"""
898909
SYNTAX = 'SYNTAX', 'STEP Physical File Syntax'
910+
HEADER_SYNTAX = 'HEADER_SYNTAX', 'STEP Physical File Syntax (HEADER section)'
899911
SCHEMA = 'SCHEMA', 'Schema (EXPRESS language)'
900912
MVD = 'MVD', 'Model View Definitions'
901913
BSDD = 'BSDD', 'bSDD Compliance'

tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def test_task_can_navigate_back_to_model(self):
315315
)
316316
task = ValidationTask.objects.create(
317317
request=request,
318-
type=ValidationTask.Type.PARSE_INFO
318+
type=ValidationTask.Type.HEADER
319319
)
320320
model, _ = Model.objects.get_or_create(
321321
file_name = request.file_name,

0 commit comments

Comments
 (0)