Skip to content

Backend abstraction II: rename mds_conn to data_conn to reflect backend-agnostic DataConnection#534

Merged
gtrevisan merged 5 commits intodevfrom
sameerc/data-conn-rename
Apr 1, 2026
Merged

Backend abstraction II: rename mds_conn to data_conn to reflect backend-agnostic DataConnection#534
gtrevisan merged 5 commits intodevfrom
sameerc/data-conn-rename

Conversation

@samc24
Copy link
Copy Markdown
Collaborator

@samc24 samc24 commented Mar 29, 2026

Summary

  • Renamed mds_conndata_conn, process_mds_connprocess_data_conn, _get_mds_instance_get_connection_instance to reflect the backend-agnostic DataConnection ABC
    introduced in Backend abstraction I: introduce DataConnection/ProcessConnection ABCs #523
  • Renamed public API parameter mds_connection_initializerconnection_initializer in get_shots_data() (takes ProcessConnection, not MDS-specific)
  • Updated user-facing docs (physics_method_reference.md, examples/defaults.py, docs/examples/)
  • Fixed incomplete get_shots_data() docstring (missing params, stale "from CMOD" wording)

Details

24 files, ~370 line changes. Pure rename + formatting — no behavioral changes.

Test plan

@samc24 samc24 requested a review from gtrevisan March 29, 2026 22:43
@samc24 samc24 force-pushed the sameerc/data-conn-rename branch from 0a73d12 to 19b7d44 Compare March 30, 2026 22:55
@gtrevisan gtrevisan changed the title Rename mds_conn to data_conn to reflect backend-agnostic DataConnection Backend abstraction II: rename mds_conn to data_conn to reflect backend-agnostic DataConnection Mar 31, 2026
Copy link
Copy Markdown
Member

@gtrevisan gtrevisan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! once again, let's merge in a few days, or at the end of the week at the latest.

@gtrevisan gtrevisan force-pushed the sameerc/backend-abc branch from 94332c6 to 2f9a71f Compare April 1, 2026 13:38
Base automatically changed from sameerc/backend-abc to dev April 1, 2026 13:50
@gtrevisan gtrevisan force-pushed the sameerc/data-conn-rename branch from ef1a45f to bbeedc0 Compare April 1, 2026 13:50
samc24 and others added 3 commits April 1, 2026 13:37
…on ABC

Signed-off-by: Sameer Chaturvedi <sameerc@mit.edu>
Fixes unresolved mkdocs cross-reference to DataConnection introduced
in the data_conn rename. The base module had no mkdocstrings block,
so autorefs couldn't resolve the link.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the backend-abstraction refactor by renaming MDSplus-specific identifiers (mds_conn, process_mds_conn, mds_connection_initializer, etc.) to backend-agnostic names (data_conn, process_data_conn, connection_initializer) to align with the DataConnection / ProcessConnection ABCs introduced in #523, and updates documentation/examples accordingly.

Changes:

  • Renamed mds_conndata_conn (and related helpers) across core retrieval, settings params, and physics/time/nickname codepaths.
  • Renamed get_shots_data() public kwarg mds_connection_initializerconnection_initializer and refreshed the docstring parameter section.
  • Added/updated documentation pages and examples to reference DataConnection and the new naming.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
mkdocs.yml Adds nav entry for the new DataConnection reference page.
examples/defaults.py Updates example call to use connection_initializer.
docs/usage/physics_methods/physics_method_reference.md Updates docs to reference params.data_conn instead of params.mds_conn.
docs/usage/data_connection_reference.md New reference page for DataConnection/ProcessConnection base interfaces.
docs/examples/custom_time_setting.py Updates example to use params.data_conn.
docs/examples/custom_physics_method.py Updates example to use params.data_conn.
disruption_py/workflow.py Renames initializer kwarg and internal helper/locals to connection-agnostic naming; updates get_shots_data() docstring.
disruption_py/settings/time_setting.py Renames TimeSettingParams.mds_conndata_conn and updates call sites.
disruption_py/settings/nickname_setting.py Renames NicknameSettingParams.mds_conndata_conn.
disruption_py/machine/mast/physics.py Renames connection access to params.data_conn.
disruption_py/machine/mast/efit.py Renames connection access to params.data_conn.
disruption_py/machine/hbtep/physics.py Renames connection access to params.data_conn.
disruption_py/machine/generic/physics.py Updates docstrings to say “data connection”.
disruption_py/machine/east/util.py Renames arg name to data_conn and updates docstrings/calls accordingly.
disruption_py/machine/east/physics.py Renames connection access to params.data_conn and updates docstrings.
disruption_py/machine/east/efit.py Renames connection access to params.data_conn and updates docstrings.
disruption_py/machine/d3d/util.py Updates docstrings and renames connection access to params.data_conn.
disruption_py/machine/d3d/physics.py Renames connection access to params.data_conn and updates docstrings.
disruption_py/machine/d3d/efit.py Renames connection access to params.data_conn and updates docstrings.
disruption_py/machine/cmod/thomson.py Renames connection access to params.data_conn and updates docstrings.
disruption_py/machine/cmod/physics.py Renames connection access to params.data_conn and updates docstrings.
disruption_py/machine/cmod/efit.py Renames connection access to params.data_conn and updates docstrings.
disruption_py/core/retrieval_manager.py Renames process_mds_connprocess_data_conn and propagates data_conn through setup/time init.
disruption_py/core/physics_method/runner.py Updates reconnect path to use physics_method_params.data_conn.
disruption_py/core/physics_method/params.py Renames dataclass field mds_conndata_conn and updates cleanup.
disruption_py/core/physics_method/decorator.py Updates decorator docstring to refer to data_conn.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gtrevisan gtrevisan merged commit 5fc4d9e into dev Apr 1, 2026
26 checks passed
@gtrevisan gtrevisan deleted the sameerc/data-conn-rename branch April 1, 2026 18:08
@gtrevisan gtrevisan mentioned this pull request Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants