From 61934d2991abff7a4ccb51d2c72b1b04f5058df6 Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Tue, 6 Dec 2022 09:25:11 -0500 Subject: [PATCH] Hide the "exec" ServiceCommandStyle from documentation since it is only used internally --- README.rst | 2 +- gravity/settings.py | 2 +- gravity/util/__init__.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 5a82b48..e2096fb 100644 --- a/README.rst +++ b/README.rst @@ -437,7 +437,7 @@ The following options in the ``gravity`` section of ``galaxy.yml`` can be used t # What command to write to the process manager configs # `gravity` (`galaxyctl exec `) is the default # `direct` (each service's actual command) is also supported. - # Valid options are: gravity, direct, exec + # Valid options are: gravity, direct # service_command_style: gravity # Use the process manager's *service instance* functionality for services that can run multiple instances. diff --git a/gravity/settings.py b/gravity/settings.py index 38ea43b..475724f 100644 --- a/gravity/settings.py +++ b/gravity/settings.py @@ -40,7 +40,7 @@ class ProcessManager(str, Enum): class ServiceCommandStyle(str, Enum): gravity = "gravity" direct = "direct" - exec = "exec" + exec = "_exec" class AppServer(str, Enum): diff --git a/gravity/util/__init__.py b/gravity/util/__init__.py index e50e4ce..07c146b 100644 --- a/gravity/util/__init__.py +++ b/gravity/util/__init__.py @@ -69,7 +69,8 @@ def process_property(key, value, depth=0): has_child = False for item in allOff: if "enum" in item: - description = f'{description}\n{extra_white_space}# Valid options are: {", ".join(item["enum"])}' + enum_items = [i for i in item["enum"] if not i.startswith("_")] + description = f'{description}\n{extra_white_space}# Valid options are: {", ".join(enum_items)}' if "properties" in item: has_child = True for _key, _value in item["properties"].items():