-
Notifications
You must be signed in to change notification settings - Fork 70
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
Adds Line2, Line3, SignalStats, Temperature python interface #220
Adds Line2, Line3, SignalStats, Temperature python interface #220
Conversation
Codecov Report
@@ Coverage Diff @@
## ign-math6 #220 +/- ##
==========================================
Coverage 99.21% 99.21%
==========================================
Files 65 65
Lines 6089 6089
==========================================
Hits 6041 6041
Misses 48 48
Continue to review full report at Codecov.
|
474070f
to
8456acf
Compare
Signed-off-by: Marcos Wagner <[email protected]>
Signed-off-by: Marcos Wagner <[email protected]>
Signed-off-by: Marcos Wagner <[email protected]>
8456acf
to
31be8f8
Compare
It was necessary to add the Click to see output
This issue is not happening when compiling with SWIG 4.0, but in order to support SWIG 3.0, and as we couldn't find a fix for this at the moment, we decided to suppress it. |
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.
LGTM, just a couple of nits
%include Line2.i | ||
%include Line3.i | ||
%include SignalStats.i | ||
%include Temperature.i |
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.
nit: can these be alphabetized or do they need to be ordered by dependencies?
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.
do they need to be ordered by dependencies?
That's correct
Signed-off-by: Marcos Wagner <[email protected]>
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.
LGTM!
@scpeters @chapulina It is ready for another review!
Signed-off-by: Marcos Wagner <[email protected]>
🎉 New feature
Goes on top of #216.
Related to #101 #210
Summary
Adds
Python
interface for three math classes:Line2
,SignalStats
,Temperature
. For each class a python test has been created.Related issues and notes
Line2
ign-math
was not working properly as the call to equal() was receiving(double, int, double)
argument types, having a 0 with static cast passed as second argument, but always having doubles for the first and third arguments.. For this, a 0. is now being passed.=
in python for the tests, the copy constructor was used.operator[]
functionality in python, the class had to be extended in the interface file (.i file) adding__getitem__()
, calling theoperator[]
inside.__str__()
, calling theoperator<<
inside.Temperature
__str__()
, calling theoperator<<
inside.friend Temperature operator+(double _t, const Temperature &_temp)
and similar operators haven't been implemented in SWIG because no simple implementation was found. So it won't be possible to dotemp1 = 20.0 + temp2
.SignalStats
This contains various classes defined in the same interface file.
SignalStats class
SignalStatistic class and its inherited classes
Checklist
codecheck
passed (See contributing)