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

CLI- Task list improvement #2863

Merged
merged 3 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- CLI - task list now returns a list of current tasks. (<https://github.com/openvinotoolkit/cvat/pull/2863>)
- Updated HTTPS install README section (cleanup and described more robust deploy)
- Logstash is improved for using with configurable elasticsearch outputs (<https://github.com/openvinotoolkit/cvat/pull/2531>)
- Bumped nuclio version to 1.5.16 (<https://github.com/openvinotoolkit/cvat/pull/2578>)
Expand Down
5 changes: 4 additions & 1 deletion utils/cli/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,23 @@ def tasks_list(self, use_json_output, **kwargs):
url = self.api.tasks
response = self.session.get(url)
response.raise_for_status()
output = []
page = 1
while True:
response_json = response.json()
output += response_json['results']
for r in response_json['results']:
if use_json_output:
log.info(json.dumps(r, indent=4))
else:
log.info('{id},{name},{status}'.format(**r))
if not response_json['next']:
return
return output
page += 1
url = self.api.tasks_page(page)
response = self.session.get(url)
response.raise_for_status()
return output

def tasks_create(self, name, labels, overlap, segment_size, bug, resource_type, resources,
annotation_path='', annotation_format='CVAT XML 1.1',
Expand Down