Skip to content

Commit b951fe6

Browse files
committed
Release v0.2.0
1 parent 58e14f0 commit b951fe6

9 files changed

Lines changed: 22 additions & 20 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ dmypy.json
133133
*.wpu
134134

135135
# Sphinx build
136-
docs/_build
136+
python/docs/_build

python/docs/changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog
33
#########
44

5+
Version 0.2.0
6+
=============
7+
8+
Breaking change: `registry` renamed to `.oid_registry`.
9+
510
Version 0.1.0
611
=============
712

python/docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
author = 'Pavel Císař'
1414

1515
# The short X.Y version
16-
version = '0.1.0'
16+
version = '0.2.0'
1717

1818
# The full version, including alpha/beta/rc tags
19-
release = '0.1.0'
19+
release = '0.2.0'
2020

2121
# -- General configuration ---------------------------------------------------
2222
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

python/docs/reference.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Firebird-uuid Reference
66

77
.. autodata:: ROOT_SPEC
88
.. autodata:: IANA_ROOT_NAME
9-
.. autodata:: registry
9+
.. autodata:: oid_registry
1010

1111
.. autofunction:: get_specification
1212
.. autofunction:: get_specifications

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "firebird-uuid"
7-
version = "0.1.0"
7+
version = "0.2.0"
88
description = "Firebird UUID"
99
readme = "README.rst"
1010
requires-python = ">=3.8, <4"

python/src/firebird/uuid/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@
3737

3838
from ._model import NodeType, Node, IANA_ROOT_NAME
3939
from ._spec import get_specification, get_specifications, parse_specifications, ROOT_SPEC
40-
from ._registry import registry, OIDRegistry
40+
from ._registry import oid_registry, OIDRegistry

python/src/firebird/uuid/_model.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ def set_parent(self, parent: Node) -> None:
125125
if parent is not None:
126126
self.parent_spec = parent.node_spec
127127
def as_toml_dict(self) -> Dict:
128-
129128
"""Returns dictionary with instance data suitable for storage in TOML format
130129
(values that are not of basic type are converted to string).
131130
"""

python/src/firebird/uuid/_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ def update_from_toml(self, toml: str) -> None:
120120
raise Error(f"Node {uid} is not root and has no parent node")
121121
build_tree(self._reg.values())
122122
def as_toml(self) -> str:
123-
"""Return registry contents as TOML document.
123+
"""Returns registry content as TOML document.
124124
"""
125125
nodes = {str(node.uid): node.as_toml_dict() for node in self._reg.values()}
126126
toml = dumps(nodes)
127127
return toml
128128

129129
#: Firebird OID registry
130-
registry = OIDRegistry()
130+
oid_registry = OIDRegistry()

python/tester.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
from pprint import pprint
55
from io import StringIO
66
from toml import loads
7-
from firebird.uuid.spec import get_specifications, parse_specifications
8-
from firebird.uuid.model import Node, build_tree
9-
from firebird.uuid.registry import registry
7+
from firebird.uuid import get_specifications, parse_specifications, Node, oid_registry
108

119
def print_node(node: Node, indent=0, _to=None) -> None:
1210
out = sys.stdout if _to is None else _to
@@ -53,22 +51,22 @@ def main():
5351
#txt_1 = printout.getvalue()
5452
#print_node(root)
5553
##
56-
registry.update_from_specifications(specifications)
54+
oid_registry.update_from_specifications(specifications)
5755
#spec2, err2 = get_specifications('https://raw.githubusercontent.com/FirebirdSQL/saturnin-core/master/oid/micros.oid')
5856
#spec2, err2 = parse_specifications(spec2)
59-
#registry.update_from_specifications(spec2)
57+
#oid_registry.update_from_specifications(spec2)
6058
printout = StringIO()
61-
print_node(registry.get_root(), _to=printout)
59+
print_node(oid_registry.get_root(), _to=printout)
6260
txt_1 = printout.getvalue()
6361
#
64-
toml = registry.as_toml()
62+
toml = oid_registry.as_toml()
6563
print(toml)
6664
#
67-
registry.clear()
68-
registry.update_from_toml(toml)
69-
#print_node(registry.get_root())
65+
oid_registry.clear()
66+
oid_registry.update_from_toml(toml)
67+
#print_node(oid_registry.get_root())
7068
printout = StringIO()
71-
print_node(registry.get_root(), _to=printout)
69+
print_node(oid_registry.get_root(), _to=printout)
7270
txt_2 = printout.getvalue()
7371
#data = loads(toml)
7472
#nodes = []

0 commit comments

Comments
 (0)