compmec / section

Analysis of beams cross-section using the boundary element method
MIT License
1 stars 0 forks source link

Validate section import from json #15

Closed carlos-adir closed 8 months ago

carlos-adir commented 10 months ago

This issue expands the Issue #7.

jsonschema handles syntax and value types verification, but some verifications jsonschema isn't capable of doing

carlos-adir commented 10 months ago

I'm not sure if this should be a responsability of dataio.py or the Section class

carlos-adir commented 10 months ago

If section has functions like from_json or from_dict, it should be responsability of the class to deal if the input is not correct.

Hence, verification if a material is defined should be made my Material class.

But verification if nodes and curves labels are unique can be made by dataio.py

A safe keyword can be added to skip the verification in these functions.

carlos-adir commented 8 months ago

Previous comment resumes.

For now, some verifications are skiped. I think it's better to improve the package considering the input is good, than implementing verifications.