Skip to content

Commit

Permalink
Add family package entry point with about information (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgestar authored Jan 14, 2025
1 parent c769bfd commit c003888
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ setup_requires =
[options.packages.find]
where = src

[options.entry_points]
qutip.family =
qutip_qip = qutip_qip.family

[options.extras_require]
graphics = matplotlib>=1.3.0
control = qutip-qtrl
Expand Down
8 changes: 8 additions & 0 deletions src/qutip_qip/family.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""QuTiP family package entry point."""

from . import __version__


def version():
"""Return information to include in qutip.about()."""
return "qutip-qip", __version__
12 changes: 12 additions & 0 deletions tests/test_family.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
""" Tests for qutip_qip.family. """

import re

from qutip_qip import family


class TestVersion:
def test_version(self):
pkg, version = family.version()
assert pkg == "qutip-qip"
assert re.match(r"\d+\.\d+\.\d+.*", version)

0 comments on commit c003888

Please sign in to comment.