-
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
Check server version in SDK #4935
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a135ffe
Add server version control in SDK
zhiltsov-max 40a1d18
Sync server schema version with server version
zhiltsov-max 40552d4
Allow unauthorized access to api/about/, api/docs/, api/swagger, api/…
zhiltsov-max e07d9ba
Add test for cli notification about version
zhiltsov-max ef85303
Merge branch 'develop' into zm/check-server-version-in-sdk
zhiltsov-max 2aa8ded
Extend the list of supported versions in CLI
zhiltsov-max 478282e
Fix url building
zhiltsov-max 20d18a3
Improve schema error message
zhiltsov-max e2a5e7d
Improve version check behaviour
zhiltsov-max ea4bde4
Fix test
zhiltsov-max 1218379
Merge remote-tracking branch 'origin/develop' into zm/check-server-ve…
nmanovic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
-r api_client.txt | ||
|
||
attrs >= 21.4.0 | ||
packaging >= 21.3 | ||
Pillow >= 9.0.1 | ||
tqdm >= 4.64.0 | ||
tuspy == 0.2.5 # have it pinned, because SDK has lots of patched TUS code | ||
typing_extensions >= 4.2.0 | ||
typing_extensions >= 4.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright (C) 2022 CVAT.ai Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
|
||
from http import HTTPStatus | ||
import pytest | ||
from shared.utils.config import make_api_client | ||
|
||
|
||
@pytest.mark.usefixtures('dontchangedb') | ||
class TestGetServer: | ||
def test_can_retrieve_about_unauthorized(self): | ||
with make_api_client(user=None, password=None) as api_client: | ||
(data, response) = api_client.server_api.retrieve_about() | ||
|
||
assert response.status == HTTPStatus.OK | ||
assert data.version | ||
|
||
def test_can_retrieve_formats(self, admin_user: str): | ||
with make_api_client(admin_user) as api_client: | ||
(data, response) = api_client.server_api.retrieve_annotation_formats() | ||
|
||
assert response.status == HTTPStatus.OK | ||
assert len(data.importers) != 0 | ||
assert len(data.exporters) != 0 | ||
|
||
|
||
@pytest.mark.usefixtures('dontchangedb') | ||
class TestGetSchema: | ||
def test_can_get_schema_unauthorized(self): | ||
with make_api_client(user=None, password=None) as api_client: | ||
(data, response) = api_client.schema_api.retrieve() | ||
|
||
assert response.status == HTTPStatus.OK | ||
assert data |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Probably need to remove the TODO