-
Notifications
You must be signed in to change notification settings - Fork 22
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
pysunspec2 updates #98
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Kudrat9
commented
Nov 18, 2024
- Added license information for the project so it's displayed with pip show pysunspec2.
- Updated the unimplemented point verifications for float32 and float64 points.
- Used a cache for model definitions to reduce disk I/O when the same model definition is loaded multiple times.
- Initialize FileClientModel's parent class FileClientGroup with the proper point class of FileClientPoint
- Migrate setup.py from distutils to setuptools
Adds an optional timeout param to the client connect method, this will make it possible for example to have a short timeout for connection and a longer timeout for regular read/write. The internal modbus client already supports this so this is a very small change.
distutils is deprecated and will be removed in python 3.12 ( https://peps.python.org/pep-0632/ )
Even though the group_class is being passed the index, it is not being used at the point level, and any update that I tried to use it at the point level resulted in the output changing, and lots of tests failing. Using the index as part of the _init_repeating_group instead, without passing it to the group_class, provides the expected results. Note that this follows the same logic as if the count is available (line 530).
The dict provided by smdx.from_smdx didn't include all the info provided in the SMDX for symbols, and instead just contained name & value. Going through all the smdx string/symbols elements to collect info, and assigning that to matching symbol definitions. This is a symbol before: ``` "symbols": [ { "name": "IEEE_1547", "value": 0 }, ``` and after: ``` "symbols": [ { "name": "IEEE_1547", "value": 0, "label": "IEEE 1547 (default)", "desc": "'IEEE 1547' is the most common inverter compliance setting." }, ``` Most SMDX files do not provide additional symbol info and are therefore not affected.
Add cache for get_model_defs to save disk I/O
…s_for_FileClientModel Issue-68: initialize FileClientGroup point_class with FileClientPoint
Provide symbols info in model def
#71 - Populate repeating block groups from file
Migrate setup.py from distutils to setuptools
Add timeout param to tcp client connect
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.