The following request/questions came from a quick interaction with the datamodel.
1. IfcValidationOutcome.instance points to model instead of instance
|
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.
|
feature = models.CharField( |
|
max_length=1024, |
|
null=False, |
|
blank=False, |
|
help_text="Name of the Gherkin Feature." |
|
) |
|
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.
|
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.
|
class Status(models.TextChoices): |
|
""" |
|
The overall status of a Model. |
|
""" |
|
VALID = 'v', 'Valid' |
|
INVALID = 'i', 'Invalid' |
|
NOT_VALIDATED = 'n', 'Not Validated' |
|
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.
|
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?
|
class IfcValidationRequest(AuditedBaseModel): |
|
class IfcValidationTask(AuditedBaseModel): |
9. IfcValidationTask/IfcValidationRequest. No foreign key to IfcModel
The following request/questions came from a quick interaction with the datamodel.
1.
IfcValidationOutcome.instancepoints to model instead of instanceifc-validation-data-model/models.py
Lines 705 to 706 in d09fb3a
2.
IfcValidationOutcome.instanceshould be optional. In not all cases we will have an instance to refer to3.
IfcValidationOutcome.featureandcodeare redundant. Delete code.ifc-validation-data-model/models.py
Lines 725 to 730 in d09fb3a
ifc-validation-data-model/models.py
Lines 739 to 745 in d09fb3a
4.
IfcValidationOutcome.featureandfeature_versionShould be optional as not everything is Gherkin-related.5. My preference would be to remove the
Ifc-prefix from all classes6.
IfcModelhas no attributetype, suggestfile_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
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
ifc-validation-data-model/models.py
Lines 280 to 288 in d09fb3a
etc.
vs.
ifc-validation-data-model/models.py
Lines 554 to 563 in d09fb3a
8. IfcValidationTask vs IfcValidationRequest. Why both?
ifc-validation-data-model/models.py
Line 434 in d09fb3a
ifc-validation-data-model/models.py
Line 535 in d09fb3a
9. IfcValidationTask/IfcValidationRequest. No foreign key to IfcModel