-
Notifications
You must be signed in to change notification settings - Fork 3
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
Make Ensemble._*_col public #214
Comments
The original intent was to shield these a bit from users, particularly with some aversion to users being able to assign something like ens.time_col at will. However, as we've developed and used TAPE more and more, it is apparent that users should be able to access these. I think I'm in favor of the property implementation here over making them directly part of the public interface. But that's not a strong preference. I do think we should hold off on this until the refactor is complete, as these will likely be properties of the SourceFrame and ObjectFrame, and we may need to think a bit about the best way to show them from the ensemble level (if we want to at all) |
In similar vein, I would advocate for making Ensemble()._object and Ensemble()._source public (Ensemble().object and Ensemble().source). For instance, we use the Ensemble()._source in help docs. So it does seem that we want these to be public (and I see that I want to use them) |
I do have a draft PR for making |
That sounds good to me if you already have it ready to go 👍 |
@hombit How does this change, if at all, with #261? Once we have #261, we'll be able to return series objects for the critical columns. Obviously the _flux_col variables are returning the string name, not the critical columns. But users would be able to get the names presumably doing something like this: |
We potentially could also think about some sugar and let users pass both names and column objects, e.g. |
Closing this, as #261 will implement. |
Ensemble.batch(func, *args)
requires the user to assign*args
with column names. A simple and dataset-agnostic way to do it is specifying it viaEnsemble
object itself:However, by Python convention, object attributes staring with
_
are not the part of the public interface and user should avoid using them. I suggest removing this prefix to haveens.time_col
,ens.flux_col
, etc instead. If we have a good reason to prevent the user from accidental change of these values, we could have privateens.__time_col
and public read-only property, following this pattern:The text was updated successfully, but these errors were encountered: