-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The following request/questions came from a quick interaction with the datamodel.
1. IfcValidationOutcome.instance
points to model instead of instance
ifc-validation-data-model/models.py
Lines 705 to 706 in d09fb3a
instance = models.ForeignKey( | |
to=IfcModel, |
2. IfcValidationOutcome.instance
should be optional. In not all cases we will have an instance to refer to
3. IfcValidationOutcome.feature
and code
are redundant. Delete code.
ifc-validation-data-model/models.py
Lines 725 to 730 in d09fb3a
feature = models.CharField( | |
max_length=1024, | |
null=False, | |
blank=False, | |
help_text="Name of the Gherkin Feature." | |
) |
ifc-validation-data-model/models.py
Lines 739 to 745 in d09fb3a
code = models.CharField( | |
max_length=6, | |
null=False, | |
blank=False, | |
db_index=True, | |
help_text="Name of the Gherkin Feature." | |
) |
4. IfcValidationOutcome.feature
and feature_version
Should be optional as not everything is Gherkin-related.
5. My preference would be to remove the Ifc-
prefix from all classes
6. IfcModel
has no attribute type
, suggest file_name
. I didn't review all repr functions, just came across this in my repl session.
ifc-validation-data-model/models.py
Line 381 in d09fb3a
return f'#{self.id} - {self.created} - {self.type}' |
7. IfcModel.Status
: Needed? Or retrieve as related IfcValidationTask.Status? We have it currently in the datamodel, but in my mind it is a bit redundant.
ifc-validation-data-model/models.py
Lines 185 to 191 in d09fb3a
class Status(models.TextChoices): | |
""" | |
The overall status of a Model. | |
""" | |
VALID = 'v', 'Valid' | |
INVALID = 'i', 'Invalid' | |
NOT_VALIDATED = 'n', 'Not Validated' |
ifc-validation-data-model/models.py
Lines 280 to 288 in d09fb3a
status_bsdd = models.CharField( | |
max_length=1, | |
choices=Status.choices, | |
default=Status.NOT_VALIDATED, | |
db_index=True, | |
null=False, | |
blank=False, | |
help_text="Status of the bSDD Validation." | |
) |
etc.
vs.
ifc-validation-data-model/models.py
Lines 554 to 563 in d09fb3a
class Status(models.TextChoices): | |
""" | |
The overall status of a Validation Task. | |
""" | |
PENDING = 'PENDING', 'Pending' | |
SKIPPED = 'SKIPPED', 'Skipped' | |
NOT_APPLICABLE = 'N/A', 'Not Applicable' | |
INITIATED = 'INITIATED', 'Initiated' | |
FAILED = 'FAILED', 'Failed' | |
COMPLETED = 'COMPLETED', 'Completed' |
8. IfcValidationTask vs IfcValidationRequest. Why both?
ifc-validation-data-model/models.py
Line 434 in d09fb3a
class IfcValidationRequest(AuditedBaseModel): |
ifc-validation-data-model/models.py
Line 535 in d09fb3a
class IfcValidationTask(AuditedBaseModel): |