SCIInstitute / shapeworks-cloud

A web version of ShapeWorks Studio
https://www.shapeworks-cloud.org/#/
Apache License 2.0
1 stars 0 forks source link

Parsing swproj files: Use first filename if subject has no name #354

Open annehaley opened 9 months ago

annehaley commented 9 months ago

Currently, swcc will raise an error trying to create subjects with no name. Some swproj files may not have "name" keys on every subject, or if the key exists, the value may be a blank string. This is intentionally allowed in the swproj format for compatibility with old ShapeWorksView2 XML files that don’t support name. The Studio application uses the first filename available for that subject, and it will parse an appropriate name from that. SWCC should do the same as Studio and should no longer raise a ValueError for empty subject names.