-
Notifications
You must be signed in to change notification settings - Fork 21
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
DSS_Python 0.10.5, API sync and better error handling #77
Conversation
Tests passing in dss_python, odd.jl and here in odd.py. I'll try to release tomorrow to allow us to merge this. Like I mentioned in #75 and dss-extensions/dss_capi#74, the new components were added to the base engine but they're kinda buggy still (even on the official OpenDSS). |
c9b474d
to
dbc1f14
Compare
@kdheepak I started adding missing functions, which are mostly many DSS C-API extensions and a couple of new functions ported from the COM API, but I decided to skip those in this PR and approach them more automatically. I started writing a basic transformation to port the useful code from dss_python to oddpy, akin to what I did in the initial dss_capi migration but directly on the Python code this time. I'm planning on doing this on 2 steps:
This will help keep the implementations in sync (in terms of new dss_capi functions) and reduce (manual) coding errors. |
I was able to finish this, but still need to update the tests again after the changes. Some are failing due to previous misuse, some just because I changed the available |
This is great!
Technically this is breaking. I think these are the only two functions though. We could add a Also, this PR will now cause functions to error (as it should) where as previously if something went wrong it would be silent and return. I would not expect that from Maybe we can just update to |
That's a good idea. I can enable the test for that too.
Yes, incrementing just the micro version could be misleading. Since there are a bunch of new functions and modules, I think jumping to v0.4.0 is fine. After #55, we may need to do it again, depending on how it ends up looking. I will try to work on updating the tests tonight. Soon after that, I'll start another branch/PR about the class-based version and iterators. It should be a relatively quick change but certainly will require at least some new tests to ensure it's working as expected and mostly compatible with the current version. We probably can wait a few more days and then announce the resulting version on the official forums to reach more users. I noticed more and more users of ODD.py posting there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kdheepak I think this addresses the main backwards compatibility issue. Since we're not limited to the COM API compatibility like in dss_python, I mapped the Code
value to an exception. I added your suggestion of keeping the input Code
param as well as the warning.
The new tests for this are included in the commit that follows this one.
Codecov Report
@@ Coverage Diff @@
## master #77 +/- ##
===========================================
- Coverage 68.65% 55.76% -12.90%
===========================================
Files 47 54 +7
Lines 3053 4261 +1208
===========================================
+ Hits 2096 2376 +280
- Misses 957 1885 +928
Continue to review full report at Codecov.
|
50b0704
to
7a7c723
Compare
The latest push fixed the CI configs to use the main PyPI instead of the test instance (test.pypi.org) when installing dss_python. I'll upload the pre-releases to the main instance next time to avoid this kind of change. |
- Update tests to DSS C-API/Python 0.10.5 - setup.py: Update the dependency on dss_python - setup.py: Add long_description_content_type to render the README correctly on PyPI - On CI, allow pip to install pre-releases for easier testing of pre-releases
…t, TSData, WireData
- Add CheckForError for most setters - Update many docstrings - Introduce many new functions/properties - Remove some functions with side-effects from `_columns`
- Add tests CktElement.Variable/Variablei - Reenable/fix some older commented tests - Complement the DataFrames with the new fields
7a7c723
to
f4725a1
Compare
@kdheepak Do you mind if I merge this one and prepare a release on the weekend? |
I think it looks good! Sorry for the delayed responses. |
Minor version increment as discussed in #77 (comment) i.e. new error-handling introduced, using frequent checks to map the errors to exceptions
Upgrade do DSS_Python 0.10.5, synchronizing the API (still maintain ODD.py's conventions):
_columns
Closes #42, closes #83, potentially #69 as well (needs test).
Remaining tasks: