Skip to content

Commit

Permalink
Merge pull request #94 from natefoo/hide-enum-options
Browse files Browse the repository at this point in the history
Hide the "exec" ServiceCommandStyle from documentation since it is only used internally
  • Loading branch information
hexylena authored Dec 6, 2022
2 parents 31fa5ed + 61934d2 commit 51c34e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <service-name>`) 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.
Expand Down
2 changes: 1 addition & 1 deletion gravity/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ProcessManager(str, Enum):
class ServiceCommandStyle(str, Enum):
gravity = "gravity"
direct = "direct"
exec = "exec"
exec = "_exec"


class AppServer(str, Enum):
Expand Down
3 changes: 2 additions & 1 deletion gravity/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 51c34e9

Please sign in to comment.