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

cli: list installed plugins and entry points #4155

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Mar 30, 2021

List installed plugins in cylc version --long.

Addresses cylc/cylc-admin#76.

$ cylc version --long
8.0b0 (/Users/oliver/miniforge/envs/cylc8)

Plugins:
  cylc-rose       0.1.0   /Users/oliver/cylc-rose
  cylc-uiserver   0.3.0   /Users/oliver/cylc-uiserver

Entry Points:
  cylc.command:
    hub = cylc.uiserver.scripts.hub:main
    uiserver = cylc.uiserver.scripts.uis:main
  cylc.post_install:
    rose_opts = cylc.rose.entry_points:post_install
  cylc.pre_configure:
    rose = cylc.rose.entry_points:pre_configure

Plugins are detected providing that they provide at least one cylc.* entry point and are not contained within the cylc.flow distribution.

Context:

We have now settled on the following points which we weren't clear on near the start of the project:

  • The cylc-meta version will match the cylc-flow version.
  • We should expect cylc-flow to be installed in all places where cylc-meta is installed.

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Appropriate tests are included (tricky but possible to test)
  • No change log entry required (why? e.g. invisible to users).
  • No documentation update required.
  • No dependency changes.

@oliver-sanders oliver-sanders added this to the cylc-8.0b1 milestone Mar 30, 2021
@oliver-sanders oliver-sanders self-assigned this Mar 30, 2021
# the concise version of the above is a shellcheck quoting nightmare:
# the concise version of the above is a bash quoting nightmare:
Copy link
Member Author

@oliver-sanders oliver-sanders Mar 30, 2021

Choose a reason for hiding this comment

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

Can't blame shellcheck for the Bash unsafe-by-defaut variable templating model!

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

Nice.

For testing (follow-up) I guess we could just install a small plugin into the test environment, and check the long form output?

@hjoliver hjoliver merged commit 8a7b95a into cylc:master Mar 31, 2021
@oliver-sanders oliver-sanders deleted the versions branch March 31, 2021 07:11
@oliver-sanders
Copy link
Member Author

oliver-sanders commented Mar 31, 2021

Might need to mock the two entry point discovery methods from pkg_resources to filter out any other plugins users may have installed. Will have a think.

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.

None yet

3 participants