-
Notifications
You must be signed in to change notification settings - Fork 0
Rlease v0.5.0 #51
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
Open
khoroshevskyi
wants to merge
12
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rlease v0.5.0 #51
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b33fdea
Work on schemas
khoroshevskyi ce482e6
Added pytests
khoroshevskyi e01fc43
Update pephubclient/schemas/schema_cli.py
khoroshevskyi 9f44db2
Fixed pr comments
khoroshevskyi 370b862
Merge pull request #50 from pepkit/schemas
khoroshevskyi d65ae3c
Updated version to 0.5.0
khoroshevskyi 1d564f4
Update pephubclient/exceptions.py
khoroshevskyi 38da2fc
Update tests/test_schemas.py
khoroshevskyi 4c32a14
updated schemas cli - added default dir
khoroshevskyi 7bd6e42
lint + ci
khoroshevskyi cb3e3bf
Merge branch 'schemas' into dev
khoroshevskyi 1760a7d
fixed pytests
khoroshevskyi 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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
include requirements/* | ||
include README.md | ||
include pephubclient/pephub_oauth/* | ||
include pephubclient/modules/* | ||
include pephubclient/modules/* | ||
include pephubclient/schemas/* |
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,7 @@ | ||
version: '3' | ||
|
||
tasks: | ||
hello: | ||
cmds: | ||
- black . | ||
silent: false |
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
Empty file.
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,17 @@ | ||
from pephubclient.constants import PEPHUB_BASE_URL | ||
|
||
PEPHUB_SCHEMA_BASE_URL = f"{PEPHUB_BASE_URL}api/v1/schemas/" | ||
|
||
PEPHUB_SCHEMA_NEW_SCHEMA_URL = f"{PEPHUB_SCHEMA_BASE_URL}{{namespace}}/json" | ||
PEPHUB_SCHEMA_NEW_VERSION_URL = ( | ||
f"{PEPHUB_SCHEMA_BASE_URL}{{namespace}}/{{schema_name}}/versions/json" | ||
) | ||
PEPHUB_SCHEMA_RECORD_URL = f"{PEPHUB_SCHEMA_BASE_URL}{{namespace}}/{{schema_name}}" | ||
PEPHUB_SCHEMA_VERSIONS_URL = ( | ||
f"{PEPHUB_SCHEMA_BASE_URL}{{namespace}}/{{schema_name}}/versions" | ||
) | ||
PEPHUB_SCHEMA_VERSION_URL = ( | ||
f"{PEPHUB_SCHEMA_BASE_URL}{{namespace}}/{{schema_name}}/versions/{{version}}" | ||
) | ||
|
||
LATEST_VERSION = "latest" |
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,77 @@ | ||
from pydantic import BaseModel, ConfigDict | ||
from typing import Optional, Dict, Union, List | ||
import datetime | ||
|
||
|
||
class PaginationResult(BaseModel): | ||
page: int = 0 | ||
page_size: int = 10 | ||
total: int | ||
|
||
|
||
class SchemaVersionAnnotation(BaseModel): | ||
""" | ||
Schema version annotation model | ||
""" | ||
|
||
namespace: str | ||
schema_name: str | ||
version: str | ||
contributors: Optional[str] = "" | ||
release_notes: Optional[str] = "" | ||
tags: Dict[str, Union[str, None]] = {} | ||
release_date: datetime.datetime | ||
last_update_date: datetime.datetime | ||
|
||
|
||
class SchemaVersionResult(BaseModel): | ||
pagination: PaginationResult | ||
results: List[SchemaVersionAnnotation] | ||
|
||
|
||
class NewSchemaVersionModel(BaseModel): | ||
""" | ||
Model for creating a new schema version from json | ||
""" | ||
|
||
contributors: Union[str, None] = None | ||
release_notes: Union[str, None] = None | ||
tags: Optional[Union[List[str], str, Dict[str, str], List[Dict[str, str]]]] = ( | ||
None, | ||
) | ||
version: str | ||
schema_value: dict | ||
|
||
model_config = ConfigDict(extra="forbid") | ||
|
||
|
||
class NewSchemaRecordModel(NewSchemaVersionModel): | ||
""" | ||
Model for creating a new schema record from json | ||
""" | ||
|
||
schema_name: str | ||
description: Union[str, None] = None | ||
maintainers: Union[str, None] = None | ||
lifecycle_stage: Union[str, None] = None | ||
private: bool = False | ||
|
||
model_config = ConfigDict(extra="forbid") | ||
|
||
|
||
class UpdateSchemaRecordFields(BaseModel): | ||
maintainers: Optional[Union[str, None]] = None | ||
lifecycle_stage: Optional[Union[str, None]] = None | ||
private: Optional[bool] = None | ||
name: Optional[Union[str, None]] = None | ||
description: Optional[Union[str, None]] = None | ||
|
||
model_config = ConfigDict(extra="forbid") | ||
|
||
|
||
class UpdateSchemaVersionFields(BaseModel): | ||
contributors: Optional[Union[str, None]] = None | ||
schema_value: Optional[Union[str, None]] = None | ||
release_notes: Optional[Union[str, None]] = None | ||
|
||
model_config = ConfigDict(extra="forbid") |
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.
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.
Update correct date