forked from rwth-iat/aas_manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFragen
64 lines (57 loc) · 2.98 KB
/
Fragen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
- reprs for GDay, GMonth , GYearMonth, GYear, GMonthDay, etc.
- write_file needs delete_file method
- e.g. All Namespace obj variables must have property.setter, to make copy/paste/setDefault possible, otherwise
Namespace variable could be set to tuple() e.g.
- add Typehints for attributes not inside __init__ but in class, so that get_type_hints() works
- Make small classes, just for name:
Duration = dateutil.relativedelta.relativedelta
Currently:
```
Duration = dateutil.relativedelta.relativedelta
```
Proposal:
```
class Duration(dateutil.relativedelta.relativedelta):
pass
```
Gibt es Unterschied zw. Reference und AASReference? Warum typehint of submodel.semantic_id ist Reference?
Suggestions:
- add from_referable method to Reference to use "choose from local" button
- write_file needs delete_file method
- How to realize Blob, bytes, bytearray widgets/dialogs?
- DictSupplementaryFileContainer.add_file( content_type: Union[str, Enum] or without content type)?
- Blob.mime_type may be Enum?
- Unite Property.value and Property.value_type, smth like ValueReferencePair in IEC61360ConceptDescription.value_list
- Error when creating datatypes.Date(2000)
res: "Date" = datetime.date.__new__(cls, year, month, day) # type: ignore # pickle support is not in typeshed
TypeError: an integer is required (got type NoneType)
- Make small classes, just for name:
Duration = dateutil.relativedelta.relativedelta
DateTime = datetime.datetime
Time = datetime.time
Boolean = bool
Double = float
Decimal = decimal.Decimal
Integer = int
String = str
- reprs for GDay, GMonth etc.
- add Typehints for attributes not inside __init__ but in class, so that get_type_hints() works
- e.g. All Namespace obj variables must have property.setter, to make copy/paste/setDefault possible, otherwise
Namespace variable could be set to tuple() e.g.
- add func set_default_value() for each class attribute where it is possible (smth. like delete)
- delete target_type parameter in init of AASReference or it should have same name as class attribute
- make Submodel subscriptable to do smth like Iterable[Submodel[SubmodelElement]]
now: TypeError: 'ABCMeta' object is not subscriptable
- SubmodelElementCollection, property 'ordered' add typehint
Needs:
For TypeOptionGroupBox: - Some datatypes must be implemented (Time, Duration etc.)!
For testing Open/Save: - read_aas_json_file() doesn't work for str files
with open(file, "r") as f:
self.objStore = aasx.read_aas_json_file(f)
Bugs:
ConceptDictionary: - change id_short from "name1" to "name2" is ok, but then change frm "name2"
back to "name1" raises Error: "name1" is already present in the parent Namespace
Repr in AASReference wants to get __name__, but type is sometimes ForwardRef
which doesnt have __name__ but it has __forward_arg__
def __repr__(self) -> str:
return "AASReference(type={}, key={})".format(self.type.__name__, self.key)