WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit fc6201c

Browse files
committed
Release 0.4.0
1 parent c4bab7f commit fc6201c

File tree

17 files changed

+2902
-477
lines changed

17 files changed

+2902
-477
lines changed

.gitignore

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

135135
# Sphinx build
136-
python/docs/_build
136+
python/docs/_build
137+
138+
# Local dev
139+
python/work

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,38 @@ The UUID RFC pre-defines four namespaces:
2424

2525
## ISO OID
2626

27-
An OID is a globally unique [ISO](http://www.iso.org/iso/en/ISOOnline.frontpage) identifier.
28-
There are multiple ways that this identifier may be represented, and Firebird Foundation has
29-
chosen to represent OID registered here using a form that consists only of numbers and dots
30-
(e.g., "1.3.6.1.4.1.53446.1"). OIDs are paths in a tree structure, with the left-most number
27+
An OID is a globally unique [ISO](http://www.iso.org/iso/en/ISOOnline.frontpage) identifier.
28+
There are multiple ways that this identifier may be represented, and Firebird Foundation has
29+
chosen to represent OID registered here using a form that consists only of numbers and dots
30+
(e.g., "1.3.6.1.4.1.53446.1"). OIDs are paths in a tree structure, with the left-most number
3131
representing the root and the right-most number representing a leaf.
3232

33-
Each OID is created by a Registration Authority. Each of these authorities may, in turn,
34-
delegate assignment of new OIDs under it to other registration authorities that work under its
35-
auspices, and so on down the line. Eventually, one of these authorities assigns a unique (to it)
36-
number that corresponds to a leaf node on the tree. The leaf may represent a registration authority
37-
(in which case the OID identifies the authority), or an instance of an object. A registration
33+
Each OID is created by a Registration Authority. Each of these authorities may, in turn,
34+
delegate assignment of new OIDs under it to other registration authorities that work under its
35+
auspices, and so on down the line. Eventually, one of these authorities assigns a unique (to it)
36+
number that corresponds to a leaf node on the tree. The leaf may represent a registration authority
37+
(in which case the OID identifies the authority), or an instance of an object. A registration
3838
authority owns the namespace consisting of its sub-tree.
3939

40-
The [Firebird Foundation Incorporated](https://firebirdsql.org/en/firebird-foundation) obtained
41-
a [PEN](https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers) (Private Enterprise
42-
Number) from [IANA](https://www.iana.org), and thus become a registered owner of OID _1.3.6.1.4.1.53446_
43-
(iso.org.dod.internet.private.enterprise.firebird-foundation-inc). This repository is used to manage
44-
sub-tree of OIDs under this namespace, that are used by Firebird Foundation and
40+
The [Firebird Foundation Incorporated](https://firebirdsql.org/en/firebird-foundation) obtained
41+
a [PEN](https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers) (Private Enterprise
42+
Number) from [IANA](https://www.iana.org), and thus become a registered owner of OID _1.3.6.1.4.1.53446_
43+
(iso.org.dod.internet.private.enterprise.firebird-foundation-inc). This repository is used to manage
44+
sub-tree of OIDs under this namespace, that are used by Firebird Foundation and
4545
the [Firebird Project](https://www.firebirdsql.org).
4646

4747
# How it works
4848

49-
The OID hierarchy is controlled by a set of YAML files, each file describing one level
50-
in the tree hierarchy (that is, the root node of the child tree and all assigned nodes
51-
for children). The [root.oid](https://github.com/FirebirdSQL/firebird-uuid/blob/master/root.oid) file
49+
The OID hierarchy is controlled by a set of YAML files, each file describing one level
50+
in the tree hierarchy (that is, the root node of the child tree and all assigned nodes
51+
for children). The [root.oid](https://github.com/FirebirdSQL/firebird-uuid/blob/master/root.oid) file
5252
in this repository describes the OID of highest level (assigned by IANA).
5353

5454
Each file has the following format:
5555

5656
```yaml
5757
# Description of root node for this sub-tree
58-
node:
58+
node:
5959
oid: # Full OID, for example 1.3.6.1.4.1.53446
6060
name: # Node name
6161
description: # Node description
@@ -67,7 +67,7 @@ node:
6767

6868
# List of children nodes in order of numbers assigned to them
6969
# could be omitted for leaf node (see node.type)
70-
children:
70+
children:
7171
- number: # Number assigned to this child node, oid = node.oid + '.' + number
7272
name: # Node name
7373
description: # Node description, could be empty
@@ -79,10 +79,10 @@ children:
7979
8080
**All fields must be present, and if not specified otherwise, they must have a value.**
8181
82-
Fields `name`,`description`,`contact`,`email` and `site` in `children` record SHOULD have
83-
the same values like fields of the same name in `node` record of the YAML file describing
84-
the child node. If they differ in content, the values present in `node` record take precedence
85-
over values present in `children` record.
82+
Fields `name`,`description`,`contact`,`email` and `site` in `children` record SHOULD have
83+
the same values like fields of the same name in `node` record of the YAML file describing
84+
the child node. If they differ in content, the values present in `children` record (parent)
85+
take precedence over values present in `node` record (child).
8686

8787
# Using OIDs to generate UUIDs
8888

python/CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,23 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7-
## [0.3.0] - 2023-10-03
7+
## [0.4.0] - 2025-04-29
88

99
### Added
1010

11+
- New `pytest` tests, 97% code coverage.
12+
13+
### Changed
14+
15+
- Minimal Python version raised to 3.11.
16+
- Code cleanup and optimization for Python 3.11 features.
17+
- Improved documentation.
18+
- Changed dependency from `toml` to `tomli-w`.
19+
- Breaking changes: `Node` renamed to `OIDNode`, `NodeTYpe` renamed to `OIDNodeType`
20+
21+
## [0.3.0] - 2023-10-03
22+
23+
1124
- Stub pytest test
1225

1326
### Changed

python/docs/changelog.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,34 @@
22
Changelog
33
#########
44

5+
Version 0.4.0
6+
=============
7+
Released: 2025-04-29
8+
9+
* New `pytest` tests, 97% code coverage.
10+
* Minimal Python version raised to 3.11.
11+
* Code cleanup and optimization for Python 3.11 features.
12+
* Improved documentation.
13+
* Changed dependency from `toml` to `tomli-w`.
14+
* Breaking changes: `Node` renamed to `.OIDNode`, `NodeTYpe` renamed to `.OIDNodeType`
15+
516
Version 0.3.0
617
=============
18+
Released: 2023-10-03
719

820
* Switch from setuptools to `hatch <https://hatch.pypa.io/latest/>`_.
921
* Update dependency to firebird-base >=1.7.0
1022
* Package version is now defined in firebird.uuid.__about__.py (__version__)
1123

1224
Version 0.2.0
1325
=============
26+
Released: 2023-03-02
1427

1528
Breaking change: `registry` renamed to `.oid_registry`.
1629

1730
Version 0.1.0
1831
=============
32+
Released: 2022-11-28
1933

2034
Initial release.
2135

python/docs/reference.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ Firebird-uuid Reference
1212
.. autofunction:: get_specifications
1313
.. autofunction:: parse_specifications
1414

15-
.. autoclass:: NodeType
16-
.. autoclass:: Node
15+
.. autoclass:: OIDNodeType
16+
.. autoclass:: OIDNode
1717
.. autoclass:: OIDRegistry

python/pyproject.toml

Lines changed: 42 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ name = "firebird-uuid"
77
dynamic = ["version"]
88
description = 'Official tools for working with OID namespace managed by the Firebird Project.'
99
readme = "README.md"
10-
requires-python = ">=3.8, <4"
10+
requires-python = ">=3.11, <4"
1111
license = { file = "LICENSE" }
1212
keywords = ["Firebird", "UUID"]
1313
authors = [
1414
{ name = "Pavel Cisar", email = "[email protected]" },
1515
]
1616
classifiers = [
1717
"Development Status :: 4 - Beta",
18-
"Programming Language :: Python",
19-
"Programming Language :: Python :: 3.8",
20-
"Programming Language :: Python :: 3.9",
21-
"Programming Language :: Python :: 3.10",
18+
"Programming Language :: Python :: 3 :: Only",
2219
"Programming Language :: Python :: 3.11",
20+
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
2322
"Programming Language :: Python :: Implementation :: CPython",
2423
"Programming Language :: Python :: Implementation :: PyPy",
2524
"License :: OSI Approved :: MIT License",
@@ -31,10 +30,10 @@ classifiers = [
3130
"Topic :: Software Development :: Libraries",
3231
]
3332
dependencies = [
34-
"toml>=0.10.2",
35-
"PyYAML>=6.0.1, <7",
36-
"requests>=2.31.0",
37-
"firebird-base>=1.7.0",
33+
"tomli-w>=1.2",
34+
"PyYAML~=6.0",
35+
"requests~=2.31",
36+
"firebird-base~=2.0",
3837
]
3938

4039
[project.urls]
@@ -53,6 +52,9 @@ include = ["src"]
5352
[tool.hatch.build.targets.wheel]
5453
packages = ["src/firebird"]
5554

55+
[tool.hatch.metadata]
56+
allow-direct-references = true
57+
5658
[tool.hatch.envs.default]
5759
dependencies = [
5860
]
@@ -75,77 +77,32 @@ cov = [
7577
]
7678
version = "python --version"
7779

78-
[[tool.hatch.envs.test.matrix]]
79-
python = ["3.8", "3.9", "3.10", "3.11"]
80+
[[tool.hatch.envs.hatch-test.matrix]]
81+
python = ["3.11", "3.12", "3.13"]
8082

8183
[tool.hatch.envs.doc]
8284
detached = false
8385
platforms = ["linux"]
8486
dependencies = [
85-
"Sphinx>=7.1",
87+
"Sphinx==7.2.6",
8688
"sphinx-bootstrap-theme>=0.8.1",
8789
"sphinx-autodoc-typehints>=1.24.0",
90+
"doc2dash>=3.0.0"
8891
]
8992
[tool.hatch.envs.doc.scripts]
9093
build = "cd docs ; make html"
91-
92-
[tool.hatch.envs.lint]
93-
detached = true
94-
dependencies = [
95-
"black>=23.1.0",
96-
"mypy>=1.0.0",
97-
"ruff>=0.0.243",
98-
]
99-
[tool.hatch.envs.lint.scripts]
100-
typing = "mypy --install-types --non-interactive {args:src/firebird/uuid tests}"
101-
style = [
102-
"ruff {args:.}",
103-
"black --check --diff {args:.}",
104-
]
105-
fmt = [
106-
"black {args:.}",
107-
"ruff --fix {args:.}",
108-
"style",
94+
docset = [
95+
"cd docs ; doc2dash -u https://firebird-uuid.readthedocs.io/en/latest/ -f -i ./_static/fb-favicon.png -n firebird-uuid ./_build/html/",
96+
"cd docs; VERSION=`hatch version` ; tar --exclude='.DS_Store' -cvzf ../dist/firebird-uuid-$VERSION-docset.tgz firebird-uuid.docset",
10997
]
110-
all = [
111-
"style",
112-
"typing",
113-
]
114-
115-
[tool.black]
116-
target-version = ["py38"]
117-
line-length = 120
118-
skip-string-normalization = true
11998

12099
[tool.ruff]
121-
target-version = "py38"
100+
target-version = "py311"
122101
line-length = 120
123-
select = [
124-
"A",
125-
"ARG",
126-
"B",
127-
"C",
128-
"DTZ",
129-
"E",
130-
"EM",
131-
"F",
132-
"FBT",
133-
"I",
134-
"ICN",
135-
"ISC",
136-
"N",
137-
"PLC",
138-
"PLE",
139-
"PLR",
140-
"PLW",
141-
"Q",
142-
"RUF",
143-
"S",
144-
"T",
145-
"TID",
146-
"UP",
147-
"W",
148-
"YTT",
102+
103+
[tool.ruff.lint]
104+
select = ["A", "ARG", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N",
105+
"PLC", "PLE", "PLR", "PLW", "Q", "RUF", "S", "T", "TID", "UP", "W", "YTT",
149106
]
150107
ignore = [
151108
# Allow non-abstract empty methods in abstract base classes
@@ -156,21 +113,34 @@ ignore = [
156113
"S105", "S106", "S107",
157114
# Ignore complexity
158115
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
116+
#
117+
"E741",
118+
# Allow relative imports
119+
"TID252",
120+
# Allow literals in exceptions
121+
"EM101", "EM102",
122+
# Single quotes instead double
123+
"Q000"
159124
]
160125
unfixable = [
161126
# Don't touch unused imports
162127
"F401",
128+
# Don't change single quotes to double
129+
"Q000"
163130
]
131+
exclude = ["*_pb2.py", "*.pyi", "tests/*", "docs/*", "work/*"]
164132

165-
[tool.ruff.isort]
166-
known-first-party = ["firebird.uuid"]
133+
[tool.ruff.lint.isort]
134+
known-first-party = ["firebird.uuid", "firebird.base"]
167135

168-
[tool.ruff.flake8-tidy-imports]
136+
[tool.ruff.lint.flake8-tidy-imports]
169137
ban-relative-imports = "all"
170138

171-
[tool.ruff.per-file-ignores]
139+
[tool.ruff.lint.per-file-ignores]
172140
# Tests can use magic values, assertions, and relative imports
173141
"tests/**/*" = ["PLR2004", "S101", "TID252"]
142+
"__init__.py" = ["F401"]
143+
"_spec.py" = ["E501"]
174144

175145
[tool.coverage.run]
176146
source_pkgs = ["firebird.uuid", "tests"]
@@ -181,8 +151,8 @@ omit = [
181151
]
182152

183153
[tool.coverage.paths]
184-
firebird_uuid = ["src/python", "*/python/src/firebird/uuid"]
185-
tests = ["tests", "*/python/tests"]
154+
firebird_base = ["src/firebird/uuid"]
155+
tests = ["tests"]
186156

187157
[tool.coverage.report]
188158
exclude_lines = [
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: 2022-present The Firebird Projects <www.firebirdsql.org>
22
#
33
# SPDX-License-Identifier: MIT
4-
__version__ = "0.3.0"
4+
__version__ = "0.4.0"

python/src/firebird/uuid/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
3838
"""
3939

40-
from ._model import NodeType, Node, IANA_ROOT_NAME
41-
from ._spec import get_specification, get_specifications, parse_specifications, ROOT_SPEC
42-
from ._registry import oid_registry, OIDRegistry
40+
from ._model import IANA_ROOT_NAME, OIDNode, OIDNodeType
41+
from ._registry import OIDRegistry, oid_registry
42+
from ._spec import ROOT_SPEC, get_specification, get_specifications, parse_specifications

0 commit comments

Comments
 (0)