-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Git formats flexibility #3708
Git formats flexibility #3708
Conversation
format_name = "CVAT for images 1.1" | ||
elif format not in EXPORT_FORMATS: | ||
format_name = "CVAT for video 1.1" | ||
return format_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain the logic behind this function? If it is only supposed for returning an initial value, maybe it's better to be renamed and/or moved to another place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an additional check if we can use selected git format with this task mode and if this format is presented in EXPORT_FORMATS. Also you may see this logic here: cvat/apps/dataset_repo/dataset_repo.py line 268 (in this branch moved to registry.py)
@PMazarovich, could you please fix tests and linter problems? |
aab7055
to
6427625
Compare
@ActiveChooN, linter fixed (except bandit, not sure, what to fix there), test changed accordingly |
@@ -276,15 +280,37 @@ class AdvancedConfigurationForm extends React.PureComponent<Props> { | |||
); | |||
} | |||
|
|||
private renderGitFormat(): JSX.Element { | |||
const { dumpers } = getCVATStore().getState().formats.annotationFormats.dumpers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bad practice to use state directly, better to put dumpers in mapStateToProps
function. Also I have an error have due to dumpers always is undefined.
@PMazarovich, hi, do you think you could fix problems in this PR? |
@ActiveChooN , hello, I'll try to fix them this week |
6747ac9
to
f47be81
Compare
f47be81
to
52353f2
Compare
@ActiveChooN , hello, requested changes done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PMazarovich, everything works like a charm, thank you for your contribution!
@dvkruchinin, there is a Bandit error not related to that PR, can you help, please? @bsekachev, I can see you were the original contributor of error-related changes in _have_no_access_exception
.
|
@PMazarovich , thanks for your contribution! Great job. |
Motivation and context
Sometimes it is necessary to dump and push annotations data to git not only in "CVAT for video" format. With these changes it is possible to choose, which format to use for dumping annotations to git.
How has this been tested?
It was tested manually
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.