Skip to content

Requests from TK #2

@aothms

Description

@aothms

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions