Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cadet/cadet.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,11 @@ def autodetect_cadet() -> Optional[Path]:

return cadet_root

@property
def version(self) -> str:
"""str: The version of the CADET-Core installation."""
return self.cadet_runner.cadet_version

@property
def cadet_runner(self) -> CadetRunnerBase:
"""
Expand Down
20 changes: 20 additions & 0 deletions tests/test_cadet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Test general properties of Cadet.
"""


import re
import pytest
from cadet import Cadet


@pytest.mark.parametrize("use_dll", [True, False])
def test_version(use_dll):
# Assuming Cadet has a method to set or configure the use of DLL
cadet = Cadet(use_dll=use_dll)

assert re.match(r"\d\.\d\.\d", cadet.version), "Version format should be X.X.X"


if __name__ == '__main__':
pytest.main([__file__])
3 changes: 2 additions & 1 deletion tests/test_parallelization.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from cadet import Cadet
from joblib import Parallel, delayed
from .test_dll import setup_model
import pytest
from tests.test_dll import setup_model

n_jobs = 2

Expand Down
Loading