From 76c721fa997aebf3b5b415333ac4199c4c668267 Mon Sep 17 00:00:00 2001 From: Andy Salnikov Date: Thu, 3 Oct 2024 10:45:56 -0700 Subject: [PATCH 1/3] Update pre-commit config --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 61ba814437..cd61842f3f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black # It is recommended to specify the latest version of Python @@ -23,10 +23,10 @@ repos: name: isort (python) - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.5.5 + rev: v0.6.8 hooks: - id: ruff - repo: https://github.com/numpy/numpydoc - rev: "v1.8.0rc2" + rev: "v1.8.0" hooks: - id: numpydoc-validation From e9123078bf9524ac53645ebef847195239e2502b Mon Sep 17 00:00:00 2001 From: Andy Salnikov Date: Thu, 3 Oct 2024 10:59:42 -0700 Subject: [PATCH 2/3] Use nanoseconds for ingest_date for new repos (DM-46601) --- .../daf/butler/registry/datasets/byDimensions/_manager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/lsst/daf/butler/registry/datasets/byDimensions/_manager.py b/python/lsst/daf/butler/registry/datasets/byDimensions/_manager.py index 568f0a88a9..b2b6af3c35 100644 --- a/python/lsst/daf/butler/registry/datasets/byDimensions/_manager.py +++ b/python/lsst/daf/butler/registry/datasets/byDimensions/_manager.py @@ -43,6 +43,7 @@ # This has to be updated on every schema change +# TODO: 1.0.0 can be removed once all repos were migrated to 2.0.0. _VERSION_UUID = VersionTuple(1, 0, 0) # Starting with 2.0.0 the `ingest_date` column type uses nanoseconds instead # of TIMESTAMP. The code supports both 1.0.0 and 2.0.0 for the duration of @@ -572,9 +573,9 @@ def supportsIdGenerationMode(cls, mode: DatasetIdGenEnum) -> bool: def _newDefaultSchemaVersion(cls) -> VersionTuple: # Docstring inherited from VersionedExtension. - # By default return 1.0.0 so that older clients can still access new - # registries created with a default config. - return _VERSION_UUID + # By default return latest version so that new repos are created with + # nanoseconds ingest_date. + return _VERSION_UUID_NS def ingest_date_dtype(self) -> type: """Return type of the ``ingest_date`` column.""" From 35d2c7f5aa7b7299fa043399bf3cd6f9ecd464dd Mon Sep 17 00:00:00 2001 From: Andy Salnikov Date: Mon, 7 Oct 2024 11:18:50 -0700 Subject: [PATCH 3/3] Add news fragment --- doc/changes/DM-46601.misc.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changes/DM-46601.misc.md diff --git a/doc/changes/DM-46601.misc.md b/doc/changes/DM-46601.misc.md new file mode 100644 index 0000000000..47f4e4b763 --- /dev/null +++ b/doc/changes/DM-46601.misc.md @@ -0,0 +1 @@ +Update default version of `datasets` manager; new Butler repositories will use TAI nanoseconds for `ingest_date` column instead of database-native timestamps.