-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 Enhances Iicence feature: new vendor phantoms and licensed-resource-data id (🚨)
#7179
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
pcrespov
merged 6 commits into
ITISFoundation:master
from
pcrespov:is1732/add-phantoms-speag-vendor
Feb 6, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9285a98
@odeimaiz: returns id
pcrespov 78b8ec7
@mguidon request: speag phantoms
pcrespov e501b5b
categories
pcrespov ee8617b
updates os
pcrespov 92046e7
services/webserver api version: 0.52.0 → 0.53.0
pcrespov 3aaea4c
@odeimaiz req: optional categoryIcon
pcrespov 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 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 |
|---|---|---|
|
|
@@ -135,8 +135,10 @@ FUNCTION_SERVICES_AUTHORS='{"UN": {"name": "Unknown", "email": "[email protected] | |
|
|
||
| WEBSERVER_LICENSES={} | ||
| LICENSES_ITIS_VIP_SYNCER_ENABLED=false | ||
| LICENSES_ITIS_VIP_API_URL=https://some-api/{category} | ||
| LICENSES_ITIS_VIP_API_URL=https://replace-with-itis-api/{category} | ||
| LICENSES_ITIS_VIP_CATEGORIES='{"HumanWholeBody": "Humans", "HumanBodyRegion": "Humans (Region)", "AnimalWholeBody": "Animal"}' | ||
| LICENSES_SPEAG_PHANTOMS_API_URL=https://replace-with-speag-api/{category} | ||
| LICENSES_SPEAG_PHANTOMS_CATEGORIES='{"ComputationalPhantom": "Phantom of the Opera"}' | ||
|
|
||
| # Can use 'docker run -it itisfoundation/invitations:latest simcore-service-invitations generate-dotenv --auto-password' | ||
| INVITATIONS_DEFAULT_PRODUCT=osparc | ||
|
|
||
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 |
|---|---|---|
| @@ -1,20 +1,35 @@ | ||
| from models_library.api_schemas_webserver.licensed_items import LicensedItemRestGet | ||
| from models_library.licenses import LicensedItem | ||
| from pydantic import ConfigDict | ||
|
|
||
|
|
||
| def test_licensed_item_from_domain_model(): | ||
| for example in LicensedItem.model_json_schema()["examples"]: | ||
| item = LicensedItem.model_validate(example) | ||
|
|
||
| payload = LicensedItemRestGet.from_domain_model(item) | ||
| got = LicensedItemRestGet.from_domain_model(item) | ||
|
|
||
| assert item.display_name == payload.display_name | ||
| assert item.display_name == got.display_name | ||
|
|
||
| # nullable doi | ||
| assert ( | ||
| payload.licensed_resource_data.source.doi | ||
| got.licensed_resource_data.source.doi | ||
| == item.licensed_resource_data["source"]["doi"] | ||
| ) | ||
|
|
||
| # date is required | ||
| assert payload.licensed_resource_data.source.features["date"] | ||
| assert got.licensed_resource_data.source.features["date"] | ||
|
|
||
| # | ||
| assert ( | ||
| got.licensed_resource_data.source.id | ||
| == item.licensed_resource_data["source"]["id"] | ||
| ) | ||
|
|
||
|
|
||
| def test_strict_check_of_examples(): | ||
| class TestLicensedItemRestGet(LicensedItemRestGet): | ||
| model_config = ConfigDict(extra="forbid") | ||
|
|
||
| for example in LicensedItemRestGet.model_json_schema()["examples"]: | ||
| TestLicensedItemRestGet.model_validate(example) |
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 +1 @@ | ||
| 0.52.0 | ||
| 0.53.0 |
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
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.
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.