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

Don't split prompt and question in CredentialManager #113

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

bpoldrack
Copy link
Member

The title parameter of ui.question is intended for the prompting text, which is somewhat misleading by name.

In opposition to the Credential's in datalad core, the CredentialManager splits the prompting text and the input retrieval when asking for a property or secret by calling ui.message and then ui.question. While this is kinda fine with CLI, other ui backends like gooey can't handle this properly. In combination with patching create-sibling-ghlike this led to datalad/datalad-gooey#340.

In opposition to the `Credential`'s in datalad core, the
CredentialManager splits the prompting text and the input retrieval when
asking for a property or secret by calling `ui.message` and then
`ui.question`. While this is kinda fine with CLI, other `ui` backends
like gooey can't handle this properly (leading to
datalad/datalad-gooey#340).

The `title` parameter of `ui.question` is intended for the prompting
text, which is somewhat misleading by name.
@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Base: 94.41% // Head: 91.09% // Decreases project coverage by -3.32% ⚠️

Coverage data is based on head (256d2fa) compared to base (9e14273).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
- Coverage   94.41%   91.09%   -3.33%     
==========================================
  Files          38       38              
  Lines        3956     4232     +276     
==========================================
+ Hits         3735     3855     +120     
- Misses        221      377     +156     
Impacted Files Coverage Δ
datalad_next/credman.py 92.37% <100.00%> (-1.33%) ⬇️
datalad_next/_version.py 45.39% <0.00%> (-54.61%) ⬇️
datalad_next/gitremote/datalad_annex.py 89.89% <0.00%> (+0.27%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@mih mih left a comment

Choose a reason for hiding this comment

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

Makes a lot of sense! Thx!

@mih mih merged commit c4302a6 into datalad:main Oct 14, 2022
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