From 5e26bfcce4b75b2c9dd9d64c61a028a79362b82f Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Wed, 8 Mar 2023 14:26:44 +0100 Subject: [PATCH 1/2] Use enum value with f-strings on API docs Apparently there is a difference between versions of Python that will print those enums either as `SharingOptions.make_public` or `make_public`. This should print a consistent value. --- lib/galaxy/schema/schema.py | 6 +++--- lib/galaxy/webapps/galaxy/api/folders.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/schema/schema.py b/lib/galaxy/schema/schema.py index e462c3a7bc2c..f70f7680bb3a 100644 --- a/lib/galaxy/schema/schema.py +++ b/lib/galaxy/schema/schema.py @@ -3011,9 +3011,9 @@ class ShareWithPayload(Model): description=( "User choice for sharing resources which its contents may be restricted:\n" " - None: The user did not choose anything yet or no option is needed.\n" - f" - {SharingOptions.make_public}: The contents of the resource will be made publicly accessible.\n" - f" - {SharingOptions.make_accessible_to_shared}: This will automatically create a new `sharing role` allowing protected contents to be accessed only by the desired users.\n" - f" - {SharingOptions.no_changes}: This won't change the current permissions for the contents. The user which this resource will be shared may not be able to access all its contents.\n" + f" - {SharingOptions.make_public.value}: The contents of the resource will be made publicly accessible.\n" + f" - {SharingOptions.make_accessible_to_shared.value}: This will automatically create a new `sharing role` allowing protected contents to be accessed only by the desired users.\n" + f" - {SharingOptions.no_changes.value}: This won't change the current permissions for the contents. The user which this resource will be shared may not be able to access all its contents.\n" ), ) diff --git a/lib/galaxy/webapps/galaxy/api/folders.py b/lib/galaxy/webapps/galaxy/api/folders.py index 7f8cd9f5d78a..b45173f08f84 100644 --- a/lib/galaxy/webapps/galaxy/api/folders.py +++ b/lib/galaxy/webapps/galaxy/api/folders.py @@ -148,7 +148,7 @@ def set_permissions( title="Action", description=( "Indicates what action should be performed on the Library. " - f"Currently only `{LibraryFolderPermissionAction.set_permissions}` is supported." + f"Currently only `{LibraryFolderPermissionAction.set_permissions.value}` is supported." ), ), payload: LibraryFolderPermissionsPayload = Body(...), From 619e7dd635047e8b66576a89d2bb39014846145d Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Wed, 8 Mar 2023 14:28:52 +0100 Subject: [PATCH 2/2] Include Python 3.11 in OpenAPI linting GH WF --- .github/workflows/lint_openapi_schema.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_openapi_schema.yml b/.github/workflows/lint_openapi_schema.yml index 7e61918ee133..c41e1489d933 100644 --- a/.github/workflows/lint_openapi_schema.yml +++ b/.github/workflows/lint_openapi_schema.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.7', '3.11'] steps: - uses: actions/checkout@v3 with: