Skip to content

Commit

Permalink
Merge pull request #124 from vkottler/dev/2.9.3
Browse files Browse the repository at this point in the history
2.9.3 - Minor updates
  • Loading branch information
vkottler authored Sep 17, 2023
2 parents bc6a417 + 73cf9e3 commit 2cbdd40
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 17 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.9.2
repo=runtimepy version=2.9.3
if: |
matrix.python-version == '3.11'
&& matrix.system == 'ubuntu-latest'
Expand Down
4 changes: 2 additions & 2 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=4325dde753d947e6ec119de3bcacf6c9
hash=abb00f867d9b3516b7c56ff33364533a
=====================================
-->

# runtimepy ([2.9.2](https://pypi.org/project/runtimepy/))
# runtimepy ([2.9.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
2 changes: 1 addition & 1 deletion local/configs/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: A framework for implementing Python services.
entry: {{entry}}

requirements:
- vcorelib>=2.8.0
- vcorelib>=2.8.3
- websockets
- "windows-curses; sys_platform == 'win32'"

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: 9
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.9.2"
version = "2.9.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=654842c7a2fb5a8197ba11ccd211f613
# hash=27433cbcb8e402c25de89a4a045bba31
# =====================================

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

DESCRIPTION = "A framework for implementing Python services."
PKG_NAME = "runtimepy"
VERSION = "2.9.2"
VERSION = "2.9.3"

# runtimepy-specific content.
METRICS_NAME = "metrics"
1 change: 1 addition & 0 deletions runtimepy/commands/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def arbiter_args(parser: _ArgumentParser, nargs: str = "+") -> None:

parser.add_argument(
"--init_only",
"--init-only",
action="store_true",
help="exit after completing initialization",
)
Expand Down
4 changes: 2 additions & 2 deletions runtimepy/metrics/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing import Iterator, NamedTuple

# third-party
from vcorelib.math import MovingAverage, RateTracker
from vcorelib.math import MovingAverage, RateTracker, to_nanos

# internal
from runtimepy.primitives import Double as _Double
Expand Down Expand Up @@ -47,7 +47,7 @@ def measure(
"""Measure the time spent yielding and update data."""

start = eloop.time()
self.rate_hz.value = rate(int(start * 1e9))
self.rate_hz.value = rate(to_nanos(start))

yield

Expand Down
6 changes: 1 addition & 5 deletions runtimepy/net/arbiter/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,7 @@ async def load_configs(self, paths: _Iterable[_Pathlike]) -> None:
# Load and meld configuration data.
config_data: _JsonObject = {}
for path in paths:
found = find_file(
path,
logger=self.logger, # type: ignore
include_cwd=True,
)
found = find_file(path, logger=self.logger, include_cwd=True)
assert found is not None, f"Couldn't find '{path}'!"

# Only load files once.
Expand Down
2 changes: 1 addition & 1 deletion runtimepy/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
vcorelib>=2.8.0
vcorelib>=2.8.3
websockets
windows-curses; sys_platform == 'win32'
3 changes: 2 additions & 1 deletion runtimepy/task/asynchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from vcorelib.math import MovingAverage as _MovingAverage
from vcorelib.math import RateTracker as _RateTracker
from vcorelib.math import rate_str as _rate_str
from vcorelib.math import to_nanos

# internal
from runtimepy import METRICS_NAME
Expand Down Expand Up @@ -145,7 +146,7 @@ async def run(
while self.enabled:
# Keep track of the rate that this task is running at.
start = eloop.time()
self.rate_hz.raw.value = self.dispatch_rate(int(start * 1e9))
self.rate_hz.raw.value = self.dispatch_rate(to_nanos(start))

self.enabled.raw.value &= await _asyncio.shield(
self.dispatch(*args, **kwargs)
Expand Down

0 comments on commit 2cbdd40

Please sign in to comment.