-
Notifications
You must be signed in to change notification settings - Fork 33
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
Create a set_packageId() function #294
Comments
Thanks for raising this. I'm really not sure and wanna chew on it. Re. Also: Another way to make I think @jeanetteclark and @dmullen17 could offer some good insight here too. |
I agree that having |
Thanks @amoeba ! I believe the other I agree with you 💯 though that the pipe structure you outline seems much more natural (and echoes a more functional programming style). I am very tempted to switch all the other methods to that. Downsides are that this would obviously be a breaking change, so I'm not sure it's worth it. Also, most complexTypes don't have a So I guess I'm still leaning to |
The backwards compatibility point is a big one and I think its worth avoiding such a breakage change as I describe. I think |
@amoeba @jeanetteclark Would you be interested in a quick PR defining a Thanks! |
Hey @cboettig I can try to give this a shot next week |
Following up on #293, proposal to resolve results in two separate tasks: removing the creation of setting id on
write_eml()
, and adding a separate function toset_packageId()
, and separately, possibly to modify validation error message specifically for thepackageId()
case to provide a nice clear error message on this (perhaps not needed but could ease the transition since this is a breaking change?)I'm a bit unsure on the preferred syntax for
set_packageId()
. In the set_packageId branch I've added a mockup with the syntax like this:All fields have defaults, so you can create a new eml object with package id using:
But I'm surprised just how many interface questions this raises. Most
set_*
methods take only the fields to be added and construct a list fragment, they don't take an argument for the full existingeml
list and return the fulleml
object, but maybe that's okay here since these are top-level attributes?Or it might be better to call this
set_eml()
, creating a top-level constructor and not take an existingeml
list object as an argument, e.g. something that looks like:The function would probably need an assertion to make sure that the
system
is set manually if thepackageId
is set manually too.Thoughts @amoeba @mbjones others?
The text was updated successfully, but these errors were encountered: