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

Lazy entry points in verdi #6153

Merged
merged 34 commits into from
Oct 22, 2023
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ebf9fc0
WIP: Lazy entry points in verdi
danielhollas Oct 14, 2023
3b5dde9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 17, 2023
8559c37
Try running tests
danielhollas Oct 17, 2023
47aa3ba
Fix EntryPoint imports
danielhollas Oct 17, 2023
aebdb2a
Revert breaking changes to see if tests pass
danielhollas Oct 17, 2023
82cefcd
I guess this does not work?
danielhollas Oct 18, 2023
a0dd26f
One more
danielhollas Oct 18, 2023
15b498f
Break
danielhollas Oct 18, 2023
2d6b8b0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2023
9e01860
Remove click from aiida.orm
danielhollas Oct 18, 2023
a66ba9c
initialize to empty lists
danielhollas Oct 18, 2023
2f8697a
Lazy import tabulate, ~6ms
danielhollas Oct 18, 2023
ee62868
Lazy import inspect, ~7ms
danielhollas Oct 18, 2023
5c4488d
Lazy imports of stdlib, ~15ms
danielhollas Oct 18, 2023
fd15352
One more temporary fix for tests
danielhollas Oct 18, 2023
57e1f26
Lazy PluginParamType
danielhollas Oct 18, 2023
4174c80
lazy IdentifierParamType
danielhollas Oct 18, 2023
615a0aa
Update tests
danielhollas Oct 18, 2023
f036805
Merge branch 'main' into verdi/lazy-entry-points
danielhollas Oct 18, 2023
82b950a
Update aiida/cmdline/utils/echo.py
danielhollas Oct 20, 2023
ceb3ec9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 20, 2023
8d88334
Minor refactoring and typing fix in configuration.py
danielhollas Oct 20, 2023
7a2cc44
review cleanup
danielhollas Oct 20, 2023
2b82927
Update docstring
danielhollas Oct 20, 2023
d4b2491
Optimization and typing in params/types/plugin.py
danielhollas Oct 20, 2023
3e945c0
Enable typing for params/types/plugin.py|identifier.py and aiida/mana…
danielhollas Oct 20, 2023
5d398c6
Move _get_valid_groups
danielhollas Oct 20, 2023
347f1b0
ugh, stupid tui docs
danielhollas Oct 20, 2023
a3ca765
fix test_environment_variable_not_set
danielhollas Oct 20, 2023
4b0d8aa
Merge branch 'main' into verdi/lazy-entry-points
danielhollas Oct 20, 2023
76b480e
review + enable typing for cmdline/groups/dynamic.py
danielhollas Oct 21, 2023
bec3662
Improve typing
danielhollas Oct 21, 2023
d356545
Merge branch 'main' into verdi/lazy-entry-points
danielhollas Oct 21, 2023
6930e79
Fix docs
sphuber Oct 22, 2023
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
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 18, 2023
commit 2d6b8b0b622c646762b39aa1c4626ddaf49217e5
1 change: 1 addition & 0 deletions aiida/cmdline/params/types/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ def convert(self, value, param, ctx):
into an actual entry point. Will raise click.BadParameter if validation fails.
"""
from importlib_metadata import EntryPoint

# If the value is already of the expected return type, simply return it. This behavior is new in `click==8.0`:
# https://click.palletsprojects.com/en/8.0.x/parameters/#implementing-custom-types
if isinstance(value, EntryPoint):
Expand Down