Skip to content
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

Change order of arguments for adding auxiliary data for 3.0 release #3811

Open
BFedder opened this issue Sep 1, 2022 · 2 comments · May be fixed by #4532
Open

Change order of arguments for adding auxiliary data for 3.0 release #3811

BFedder opened this issue Sep 1, 2022 · 2 comments · May be fixed by #4532
Assignees
Milestone

Comments

@BFedder
Copy link
Contributor

BFedder commented Sep 1, 2022

Is your feature request related to a problem?

Currently, auxiliary data is added as such:

aux = mda.auxiliary.EDR.EDRReader(edr_file)
u.trajectory.add_auxiliary(aux_spec, aux)

i.e.

u.trajectory.add_auxiliary({"temp": "Temperature"}, aux)

Adding all data is done as such:

u.trajectory.add_auxiliary(auxdata=aux)

aux_spec and aux_data both are optional arguments for this solution. Changing the order and making auxdata mandatory is preferable, but is a breaking change to the aux framework.

Describe the solution you'd like

In 3.0, the order of aux_spec and aux_data should be switched, and only aux_spec should be optional and default to None.
Then, adding all auxdata could be done as such:

u.trajectory.add_auxiliary(aux)

This will require changes in coordinates.base.add_auxiliary and the tests. I have left a TODO comment there.

Describe alternatives you've considered

Leave as is

Additional context

For more context on how the auxiliary system works, see my blog

@hmacdope hmacdope added this to the Release 3.0 milestone Sep 4, 2022
@orbeckst
Copy link
Member

orbeckst commented Sep 5, 2022

You could create the PR and it will wait until we are getting ready for 3.0. According to @IAlibay on twitter, this will be September 2023. So no rush... but it would be nice to have it queued up, especially if it only touches code related to aux.

@orbeckst
Copy link
Member

orbeckst commented Sep 5, 2022

We also need a reminder to deprecate the old functionality — that should go into 2 releases prior to 3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants