Skip to content

Commit 1d262fa

Browse files
authored
[Physical_units] added dimensionless and boolean to the options (#28)
* [Physical_units] added dimensionless and boolean to the options
1 parent 681656f commit 1d262fa

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

nortech/derivers/values/physical_units.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,3 +644,25 @@
644644
)
645645

646646
# This list can be further extended with more quantities and units as needed.
647+
# Boolean values can occur, just as dimensionless values:
648+
649+
dimensionless = PhysicalQuantity(
650+
name="Dimensionless",
651+
description="A dimensionless quantity is a quantity that has no units.",
652+
SIUnit=str(unit_registry.dimensionless),
653+
SIUnitSymbol=f"{unit_registry.dimensionless:~}",
654+
)
655+
656+
boolean = PhysicalUnit(
657+
name="Boolean",
658+
description="Boolean is a physical quantity that represents a binary value of true or false.",
659+
symbol=f"{unit_registry.dimensionless:~}",
660+
physicalQuantity=dimensionless,
661+
)
662+
663+
dimensionless_unit = PhysicalUnit(
664+
name=str(unit_registry.dimensionless),
665+
description="The dimensionless unit is a unit of measurement that has no units.",
666+
symbol=f"{unit_registry.dimensionless:~}",
667+
physicalQuantity=dimensionless,
668+
)

nortech/gateways/nortech_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class NortechAPISettings(BaseSettings):
1616

1717
URL: str = Field(default="https://api.apps.nor.tech")
1818
KEY: str = Field(default=...)
19-
USER_AGENT: str = Field(default="nortech-python/0.9.3")
19+
USER_AGENT: str = Field(default="nortech-python/0.9.4")
2020
IGNORE_PAGINATION: bool = True
2121
EXPERIMENTAL_FEATURES: bool = False
2222
TIMEOUT: float | Timeout = Field(default=Timeout(connect=10, read=60))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "nortech"
3-
version = "0.9.3"
3+
version = "0.9.4"
44
description = "The official Python library for Nortech AI"
55
authors = [
66
{ name = "Nortech AI", email = "info@nortech.ai" }

0 commit comments

Comments
 (0)