-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring, type annotations and fixes #51
Commits on Mar 8, 2024
-
[refactor] Use DatumSpecification and DataQueryDatumSpecification in …
…PDUs Instead of duplicating code already in the above two classes, existing classes that implement the same functionality use them instead. Access to the underlying attributes is provided through @property-decorated methods. Affected classes: Data Query PDU Action Request PDU Data PDU Set Data PDU Event Report PDU Comment PDU ... and their Reliable counterparts
Configuration menu - View commit details
-
Copy full SHA for 8d1df89 - Browse repository at this point
Copy the full SHA 8d1df89View commit details -
Remove unnecessary whitespace, and add any where required to follow PEP8 recommendations.
Configuration menu - View commit details
-
Copy full SHA for cc5566d - Browse repository at this point
Copy the full SHA cc5566dView commit details -
[refactor] determine number of fixed datums and variable datums dynam…
…ically Instead of storing the number of fixed datums and variable datums as an attribute, calculate it from the list of fixed/variable datums when required. The original attribute names are still accessible, through class properties.
Configuration menu - View commit details
-
Copy full SHA for b4ccb3d - Browse repository at this point
Copy the full SHA b4ccb3dView commit details -
[style] remove object superclass from class declaration
This style is no longer required in Python 3; all classes that do not inherit another superclass are automatically assumed to subclass object.
Configuration menu - View commit details
-
Copy full SHA for cb8697b - Browse repository at this point
Copy the full SHA cb8697bView commit details -
[refactor] use class attributes for fixed recordType and recordLength
These are moved from the __init__() to class attributes. This pattern makes it less likely for users to accidentally initialise the class with the wrong recordType or recordLength, where these values are known beforehand. Class attributes are accessible by instances of the class, so the serialize() and parse() methods are unaffected. ### Further changes - added type annotations to attributes, marking them as being an enum, int, or float, along with their size in bits - fixed init types for some attributes - removed some unnecessary comments - added table UID in comments for some enums
Configuration menu - View commit details
-
Copy full SHA for fa6b689 - Browse repository at this point
Copy the full SHA fa6b689View commit details -
[refactor] remove number of fixed/variable datums from init
These are calculated from the list of fixed/variable datum records instead. The attributes are still accessible as properties.
Configuration menu - View commit details
-
Copy full SHA for f62b7e3 - Browse repository at this point
Copy the full SHA f62b7e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for a1093d4 - Browse repository at this point
Copy the full SHA a1093d4View commit details -
[fix] DataQueryDatumSpecification reads datumIDs as int instead of Fi…
…xedDatum or VariableDatum
Configuration menu - View commit details
-
Copy full SHA for d73d359 - Browse repository at this point
Copy the full SHA d73d359View commit details
Commits on Mar 11, 2024
-
[docs, fix] Type annotations, parsing fixes
Changes: - removed redundant comments, whitespace - added type aliases for Python int, float, bytes - added type annotation for init parameters, padding - added UID number in comments for enums from SISO-REF-010 - changed superclass attribute values (pduType, protocolFamily) from init to class attributes - Fixed some parsing of arrays
Configuration menu - View commit details
-
Copy full SHA for 76dedb4 - Browse repository at this point
Copy the full SHA 76dedb4View commit details -
Configuration menu - View commit details
-
Copy full SHA for a203b75 - Browse repository at this point
Copy the full SHA a203b75View commit details
Commits on Mar 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5ed33d2 - Browse repository at this point
Copy the full SHA 5ed33d2View commit details -
[refactor] Add type annotations for remaining opendis modules
The type aliases are moved to their own file, types.py, to avoid a dependency loop.
Configuration menu - View commit details
-
Copy full SHA for 38f71d8 - Browse repository at this point
Copy the full SHA 38f71d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 055237d - Browse repository at this point
Copy the full SHA 055237dView commit details -
[refactor] Use context manager for File IO
This is considered safer as it automatically releases the file handle if the program should crash before f.close() is reached.
Configuration menu - View commit details
-
Copy full SHA for 96f3cfb - Browse repository at this point
Copy the full SHA 96f3cfbView commit details
Commits on Mar 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0a15142 - Browse repository at this point
Copy the full SHA 0a15142View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57e9827 - Browse repository at this point
Copy the full SHA 57e9827View commit details
Commits on Mar 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for edd27bd - Browse repository at this point
Copy the full SHA edd27bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 460b1e3 - Browse repository at this point
Copy the full SHA 460b1e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f8307c - Browse repository at this point
Copy the full SHA 0f8307cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6091189 - Browse repository at this point
Copy the full SHA 6091189View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b66829 - Browse repository at this point
Copy the full SHA 0b66829View commit details