Skip to content

feat: added support to watch snapshot while loading file#58

Merged
petruki merged 2 commits intomasterfrom
staging
May 9, 2026
Merged

feat: added support to watch snapshot while loading file#58
petruki merged 2 commits intomasterfrom
staging

Conversation

@petruki
Copy link
Copy Markdown
Member

@petruki petruki commented May 9, 2026

This pull request introduces support for watching snapshot files for changes when loading them, updates documentation to reflect the new snapshot loading options, and makes minor configuration and workflow updates. The main focus is on enhancing the snapshot loading functionality to allow real-time updates when the snapshot file changes.

Enhancements to snapshot loading and watching:

  • Added support for watching the snapshot file for changes when calling Client.load_snapshot with the watch_snapshot option, triggering automatic updates when the file changes (switcher_client/client.py, LoadSnapshotOptions).
  • Updated the documentation in README.md to explain the new options for loading snapshots, including how to use the fetch_remote and watch_snapshot parameters.
  • Added a new test case to verify that using Client.load_snapshot(LoadSnapshotOptions(watch_snapshot=True)) properly watches the snapshot file and updates the client when the file changes (tests/test_client_watch_snapshot.py).
  • Imported LoadSnapshotOptions in the test file to support the new test case (tests/test_client_watch_snapshot.py).

Configuration and workflow updates:

  • Updated SonarCloud scan action to version 8.0.0 in both master.yml and sonar.yml workflow files for improved CI/CD integration. [1] [2]
  • Set relative_files = True in .coveragerc to improve coverage reporting.

@petruki petruki added this to the v1.1.0 milestone May 9, 2026
@petruki petruki self-assigned this May 9, 2026
@petruki petruki added the enhancement New feature or request label May 9, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 9, 2026

@petruki petruki merged commit 57ee7a9 into master May 9, 2026
15 checks passed
@petruki petruki deleted the staging branch May 9, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant