-
Notifications
You must be signed in to change notification settings - Fork 166
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
Preliminary implementation of default values #73
Conversation
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.
Nice addition. Thanks. My comments are mainly associated with other PR or unresolved issues.
Thanks @nshaffer. I resolved the conflict with master and committed to your branch. Make sure you pull it before adding more commits. Also, I recommend people to submit PRs from a different branch than their master, so that they can use their master to track the upstream master (to rebase, merge, etc.). |
Regarding the test, try to copy let's say the |
Co-Authored-By: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
Co-Authored-By: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
Thanks all for the comments. Seems like folks in #62 prefer the name "optval" so I converted to that everywhere and renamed the fallback argument "default", so that you can write |
Thank you! This is great. I'll review later tonight or tomorrow.
…On Fri, Jan 3, 2020, at 5:59 PM, nshaffer wrote:
Thanks all for the comments. Seems like folks in #62
<#62> prefer the name
"optval" so I converted to that everywhere and renamed the fallback
argument "default", so that you can write either `optval(x,
default=1.0)` if you want to be explicit. Also wrote tests for all
currently implemented types.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#73?email_source=notifications&email_token=AAAFAWAYRYK3SLJO6IHLFUDQ37NQPA5CNFSM4KCPS462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICNLBI#issuecomment-570742149>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAFAWDH262SE7MZ3L5F6OLQ37NQPANCNFSM4KCPS46Q>.
|
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.
This looks great. The API has the right order of arguments that everybody agrees, and optval
seems to be the name that most also agree on. There are tests, implementation is clean. So let's merge it and start using it. For example in #71.
Thanks @nshaffer for the work! |
Here is the first usage of |
Cheers! It occurs to me that |
Yes, send another PR please against master, from a new branch. |
In support of #62
I've implemented a generic interface for
real(sp)
,real(dp)
,real(qp)
,int16
,int32
,int64
,logical
, andcharacter
. I figure this is enough for a first pass. Complex types and discriminating between ASCII and UCS characters can come later. Probably no need to do specific logical kinds.What's missing right now is tests. I don't know how to use CTest, but I would like to learn if anyone can link me a decent tutorial.