[yt-users] Proposing changing the way parameter files get accessed

Matthew Turk matthewturk at gmail.com
Thu Sep 19 07:22:32 PDT 2013


Hi all,

Because yt is primarily exposed as a library on top of which scripts
and analysis can be built, we have recently (wow, actually, it's been
almost a year!) attempted to start a mechanism of proposing,
discussing and then finally implementing changes that touch the API.
(YTEPs, or "yt Enhancement Proposals.")

Because this particular change would be quite wide-ranging, I wanted
to bring it up before it got much further in the discussion.

https://bitbucket.org/yt_analysis/ytep/pull-request/24/ytep-0018-reducing-dict-like-access-to/

Essentially, what this would do is eliminate this operation:

1.0/pf["cm"]

or

128.0/pf["mpc"]

to specify length units.  Any accessing of a parameter file (static
output, dataset, whatever) like a dictionary would be changed.  The
initial implementation of the YTEP suggests that this be limited to
just allowing parameters (i.e., this would be things that the
simulation frontend identifies as controlling the simulation) but not
units, conversion factors, etc etc, to be accessed this way.  But,
there have been discussions in the pull request about making it so
that a "pf" cannot be accessed like a dictionary at all.

This would exclusively change in yt 3.0, and would not propagate to
the current releases.  However, since we're hoping to shift
development over to 3.0 not too long from now, I think getting input
on this possible change would be extremely valuable.

So if you're interested, head on over to the YTEP and share your
feelings.  This would likely break a lot of scripts, but it's also a
ways off, and you can always stick with the current version of yt
you're using.

Thanks,

Matt



More information about the yt-users mailing list