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-41761: Add Butler.query property #914

Merged
merged 4 commits into from
Dec 7, 2023
Merged

DM-41761: Add Butler.query property #914

merged 4 commits into from
Dec 7, 2023

Commits on Dec 6, 2023

  1. Add Butler._query context manager (DM-41761)

    This new method defines an interface for making complex queries
    on repository database. This initial commit includes only three
    convenience methods that are a close match  to the query methods that
    already exist in Registry. The implementation of that interface
    for DirectButler just forwards calls to SqlRegistry.
    
    RemoteButler does not implement those methods yet, we will need
    to define representation for queries and results that client exchanges
    server. This should become clearer as we add more methods to `Query`.
    andy-slac committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    7469f52 View commit details
    Browse the repository at this point in the history
  2. Rename tests/data/registry/datasets-uuid.yaml to datasets.yaml.

    As we do not have non-UUID manager anymore, there is no point
    keeping two dataset.yaml files.
    andy-slac committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    a67c5ae View commit details
    Browse the repository at this point in the history
  3. Add unit tests for Butler._query convenience methods.

    Many tests were just copied from `RegistryTests` to `ButlerQueryTests`
    replacing calls to registry methods with matching calls to `Butler.query`
    methods. Tests are implemented for DirectButler only, for both SQLite
    and Postgres backends.
    andy-slac committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    9b3788a View commit details
    Browse the repository at this point in the history
  4. Add news fragment

    andy-slac committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    0e06fc3 View commit details
    Browse the repository at this point in the history