diff --git a/.gitignore b/.gitignore index 78cd628d0..a01bf0094 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ __pycache__/ /repository/ /results /last_rid.pyon -/dataset_db.pyon +/dataset_db.mdb +/dataset_db.mdb-lock /device_db*.py /test* diff --git a/artiq/_version.py b/artiq/_version.py index e308ce8c2..bf9797c9d 100644 --- a/artiq/_version.py +++ b/artiq/_version.py @@ -1,4 +1,4 @@ import os def get_version(): - return os.getenv("VERSIONEER_OVERRIDE", default="8.0.beta") + return os.getenv("VERSIONEER_OVERRIDE", default="8.0+unknown.beta") diff --git a/artiq/test/hardware_testbench.py b/artiq/test/hardware_testbench.py index f8f936340..ee58cfcdc 100644 --- a/artiq/test/hardware_testbench.py +++ b/artiq/test/hardware_testbench.py @@ -5,6 +5,7 @@ import os import sys import unittest import logging +from tempfile import TemporaryDirectory from nac3artiq import CompileError @@ -20,9 +21,10 @@ logger = logging.getLogger(__name__) @unittest.skipUnless(artiq_root, "no ARTIQ_ROOT") class ExperimentCase(unittest.TestCase): def setUp(self): + self.tempdir = TemporaryDirectory(prefix="artiq_hw_test") self.device_db = DeviceDB(os.path.join(artiq_root, "device_db.py")) self.dataset_db = DatasetDB( - os.path.join(artiq_root, "dataset_db.mdb")) + os.path.join(self.tempdir.name, "dataset_db.mdb")) self.device_mgr = DeviceManager( self.device_db, virtual_devices={"scheduler": DummyScheduler()}) self.dataset_mgr = DatasetManager(self.dataset_db) @@ -30,6 +32,7 @@ class ExperimentCase(unittest.TestCase): def tearDown(self): self.device_mgr.close_devices() self.dataset_db.close_db() + self.tempdir.cleanup() def create(self, cls, *args, **kwargs): try: diff --git a/artiq/test/test_client.py b/artiq/test/test_client.py index f3110d150..aa6cae692 100644 --- a/artiq/test/test_client.py +++ b/artiq/test/test_client.py @@ -29,8 +29,8 @@ def get_env(): class TestClient(unittest.TestCase): def setUp(self): - self.tmp_dir = TemporaryDirectory(prefix="test") - self.tmp_empty_dir = TemporaryDirectory(prefix="empty_repo") + self.tmp_dir = TemporaryDirectory(prefix="artiq_client_test") + self.tmp_empty_dir = TemporaryDirectory(prefix="artiq_empty_repo") self.exp_name = "experiment.py" self.exp_path = os.path.join(self.tmp_dir.name, self.exp_name) self.device_db_path = os.path.join(self.tmp_dir.name, "device_db.py") diff --git a/flake.nix b/flake.nix index 66dfdb80c..8549fa4d1 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,7 @@ artiqVersionMajor = 9; artiqVersionMinor = self.sourceInfo.revCount or 0; artiqVersionId = self.sourceInfo.shortRev or "unknown"; - artiqVersion = (builtins.toString artiqVersionMajor) + "." + (builtins.toString artiqVersionMinor) + "." + artiqVersionId + ".beta"; + artiqVersion = (builtins.toString artiqVersionMajor) + "." + (builtins.toString artiqVersionMinor) + "+" + artiqVersionId + ".beta"; artiqRev = self.sourceInfo.rev or "unknown"; rustManifest = pkgs.fetchurl { diff --git a/versioneer.py b/versioneer.py index ca4e6276f..eae28b2c6 100644 --- a/versioneer.py +++ b/versioneer.py @@ -11,7 +11,7 @@ def get_rev(): """ def get_version(): - return os.getenv("VERSIONEER_OVERRIDE", default="9.0.beta") + return os.getenv("VERSIONEER_OVERRIDE", default="9.0+unknown.beta") def get_rev(): return os.getenv("VERSIONEER_REV", default="unknown")