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

✨🏷️ Type stubs and strict mypy compliance #357

Merged
merged 13 commits into from
Mar 12, 2024
Merged

Conversation

burgholzer
Copy link
Member

Description

This PR finally adds type stubs for the Python bindings of the DDSIM library. This was long overdue and finally allows us to mark the package as typed (i.e., compliant with PEP 561).
Furthermore, it turns on mypy's strict mode and addresses all corresponding warnings.
Typing-wise, this brings DDSIM in line with the other MQT tools.

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.

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
@burgholzer burgholzer added python Pull requests that update Python code minor Part of a minor release code quality Anything related to code quality and code style. feature New feature or request usability Anything related to usability labels Mar 12, 2024
@burgholzer burgholzer added this to the DDSIM 2.0 milestone Mar 12, 2024
@burgholzer burgholzer self-assigned this Mar 12, 2024
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 97.61905% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 92.7%. Comparing base (3283ca5) to head (3753c08).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #357     +/-   ##
=======================================
- Coverage   92.8%   92.7%   -0.1%     
=======================================
  Files         37      37             
  Lines       2559    2549     -10     
  Branches     310     309      -1     
=======================================
- Hits        2375    2365     -10     
  Misses       184     184             
Flag Coverage Δ
cpp 94.7% <ø> (-0.1%) ⬇️
python 87.7% <97.6%> (-0.2%) ⬇️
Files Coverage Δ
src/mqt/ddsim/deterministicnoisesimulator.py 100.0% <100.0%> (ø)
src/mqt/ddsim/header.py 100.0% <100.0%> (ø)
src/mqt/ddsim/job.py 59.3% <100.0%> (-7.3%) ⬇️
src/mqt/ddsim/primitives/__init__.py 100.0% <100.0%> (ø)
src/mqt/ddsim/primitives/estimator.py 93.2% <100.0%> (-0.2%) ⬇️
src/mqt/ddsim/primitives/sampler.py 100.0% <100.0%> (ø)
src/mqt/ddsim/provider.py 95.4% <100.0%> (ø)
src/mqt/ddsim/qasmsimulator.py 98.8% <100.0%> (ø)
src/mqt/ddsim/stochasticnoisesimulator.py 100.0% <100.0%> (ø)
src/mqt/ddsim/pathqasmsimulator.py 50.9% <50.0%> (ø)

... and 2 files with indirect coverage changes

Signed-off-by: burgholzer <burgholzer@me.com>
@burgholzer burgholzer merged commit 9a2b2f0 into main Mar 12, 2024
37 checks passed
@burgholzer burgholzer deleted the typed-ddsim branch March 12, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Anything related to code quality and code style. feature New feature or request minor Part of a minor release python Pull requests that update Python code usability Anything related to usability
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant