Skip to content

Add CLI command to list projects - #236

Open
joezuntz wants to merge 2 commits into
LSSTDESC:mainfrom
joezuntz:main
Open

Add CLI command to list projects#236
joezuntz wants to merge 2 commits into
LSSTDESC:mainfrom
joezuntz:main

Conversation

@joezuntz

Copy link
Copy Markdown
Collaborator

This adds a new sub-command of dregs show, dregs show projects which lists all projects in the DB. I have occasionally had trouble remembering what I named a project and this is a quick helper to remind me!

(written with copilot).

Copilot AI review requested due to automatic review settings July 20, 2026 17:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new dregs show projects CLI subcommand to list “project” owners recorded in the registry, which helps users discover/recall project names currently present in the DB.

Changes:

  • Add a show projects subcommand to the CLI parser and dispatch.
  • Implement Query.get_project_list() to retrieve distinct project owners from datasets.
  • Add an end-to-end CLI test covering show projects output and filtering.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/end_to_end_tests/test_cli.py Adds an end-to-end test verifying show projects lists project owners and excludes non-project owners.
src/dataregistry/query.py Introduces get_project_list() to query and return unique project owners.
src/dataregistry_cli/show.py Adds projects handling to dregs_show to print the project list.
src/dataregistry_cli/cli.py Registers the show projects subcommand and wires it into main() dispatch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/dataregistry_cli/show.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants