Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🩹fix loading circuits from PathLike objects #681

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

burgholzer
Copy link
Member

Description

This PR fixes a small oversight in the mqt.core.load method, where the method would not work if being passed a PathLike object that is not a string (e.g., a Path).
The changes in the PR make sure that such an object is appropriately converted to a string before being passed to the constructor.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

@burgholzer burgholzer self-assigned this Sep 5, 2024
@burgholzer burgholzer added fix Fix for something that isn't working Core Anything related to the Core library and IR python Anything related to Python code labels Sep 5, 2024
@burgholzer burgholzer enabled auto-merge (squash) September 5, 2024 12:05
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.0%. Comparing base (28dc65e) to head (4165c22).
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #681   +/-   ##
=====================================
  Coverage   87.0%   87.0%           
=====================================
  Files        125     125           
  Lines      13781   13781           
  Branches    2164    2164           
=====================================
  Hits       11995   11995           
  Misses      1786    1786           
Flag Coverage Δ *Carryforward flag
cpp 86.6% <ø> (ø) Carriedforward from 28dc65e
python 99.7% <100.0%> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
src/mqt/core/__init__.py 100.0% <100.0%> (ø)

@burgholzer burgholzer merged commit 51c88eb into main Sep 5, 2024
28 checks passed
@burgholzer burgholzer deleted the fix-circuit-load-from-pathlike branch September 5, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Anything related to the Core library and IR fix Fix for something that isn't working python Anything related to Python code
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant