-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Add base tests for core.HARKobject, core.distanceMetric, core.AgentType #401
Conversation
NOTE: This PR will make HARK incompatible with py2 as I am using the exploding dictionary [Hence the Travis Fail] |
@MridulS, I guess the "failing check" is failing because of py27 incompatibility? Are the circs simple enough that you could just do a test for py27 and give an error message to the user, but the code would pass Travis? We have said we're going to abandon py27 in January, but we're not quite there yet ... |
@llorracc yeah I can change the code so it works with 2 as well as 3, this is just a cleaner way of combining 2 dictionaries (syntax available from python3). |
Sounds like your plan is to do something that works in both 2 and 3; let me
suggest, instead, that you test whether 2 or 3 is being used and if so
raise a 'deprecation warning' or something to remind us to change it when
we stop supporting 2? (Then you can leave the 3 code in place but
commented out).
…On Sun, Sep 29, 2019 at 4:42 PM Mridul Seth ***@***.***> wrote:
@llorracc <https://github.com/llorracc> yeah I can change the code so it
works with 2 as well as 3, this is just a cleaner way of combining 2
dictionaries (syntax available from python3).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#401?email_source=notifications&email_token=AAKCK73KQ2PJGRHUXD2RZD3QMEHNBA5CNFSM4I3PJ4OKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD736HJY#issuecomment-536339367>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKCK77YBVX7JIF5W6OZFHDQMEHNBANCNFSM4I3PJ4OA>
.
--
- Chris Carroll
|
Scratch my previous comment, there is a better way without using py3 specific syntax :) |
Travis should be happy now ! |
Release Note: Add unit tests to HARK.core various items |
Started adding tests for the classes and functions in core.py
Made some changes to the core.py itself as I found a couple of bugs in the code.
thing_A.shape - thing_B.shape
won't work as both are tuples, changed it by using flatten and then comparing lengths. 24dea3eexec()
andeval()
as there are other ways of doing the same thing@mnwhite @llorracc