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

Detect if new class will clash with existing class of different type. #368

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

brentgracey
Copy link
Contributor

@brentgracey brentgracey commented Mar 2, 2022

This is likely to change soon ... and will then require re-updating and releasing darwin-py.
https://www.notion.so/v7labs/Allow-Same-Name-classes-of-different-Types-424578ba84a14c118101ccd3ed29366f

But in the meantime; could it be worth giving a friendly; informative helpful message to the end user?

Fetching remote class list...
Retrieving local annotations ...
Fetching remote file list...
1 annotation file(s) found.
`one` class of type `bounding_box` from imported annotations clashes with an existing class of the same name; but of type `tag`
`Surface damage` class of type `keypoint` from imported annotations clashes with an existing class of the same name; but of type `bounding_box`
Class names must be unique; even across types (see above error); can not proceed with import.

@Fl4m3Ph03n1x
Copy link
Contributor

Is there a way to test this ?
Under what specific scenario would this code come into play?

@Fl4m3Ph03n1x Fl4m3Ph03n1x self-assigned this Mar 3, 2022
@Fl4m3Ph03n1x Fl4m3Ph03n1x added enhancement New feature or request wind-team labels Mar 3, 2022
@brentgracey
Copy link
Contributor Author

I tested in manually.

This is the case we had the 2 hour triage with the customer on; when trying to create a class of the same name as some other already existing class type.

@Fl4m3Ph03n1x
Copy link
Contributor

Fl4m3Ph03n1x commented Mar 4, 2022

One day we will have unit tests for that module. Until that day comes, your word will have to do.
Approved on my side.

Thank you for taking the time to improve Darwin-py!

@Fl4m3Ph03n1x Fl4m3Ph03n1x self-requested a review March 4, 2022 10:37
@Fl4m3Ph03n1x Fl4m3Ph03n1x merged commit 0495534 into master Mar 4, 2022
@Fl4m3Ph03n1x Fl4m3Ph03n1x deleted the v7-2930-darwin-py-predict-name-taken-error branch March 4, 2022 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wind-team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants