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

add fancy completion using argcomplete #251

Merged
merged 3 commits into from
Nov 13, 2023
Merged

add fancy completion using argcomplete #251

merged 3 commits into from
Nov 13, 2023

Conversation

maurerle
Copy link
Member

While watching an interesting talk about tab-completion I tried to set this up for assume too.

Screencast.from.2023-11-12.14-46-15.webm

This suggests possible database paths and scenarios, as well as parameters for case_study based on the context.
By moving the script to the top folder, assume does not need to be imported if only calling the --help for example.

This should also work on macOS by running:

pip install -e .
eval "$(register-python-argcomplete assume)"

And also for Powershell on Windows using:

register-python-argcomplete --shell powershell assume | Out-String | Invoke-Expression (though I did not test it)

@maurerle maurerle requested a review from nick-harder November 12, 2023 13:53
Copy link

codecov bot commented Nov 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (53c7563) 78.28% compared to head (fa4234e) 78.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #251      +/-   ##
==========================================
- Coverage   78.28%   78.23%   -0.05%     
==========================================
  Files          40       39       -1     
  Lines        4242     4214      -28     
==========================================
- Hits         3321     3297      -24     
+ Misses        921      917       -4     
Flag Coverage Δ
pytest 78.23% <100.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
assume/common/scenario_loader.py 88.83% <100.00%> (+0.05%) ⬆️
assume/world.py 82.35% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maurerle maurerle force-pushed the fancy_autocompletion branch from d07d488 to 8ea0400 Compare November 12, 2023 15:49
@maurerle maurerle merged commit c32a623 into main Nov 13, 2023
3 of 4 checks passed
@maurerle maurerle deleted the fancy_autocompletion branch November 13, 2023 21:41
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