Skip to content

Commit 9e554b0

Browse files
committed
update versin of dev feature
1 parent 9a45c3a commit 9e554b0

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

services/api-server/openapi.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
"files"
224224
],
225225
"summary": "List Files",
226-
"description": "Lists all files stored in the system\n\nSEE get_files_page for a paginated version of this function",
226+
"description": "Lists all files stored in the system\n\nSEE `get_files_page` for a paginated version of this function",
227227
"operationId": "list_files",
228228
"responses": {
229229
"200": {
@@ -1875,7 +1875,7 @@
18751875
"solvers"
18761876
],
18771877
"summary": "List Jobs",
1878-
"description": "List of jobs in a specific released solver (limited to 20 jobs)\n\nSEE get_jobs_page for paginated version of this function",
1878+
"description": "List of jobs in a specific released solver (limited to 20 jobs)\n\nSEE `get_jobs_page` for paginated version of this function",
18791879
"operationId": "list_jobs",
18801880
"parameters": [
18811881
{

services/api-server/src/simcore_service_api_server/core/application.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from fastapi import FastAPI
44
from fastapi_pagination import add_pagination
55
from models_library.basic_types import BootModeEnum
6+
from packaging.version import Version
67
from servicelib.fastapi.profiler_middleware import ProfilerMiddleware
78
from servicelib.logging_utils import config_all_loggers
89

@@ -23,13 +24,17 @@
2324
def _label_title_and_version(settings: ApplicationSettings, title: str, version: str):
2425
labels = []
2526
if settings.API_SERVER_DEV_FEATURES_ENABLED:
26-
labels.append("dev")
27+
# builds public version identifier with pre
28+
v = Version(version)
29+
# SEE https://packaging.python.org/en/latest/specifications/version-specifiers/#public-version-identifiers
30+
# `[N!]N(.N)*[{a|b|rc}N][.postN][.devN]`
31+
version = f"{v.base_version}.post0.dev"
2732

2833
if settings.debug:
2934
labels.append("debug")
3035

31-
if local_version_label := ".".join(labels):
32-
# Appends local version identifier <public version identifier>[+<local version label>]
36+
if local_version_label := "-".join(labels):
37+
# Appends local version identifier `<public version identifier>[+<local version label>]`
3338
# SEE https://packaging.python.org/en/latest/specifications/version-specifiers/#local-version-identifiers
3439
title += f" ({local_version_label})"
3540
version += f"+{local_version_label}"

0 commit comments

Comments
 (0)