Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate section import from json #15

Closed
15 tasks
carlos-adir opened this issue Dec 13, 2023 · 3 comments
Closed
15 tasks

Validate section import from json #15

carlos-adir opened this issue Dec 13, 2023 · 3 comments

Comments

@carlos-adir
Copy link
Contributor

carlos-adir commented Dec 13, 2023

This issue expands the Issue #7.

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

  • Node labels are unique
  • Curves are well defined
    • Curve labels are unique
    • knotvector for curves are ordered
    • Control points of curves are refered in node labels
    • Curves are counter-clockwise oriented
  • Shapes are well defined
    • All curve labels are refered in curves
    • Areas are positive
    • Each shape is simple or connected shape
  • Materials are well defined
  • Sections are well defined
    • Subshapes are refered on shapes
    • Submaterials are refered on materials
    • Intersection subshapes is empty
@carlos-adir
Copy link
Contributor Author

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

@carlos-adir
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant