Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-45767: Use public location of CollectionType #43

Merged
merged 4 commits into from
Aug 15, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ config.log
*.pyc
*_wrap.cc
*Lib.py
_build*

# Built by sconsUtils
version.py
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
Expand All @@ -21,6 +21,6 @@ repos:
name: isort (python)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.2
rev: v0.5.7
hooks:
- id: ruff
15 changes: 10 additions & 5 deletions python/lsst/daf/butler_migrate/script/rewrite_sqlite_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,17 @@
import tempfile
from collections import defaultdict

from lsst.daf.butler import Butler, Config, DatasetAssociation, DatasetId, DatasetRef, SkyPixDimension
from lsst.daf.butler import (
Butler,
CollectionType,
Config,
DatasetAssociation,
DatasetId,
DatasetRef,
SkyPixDimension,
)
from lsst.daf.butler.datastores.fileDatastore import FileDatastore
from lsst.daf.butler.direct_butler import DirectButler
from lsst.daf.butler.registry import CollectionType
from lsst.daf.butler.registry.databases.sqlite import SqliteDatabase
from lsst.daf.butler.registry.sql_registry import SqlRegistry
from lsst.daf.butler.transfers import RepoExportContext
Expand Down Expand Up @@ -269,9 +276,7 @@
# export/import.
BackendClass = get_class_of(source_butler._config["repo_transfer_formats", "yaml", "export"])
backend = BackendClass(yamlBuffer)
exporter = RepoExportContext(
source_butler._registry, source_butler._datastore, backend, directory=None, transfer=None
)
exporter = RepoExportContext(source_butler, backend, directory=None, transfer=None)

Check warning on line 279 in python/lsst/daf/butler_migrate/script/rewrite_sqlite_registry.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/daf/butler_migrate/script/rewrite_sqlite_registry.py#L279

Added line #L279 was not covered by tests

# Export all the collections.
for c in source_butler.registry.queryCollections(..., flattenChains=True, includeChains=True):
Expand Down
Loading