Skip to content

Commit

Permalink
2.10.2 - Fix a missing rounding bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vkottler committed Sep 18, 2023
1 parent 84da772 commit 5a93700
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 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.10.1
repo=runtimepy version=2.10.2
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=52b34641812dbed45846bdf959303a9d
hash=6c843a31c1edfdff5d1d97f2dce9f1ab
=====================================
-->

# runtimepy ([2.10.1](https://pypi.org/project/runtimepy/))
# runtimepy ([2.10.2](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/variables/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
major: 2
minor: 10
patch: 1
patch: 2
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.10.1"
version = "2.10.2"
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=347d7aedb488b302404fdabf5b6260f2
# hash=3f7d5094777980a2982efb1a76c05c19
# =====================================

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

DESCRIPTION = "A framework for implementing Python services."
PKG_NAME = "runtimepy"
VERSION = "2.10.1"
VERSION = "2.10.2"

# runtimepy-specific content.
METRICS_NAME = "metrics"
4 changes: 2 additions & 2 deletions runtimepy/primitives/scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def invert(
value -= offset
value /= scale

if should_round:
value = round(value)
if should_round:
value = round(value)

return value

Expand Down
6 changes: 5 additions & 1 deletion tests/primitives/test_float.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ def test_primitive_scaling():
assert isclose(prim.scaled, 5.0)

int_prim = Int32(scaling=[2.0, 3.0])
int_prim.scaled = -1
int_prim.scaled = -1.0
assert isclose(int_prim.scaled, -1)

int_prim = Int32()
int_prim.scaled = -2.0
assert isclose(int_prim.scaled, -2)


def test_primitives_encode_decode():
"""Test simple encoding and decoding interactions."""
Expand Down

0 comments on commit 5a93700

Please sign in to comment.