Skip to content

Commit

Permalink
Merge pull request #32 from vkottler/dev/0.13.1
Browse files Browse the repository at this point in the history
0.13.1 - Improve schema management
  • Loading branch information
vkottler authored Feb 10, 2023
2 parents 83b4914 + b2957ea commit 4c04d9a
Show file tree
Hide file tree
Showing 13 changed files with 1,004 additions and 990 deletions.
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.0
hash=a8255694100a058fa4413abe0341a123
hash=b4ec855ceb9c1a2007cec184e29e5458
=====================================
-->

# runtimepy ([0.13.0](https://pypi.org/project/runtimepy/))
# runtimepy ([0.13.1](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
1,856 changes: 932 additions & 924 deletions im/pydeps.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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>=1.1.7
- vcorelib>=1.2.0
- 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: 0
minor: 13
patch: 0
patch: 1
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 = "0.13.0"
version = "0.13.1"
description = "A framework for implementing Python services."
readme = "README.md"
requires-python = ">=3.7"
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.0
# hash=1a71c8001105fcdb5a240f10db7ba967
# hash=0c272e6a3c9844e3ceb54644218fe96e
# =====================================

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

DESCRIPTION = "A framework for implementing Python services."
PKG_NAME = "runtimepy"
VERSION = "0.13.0"
VERSION = "0.13.1"
34 changes: 34 additions & 0 deletions runtimepy/data/schemas/Channel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
type: object
required: [id, type]
additionalProperties: false

properties:
id:
type: integer
minimum: 1

type:
enum:
- bool
- float
- double
- int8
- int16
- int32
- int64
- uint8
- uint16
- uint32
- uint64

commandable:
type: boolean
default: false

enum:
oneOf:
- type: integer
minimum: 1
- type: string
pattern: "^\\w+$"
34 changes: 1 addition & 33 deletions runtimepy/data/schemas/ChannelRegistry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,4 @@ additionalProperties: false

patternProperties:
"^[a-z0-9-_.]+$":
type: object
required: [id, type]
additionalProperties: false

properties:
id:
type: integer
minimum: 1

type:
enum:
- bool
- float
- double
- int8
- int16
- int32
- int64
- uint8
- uint16
- uint32
- uint64

commandable:
type: boolean
default: false

enum:
oneOf:
- type: integer
minimum: 1
- type: string
pattern: "^\\w+$"
$ref: package://runtimepy/schemas/Channel.yaml
23 changes: 1 addition & 22 deletions runtimepy/data/schemas/EnumRegistry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,4 @@ additionalProperties: false

patternProperties:
"^\\w+$":
type: object
required: [id, type]
additionalProperties: false

properties:
id:
type: integer
minimum: 1

type:
enum: [bool, int]

items:
type: object
additionalProperties: false

patternProperties:
"^\\w+$":
oneOf:
- type: integer
minimum: 1
- type: boolean
$ref: package://runtimepy/schemas/RuntimeEnum.yaml
23 changes: 23 additions & 0 deletions runtimepy/data/schemas/RuntimeEnum.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
type: object
required: [id, type]
additionalProperties: false

properties:
id:
type: integer
minimum: 1

type:
enum: [bool, int]

items:
type: object
additionalProperties: false

patternProperties:
"^\\w+$":
oneOf:
- type: integer
minimum: 1
- type: boolean
6 changes: 4 additions & 2 deletions runtimepy/registry/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
from typing import cast as _cast

# third-party
from vcorelib.dict.codec import DictCodec as _DictCodec
from vcorelib.io.types import JsonObject as _JsonObject

# internal
from runtimepy.schemas import RuntimepyDictCodec as _RuntimepyDictCodec

class RegistryItem(_DictCodec):

class RegistryItem(_RuntimepyDictCodec):
"""A class interface for items that can be managed via a registry."""

def __hash__(self) -> int:
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>=1.1.7
vcorelib>=1.2.0
websockets
windows-curses; sys_platform == 'win32'
2 changes: 1 addition & 1 deletion runtimepy/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

# third-party
from vcorelib.dict.codec import DictCodec as _DictCodec
from vcorelib.schemas import JsonSchemaMap as _JsonSchemaMap
from vcorelib.schemas.base import SchemaMap as _SchemaMap
from vcorelib.schemas.json import JsonSchemaMap as _JsonSchemaMap

# internal
from runtimepy import PKG_NAME
Expand Down

0 comments on commit 4c04d9a

Please sign in to comment.