Skip to content

Commit

Permalink
2.12.3 - Add method for arbiter CLI flags
Browse files Browse the repository at this point in the history
  • Loading branch information
vkottler committed Sep 23, 2023
1 parent 3fcbbbd commit eeb706a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- run: |
mk python-release owner=vkottler \
repo=runtimepy version=2.12.2
repo=runtimepy version=2.12.3
if: |
matrix.python-version == '3.11'
&& matrix.system == 'ubuntu-latest'
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
=====================================
generator=datazen
version=3.1.3
hash=39722d56e689af4735e5eb11509d60c9
hash=f8a5c23e6166199774f2dc5e19dc76d0
=====================================
-->

# runtimepy ([2.12.2](https://pypi.org/project/runtimepy/))
# runtimepy ([2.12.3](https://pypi.org/project/runtimepy/))

[![python](https://img.shields.io/pypi/pyversions/runtimepy.svg)](https://pypi.org/project/runtimepy/)
![Build Status](https://github.com/vkottler/runtimepy/workflows/Python%20Package/badge.svg)
Expand Down Expand Up @@ -75,14 +75,14 @@ commands:
```
$ ./venv3.11/bin/runtimepy arbiter -h
usage: runtimepy arbiter [-h] [--init_only] [-w] configs [configs ...]
usage: runtimepy arbiter [-h] [-i] [-w] configs [configs ...]
positional arguments:
configs the configuration to load
options:
-h, --help show this help message and exit
--init_only, --init-only
-i, --init_only, --init-only
exit after completing initialization
-w, --wait-for-stop, --wait_for_stop
ensure that a 'wait_for_stop' application method is
Expand Down
2 changes: 1 addition & 1 deletion local/variables/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
major: 2
minor: 12
patch: 2
patch: 3
entry: runtimepy
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__"

[project]
name = "runtimepy"
version = "2.12.2"
version = "2.12.3"
description = "A framework for implementing Python services."
readme = "README.md"
requires-python = ">=3.11"
Expand Down
4 changes: 2 additions & 2 deletions runtimepy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =====================================
# generator=datazen
# version=3.1.3
# hash=20160b96ae192f5554e1d0b3b36bdba6
# hash=b58f93345cd96f4613356453688c5a3d
# =====================================

"""
Expand All @@ -10,7 +10,7 @@

DESCRIPTION = "A framework for implementing Python services."
PKG_NAME = "runtimepy"
VERSION = "2.12.2"
VERSION = "2.12.3"

# runtimepy-specific content.
METRICS_NAME = "metrics"
11 changes: 9 additions & 2 deletions runtimepy/commands/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
from argparse import ArgumentParser as _ArgumentParser


def arbiter_args(parser: _ArgumentParser, nargs: str = "+") -> None:
"""Add common connection-arbiter parameters.."""
def arbiter_flags(parser: _ArgumentParser) -> None:
"""Add arbiter command-line flag arguments."""

parser.add_argument(
"-i",
"--init_only",
"--init-only",
action="store_true",
Expand All @@ -22,6 +23,12 @@ def arbiter_args(parser: _ArgumentParser, nargs: str = "+") -> None:
action="store_true",
help="ensure that a 'wait_for_stop' application method is run last",
)


def arbiter_args(parser: _ArgumentParser, nargs: str = "+") -> None:
"""Add common connection-arbiter parameters.."""

arbiter_flags(parser)
parser.add_argument(
"configs", nargs=nargs, help="the configuration to load"
)

0 comments on commit eeb706a

Please sign in to comment.