Skip to content

remove flag registry #782

@orbeckst

Description

@orbeckst

tl;dr: Get rid of MDAnalysis.core.flags and replace with the lightest solution possible

The flag registry in MDAnalysis.core.flags (in MDAnalysis/core/__init__.py) determines global behavior. In principle, these flags can be changed by the user but in practice this seems to be rarely done. In any case, changes are not persistent and have to be changed for a new python session manually by setting the flag.

Action: remove MDAnalysis.core.flags

As discussed in #315 we decided that the flag registry in the current form does not serve a useful purpose and is too complicated for what it accomplishes. It should be reduced to the smallest and simplest data structure that is necessary, such as a simple dictionary or variables at the module level.

In particular there is currently no expectation that the user should be able to change any parameters in MDAnalysis that change the global behavior (such as changing the base units) because it adds additional assumptions to code and reduces portability.

Impact

Flags are used throughout the code to set defaults, e.g., in the readers and writers and some of the selections. All of this has to be changed.

Issues are marked with label Component-Configuration. In particular

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions