Skip to content

Commit 272664c

Browse files
authored
Merge pull request #34 from pyiron/remove_otype
get rid of `otype`
2 parents 8bcaaba + 0e80eae commit 272664c

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

semantikon/converter.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def parse_metadata(value):
4141
value: Quantity object
4242
4343
Returns:
44-
dictionary of the metadata. Available keys are `units`, `otype`,
45-
`shape`, and `dtype`. See `semantikon.typing.u` for more details.
44+
dictionary of the metadata. Available keys are `units`, `label`,
45+
`triple`, `uri` and `shape`. See `semantikon.typing.u` for more details.
4646
"""
4747
# When there is only one metadata `use_list=False` must have been used
4848
if len(value.__metadata__) == 1 and isinstance(value.__metadata__[0], str):
@@ -79,8 +79,8 @@ def parse_input_args(func: callable):
7979
func: function to be parsed
8080
8181
Returns:
82-
dictionary of the input arguments. Available keys are `units`, `otype`,
83-
and `shape`. See `semantikon.typing.u` for more details.
82+
dictionary of the input arguments. Available keys are `units`, `label`,
83+
`triple`, `uri` and `shape`. See `semantikon.typing.u` for more details.
8484
"""
8585
return {
8686
key: _meta_to_dict(value.annotation)
@@ -97,8 +97,9 @@ def parse_output_args(func: callable):
9797
9898
Returns:
9999
dictionary of the output arguments if there is only one output. Otherwise,
100-
a list of dictionaries is returned. Available keys are `units`, `otype`,
101-
and `shape`. See `semantikon.typing.u` for more details.
100+
a list of dictionaries is returned. Available keys are `units`,
101+
`label`, `triple`, `uri` and `shape`. See `semantikon.typing.u` for
102+
more details.
102103
"""
103104
sig = inspect.signature(func)
104105
if get_origin(sig.return_annotation) is tuple:

semantikon/typing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def u(
1717
/,
1818
units: str | None = None,
1919
label: str | None = None,
20-
otype: str | tuple | None = None,
2120
triple: tuple[tuple[str, str, str], ...] | tuple[str, str, str] | None = None,
2221
uri: str | None = None,
2322
shape: tuple[int] | None = None,
@@ -27,7 +26,6 @@ def u(
2726
result = {
2827
"units": units,
2928
"label": label,
30-
"otype": otype,
3129
"triple": triple,
3230
"uri": uri,
3331
"shape": shape,

tests/unit/test_dataclass.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def test_parse_metadata(self):
5353
"units": "eV",
5454
"label": "TotalEnergy",
5555
"associate_to_sample": True,
56-
"otype": None,
5756
"triple": None,
5857
"shape": None,
5958
"uri": None,

0 commit comments

Comments
 (0)