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

✨ Is686/list_service_ports in catalog service API #3484

Merged
merged 29 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
16 changes: 6 additions & 10 deletions packages/models-library/src/models_library/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

from .basic_regex import VERSION_RE
from .boot_options import BootOption, BootOptions
from .services_constants import FILENAME_RE, PROPERTY_TYPE_RE
from .services_ui import Widget
from .utils.json_schema import (
InvalidJsonSchema,
Expand All @@ -32,7 +33,7 @@
)

# CONSTANTS -------------------------------------------

# NOTE: move to _constants.py: SEE https://github.com/ITISFoundation/osparc-simcore/issues/3486
pcrespov marked this conversation as resolved.
Show resolved Hide resolved
# NOTE: needs to end with / !!
SERVICE_KEY_RE = r"^(simcore)/(services)/(comp|dynamic|frontend)(/[\w/-]+)+$"

Expand All @@ -44,18 +45,13 @@

KEY_RE = SERVICE_KEY_RE # TODO: deprecate this global constant by SERVICE_KEY_RE


PROPERTY_TYPE_RE = r"^(number|integer|boolean|string|ref_contentSchema|data:([^/\s,]+/[^/\s,]+|\[[^/\s,]+/[^/\s,]+(,[^/\s]+/[^/,\s]+)*\]))$"
PROPERTY_KEY_RE = r"^[-_a-zA-Z0-9]+$" # TODO: PC->* it would be advisable to have this "variable friendly" (see VARIABLE_NAME_RE)


FILENAME_RE = r".+"

LATEST_INTEGRATION_VERSION = "1.0.0"

# CONSTRAINT TYPES -------------------------------------------

PropertyName = constr(regex=PROPERTY_KEY_RE)
ServicePortKey = constr(regex=PROPERTY_KEY_RE)
FileName = constr(regex=FILENAME_RE)

ServiceKey = constr(regex=KEY_RE)
Expand Down Expand Up @@ -180,7 +176,7 @@ class BaseServiceIOModel(BaseModel):
)

# value
file_to_key_map: Optional[dict[FileName, PropertyName]] = Field(
file_to_key_map: Optional[dict[FileName, ServicePortKey]] = Field(
None,
alias="fileToKeyMap",
description="Place the data associated with the named keys in files",
Expand Down Expand Up @@ -413,8 +409,8 @@ def validate_thumbnail(cls, value): # pylint: disable=no-self-argument,no-self-
return value


ServiceInputsDict = dict[PropertyName, ServiceInput]
ServiceOutputsDict = dict[PropertyName, ServiceOutput]
ServiceInputsDict = dict[ServicePortKey, ServiceInput]
ServiceOutputsDict = dict[ServicePortKey, ServiceOutput]


class ServiceDockerData(ServiceKeyVersion, _BaseServiceCommonDataModel):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# NOTE: https://github.com/ITISFoundation/osparc-simcore/issues/3486
#

PROPERTY_TYPE_RE = r"^(number|integer|boolean|string|ref_contentSchema|data:([^/\s,]+/[^/\s,]+|\[[^/\s,]+/[^/\s,]+(,[^/\s]+/[^/,\s]+)*\]))$"
PROPERTY_TYPE_TO_PYTHON_TYPE_MAP = {
"integer": int,
"number": float,
"boolean": bool,
"string": str,
}

FILENAME_RE = r".+"
2 changes: 2 additions & 0 deletions packages/service-integration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ RUN cd packages/service-integration \

# -------------------------- Build stage -------------------

FROM base as development
# NOTE: this is necessary to allow to build development images but is the same as production here
FROM base as production

COPY --from=build --chown=scu:scu ${VIRTUAL_ENV} ${VIRTUAL_ENV}
Expand Down
2 changes: 1 addition & 1 deletion services/catalog/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.2
0.4.0
Loading