Closed trevorhardy closed 8 months ago
Do we know how to fix the failures here
For all the functions that inherited from "_HelicsCHandle" I implemented the fix that Mark put together (initializing with the super classes init) and I'm 99% sure that this will provide at least a good-enough band-aid to make things not fail like they were for us. Once we have a new PyHELICS expert they should go through capi.py and figure out how to do this better.
Getting a lot of
tests/test_api.py:13: in <module>
import helics as h
helics/__init__.py:2: in <module>
from .capi import *
E File "/Users/runner/work/pyhelics/pyhelics/helics/capi.py", line 1477
E class HelicsQueryBuffer(_HelicsCHandle):
E ^
E SyntaxError: invalid syntax
in the testing
Let me see if there's something I've obviously done wrong.
Stupid missing ")", double-checking I didn't copy-paste this everywhere and then I'll push back up. Should be just a minute.
Ok, let's try this again.
I'm feeling good about this one....
Attention: 6 lines
in your changes are missing coverage. Please review.
Comparison is base (
2f495af
) 64.20% compared to head (3f77ed4
) 63.93%. Report is 29 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
helics/capi.py | 44.44% | 5 Missing :warning: |
tests/test_python_api.py | 92.85% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Maybe the filter test should be marked as skip on Windows? Access violation sounds like it is crashing in the C/C++ part of the HELICS library.
I don't know enough to say whether skipping that test is a good idea but I like seeing one more green checkmark.
It is strange how it passes for the CI job triggered by the "push"/commit, but fails for the "pull_request" trigger; also the test passed in the CI job for the merged PR earlier passed in the main branch.
Use Python 3 style
super()
.
If we've dropped Python2 support, I'm on board. If we haven't, we should keep it the same way.
We dropped Python 2 support. Our CI jobs couldn't even install Python 2.7 to run tests without failing.
Add
__init__()
definitions for all classes that inherit from "_HelicsCHandle()". This fix was necessary for allowing the implementation of a query callback (specifically providing the init to "HelicsQueryBuffer").