Skip to content

feat: add option to separate configs by tags on export#1005

Open
wakonig wants to merge 1 commit into
mainfrom
feature/config_split
Open

feat: add option to separate configs by tags on export#1005
wakonig wants to merge 1 commit into
mainfrom
feature/config_split

Conversation

@wakonig

@wakonig wakonig commented Jul 15, 2026

Copy link
Copy Markdown
Member

Description

bec.config.save_current_session now supports the export by tags.

Additional Comments

Once merged, we can add it also to the DeviceManagerView

Definition of Done

  • Documentation is up-to-date.

Copilot AI review requested due to automatic review settings July 15, 2026 12:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enhances the device configuration export workflow by adding an option to export the current session split into multiple YAML files grouped by deviceTags, and it also refactors/extends the config helper API (set_session, add_to_session, save_session) while keeping backward-compatible aliases.

Changes:

  • Added save_session(..., split_by_tag=True) to write a manifest plus one YAML file per tag (and an untagged bucket).
  • Introduced set_session (replacement for update_session_with_file) and added add_to_session; updated call sites/tests accordingly.
  • Added unit tests covering split-by-tag export behavior and updated e2e tests to use set_session.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
bec_lib/tests/test_config_helper.py Updates tests for the new API names and adds coverage for split-by-tag export output.
bec_lib/bec_lib/config_helper.py Implements split_by_tag export, adds add_to_session, refactors session APIs, and introduces helper functions for split output generation.
bec_ipython_client/tests/end-2-end/test_scans_lib_e2e.py Updates e2e tests to use set_session instead of update_session_with_file.

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

Comment thread bec_lib/bec_lib/config_helper.py Outdated
Comment thread bec_lib/bec_lib/config_helper.py Outdated
Comment thread bec_lib/bec_lib/config_helper.py Outdated
Comment thread bec_lib/bec_lib/config_helper.py
Comment thread bec_lib/bec_lib/config_helper.py
Comment thread bec_lib/bec_lib/config_helper.py Outdated
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.23529% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
bec_lib/bec_lib/config_helper.py 88.13% 10 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@wakonig
wakonig force-pushed the feature/config_split branch 3 times, most recently from adf0e95 to 357b958 Compare July 15, 2026 14:17
@wakonig
wakonig force-pushed the feature/config_split branch from 357b958 to 058df16 Compare July 15, 2026 14:25
@wakonig wakonig self-assigned this Jul 15, 2026
@wakonig
wakonig requested a review from a team July 15, 2026 14:43
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.

2 participants