• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit-ibm-runtime / 29416747382
87%

Build:
DEFAULT BRANCH: main
Ran 15 Jul 2026 12:54PM UTC
Jobs 8
Files 325
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jul 2026 12:43PM UTC coverage: 87.071% (+0.3%) from 86.753%
29416747382

push

github

web-flow
Add optional `persist` argument to `FakeBackendV2.refresh()` method (#2977)

### Summary

`FakeBackendV2.refresh()` writes the updated `conf_*.json` /
`props_*.json` back into the package's own directory. When the package
is installed system-wide that directory is read-only
(`PermissionError`), and even when writable it's bad practice to mutate
files inside site-packages.

~Instead, let's keep the .json files in the `~/.qiskit` directory which
is already used for storing the IBM Quantum platform credentials.~

As suggested
[here](https://github.com/Qiskit/qiskit-ibm-runtime/issues/2976#issuecomment-4852615378),
the new proposal leaves the default behavior unchanged, i.e.,
`refresh()` tries to modify the backend json files in site-packages.
With ~`use_temp_dir=True`~ `persist=False`, the updated json files are
stored in a temp directory. This allows to use this method in
installations where the package's files are read-only or the user does
not have permissions to modify those files.

### Details and comments

- I tested this change locally and in the Arch Linux package and I
didn't have any issues.
- I used `os.path` instead of `pathlib.Path` because this was used
elsewhere. If you want I can refactor this using `pathlib`

Fixes #2976

- [ ] I didn't use LLM tooling, or only used it privately.
- [ ] I used the following tool to help write this PR description:
- [x] I used the following tool to generate or modify code: Claude Opus
4.8 for writing the unit tests

---------

Signed-off-by: Iyán Méndez Veiga <me@iyanmv.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Diego M. Rodríguez <diego@moreda.io>

27 of 27 new or added lines in 2 files covered. (100.0%)

8735 of 10032 relevant lines covered (87.07%)

6.91 hits per line

Jobs
ID Job ID Ran Files Coverage
1 unit-tests_python3.10-ubuntu-latest - 29416747382.1 15 Jul 2026 12:54PM UTC 325
87.07
GitHub Action Run
2 unit-tests_python3.11-windows-latest - 29416747382.2 15 Jul 2026 12:55PM UTC 325
85.56
GitHub Action Run
3 unit-tests_python3.12-windows-latest - 29416747382.3 15 Jul 2026 12:55PM UTC 325
85.56
GitHub Action Run
4 unit-tests_python3.12-ubuntu-latest - 29416747382.4 15 Jul 2026 12:54PM UTC 325
87.07
GitHub Action Run
5 unit-tests_python3.10-windows-latest - 29416747382.5 15 Jul 2026 12:55PM UTC 325
85.56
GitHub Action Run
6 unit-tests_python3.13-ubuntu-latest - 29416747382.6 15 Jul 2026 12:54PM UTC 325
87.07
GitHub Action Run
7 unit-tests_python3.11-ubuntu-latest - 29416747382.7 15 Jul 2026 12:54PM UTC 325
87.07
GitHub Action Run
8 unit-tests_python3.13-windows-latest - 29416747382.8 15 Jul 2026 12:54PM UTC 325
85.56
GitHub Action Run
Source Files on build 29416747382
  • Tree
  • List 325
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29416747382
  • cba3baa3 on github
  • Prev Build on gh-readonly-queue/main/pr-3036-d44edb058118dcb051555e566a9b35214338e967 (#29361183446)
  • Next Build on main (#29419449936)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc