-
Notifications
You must be signed in to change notification settings - Fork 5
⬆️ Upgrade openapi generator #202
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
Merged
bisgaard-itis
merged 60 commits into
ITISFoundation:master
from
bisgaard-itis:201-experiment-with-upgrading-openapi-generator
Jan 22, 2025
Merged
Changes from 41 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
15869d0
begin converting to new generator
bisgaard-itis 6df235f
remove invalid import
bisgaard-itis e6663e6
fix minor bug in tests
bisgaard-itis 456a98b
fix download file method
bisgaard-itis e7756b1
remove skip if dev version decorator
bisgaard-itis 373089b
update models in wrapper
bisgaard-itis 4bb8a1c
patch JobInputs model
bisgaard-itis f55455b
make JobOutputs backwards compatible
bisgaard-itis 4351ea5
improve wrapping of JobOutputs
bisgaard-itis 8837472
improve JobInputs constructor
bisgaard-itis dae27fe
resolve configuration issue
bisgaard-itis 35b66fd
include configuration directly in api
bisgaard-itis bc3bfe1
update to latest openapi.json
bisgaard-itis a5985bd
cleanup model location
bisgaard-itis 4039885
start adding metadata test
bisgaard-itis 728c497
expose MetadataValue
bisgaard-itis 7a6ca5f
only missing check that objects coincide
bisgaard-itis 98b53e5
improve wrapper models
bisgaard-itis f703002
improve jobinputs model
bisgaard-itis 040d1f9
handle metadata and job inputs/outputs in studies api
bisgaard-itis 5d0b7b5
fix several unittests
bisgaard-itis 4257335
improve design of unittests
bisgaard-itis c38eac2
minor refactoring
bisgaard-itis 8cd2ff3
start creating test for create solver jobs
bisgaard-itis 295c827
add create job test
bisgaard-itis 1ef0fd5
extract models from openapi specs
bisgaard-itis 5b47cc2
add test for joboutputs
bisgaard-itis da0965f
minor cleanup
bisgaard-itis 3fd8207
remove obsolete tests
bisgaard-itis 99a4a65
fix create job function
bisgaard-itis 9ba877c
use monkeypatch to avoid rouge env vars
bisgaard-itis a11cab2
redo uneeded change
bisgaard-itis 36f5c1c
improve some signatures in the wrapped client
bisgaard-itis 3e1e831
automate response model creation when mocking
bisgaard-itis 3fc1767
add study api unit tests
bisgaard-itis bc42b5e
minor corrections
bisgaard-itis 31e62ee
delete old comment @pcrespov
bisgaard-itis 2ceb1ad
fix faker.uuid4 type issue
bisgaard-itis e76b901
fix
bisgaard-itis 41f0df1
update openapi.json with new model examples
bisgaard-itis 99341ad
make Make recipe more readable @pcrespov
bisgaard-itis db56108
merge master into 201-experiment-with-upgrading-openapi-generator
bisgaard-itis f0f31f6
python 3.8 compatible
bisgaard-itis e0d5f2d
merge master into 201-experiment-with-upgrading-openapi-generator
bisgaard-itis b9bcdc7
remove Annotated import from typing
bisgaard-itis ff7c0d5
fix type hinting dict to Dict for py 3.8
bisgaard-itis 6323aaf
more py3.8 compatibility changes
bisgaard-itis 084fa56
more py3.8 compatibility changes
bisgaard-itis db2d5d2
more py3.8 compatibility changes
bisgaard-itis 866fa8a
more py3.8 compatibility changes
bisgaard-itis 122e912
update openapi.json
bisgaard-itis 002b157
minor fix after openapi.json update
bisgaard-itis 5d37230
test fix for https://github.com/ITISFoundation/osparc-simcore/issues/…
bisgaard-itis baf7bc1
Merge branch '201-experiment-with-upgrading-openapi-generator' of git…
bisgaard-itis 308dd7f
merge master into 201-experiment-with-upgrading-openapi-generator
bisgaard-itis 4041620
add make target for installing local client for running e2e tests
bisgaard-itis 5fd1600
Merge branch 'master' into 201-experiment-with-upgrading-openapi-gene…
bisgaard-itis 08b6641
update openapi.json from osparc-simcore master
bisgaard-itis bfd0b01
fix models interface to new legacy models
bisgaard-itis 2dbb375
fix page_file fixture
bisgaard-itis 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,4 +1,3 @@ | ||
-r ../../../requirements.txt | ||
-r unit-test.txt | ||
-r e2e-test.txt | ||
pylint |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
"tenacity", | ||
"tqdm>=4.48.0", | ||
f"osparc_client=={VERSION}", | ||
"urllib3", | ||
] | ||
|
||
SETUP = dict( | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,45 @@ | ||
from osparc_client import Configuration as _Configuration | ||
from typing import Set | ||
from urllib3 import Retry | ||
|
||
|
||
class Configuration(_Configuration): | ||
def __init__( | ||
self, | ||
host="https://api.osparc.io", | ||
api_key=None, | ||
api_key_prefix=None, | ||
username=None, | ||
password=None, | ||
*, | ||
retry_max_count: int = 4, | ||
retry_methods: Set[str] = { | ||
"DELETE", | ||
"GET", | ||
"HEAD", | ||
"OPTIONS", | ||
"PUT", | ||
"TRACE", | ||
"POST", | ||
"PATCH", | ||
"CONNECT", | ||
}, | ||
retry_status_codes: Set[int] = {429, 503, 504}, | ||
retry_backoff_factor=4.0, | ||
): | ||
retries = Retry( | ||
total=retry_max_count, | ||
backoff_factor=retry_backoff_factor, | ||
status_forcelist=retry_status_codes, | ||
allowed_methods=retry_methods, | ||
respect_retry_after_header=True, | ||
raise_on_status=True, | ||
) | ||
super().__init__( | ||
host=host, | ||
api_key=api_key, | ||
api_key_prefix=api_key_prefix, | ||
username=username, | ||
password=password, | ||
retries=retries, | ||
) |
This file contains hidden or 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,45 @@ | ||
from osparc_client import JobInputs as _JobInputs | ||
from osparc_client import JobOutputs as _JobOutputs | ||
from osparc_client import JobMetadata as _JobMetadata | ||
from osparc_client import JobMetadataUpdate as _JobMetadataUpdate | ||
from .models import File | ||
from typing import Dict, Union, List | ||
from pydantic import BaseModel, StrictStr, Field | ||
|
||
|
||
class JobInputs(BaseModel): | ||
values: Dict[str, Union[File, List[object], bool, float, int, str, None]] | ||
|
||
def __init__( | ||
self, values: Dict[str, Union[File, List[object], bool, float, int, str, None]] | ||
): | ||
super().__init__(values=values) | ||
|
||
|
||
assert set(_JobInputs.model_fields.keys()) == set(JobInputs.model_fields.keys()) | ||
|
||
|
||
class JobOutputs(BaseModel): | ||
job_id: StrictStr = Field(description="Job that produced this output") | ||
results: Dict[str, Union[File, List[object], bool, float, int, str, None]] | ||
|
||
|
||
assert set(_JobOutputs.model_fields.keys()) == set(JobOutputs.model_fields.keys()) | ||
|
||
|
||
class JobMetadata(BaseModel): | ||
job_id: StrictStr | ||
metadata: Dict[str, Union[bool, float, int, str, None]] | ||
url: str | None | ||
|
||
|
||
assert set(_JobMetadata.model_fields.keys()) == set(JobMetadata.model_fields.keys()) | ||
|
||
|
||
class JobMetadataUpdate(BaseModel): | ||
metadata: Dict[str, Union[bool, float, int, str, None]] | ||
|
||
|
||
assert set(_JobMetadataUpdate.model_fields.keys()) == set( | ||
JobMetadataUpdate.model_fields.keys() | ||
) |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.