From 3bba7e9eb31d728f2ded35d0793297fe4a81f866 Mon Sep 17 00:00:00 2001 From: Phillip Weinberg Date: Fri, 29 Sep 2023 16:31:42 -0400 Subject: [PATCH] adding version and test. (#656) --- src/bloqade/__init__.py | 4 ++++ tests/test_version.py | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 tests/test_version.py diff --git a/src/bloqade/__init__.py b/src/bloqade/__init__.py index 2e9085733..e9629bbd7 100644 --- a/src/bloqade/__init__.py +++ b/src/bloqade/__init__.py @@ -12,6 +12,10 @@ import bloqade.ir as _ir from bloqade.constants import RB_C6 +import importlib.metadata + +__version__ = importlib.metadata.version("bloqade") + def tree_depth(depth: int = None): """Setting globally maximum depth for tree printing diff --git a/tests/test_version.py b/tests/test_version.py new file mode 100644 index 000000000..1982e5eb6 --- /dev/null +++ b/tests/test_version.py @@ -0,0 +1,6 @@ +import bloqade + + +def test_version(): + print(bloqade.__version__) + assert bloqade.__version__