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

Allow set key_filename/key_policy in computer configure #537

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Nov 10, 2023

There are some values for authinfo setting that are hardcoded. It should be able to be set from computer-configure dict. This is required by the CSCS MFA configure setup. The key filename is set in configure to cscs-key but not passed to the AuthInfo.

@unkcpz unkcpz requested a review from yakutovicha November 10, 2023 10:48
Comment on lines 886 to 898
if "proxy_jump" in self.computer_configure:
authparams["proxy_jump"] = self.computer_configure["proxy_jump"]

if "proxy_command" in self.computer_configure:
authparams["proxy_command"] = self.computer_configure["proxy_command"]

if "key_filename" in self.computer_configure:
authparams["key_filename"] = self.computer_configure["key_filename"]

if "key_policy" in self.computer_configure:
authparams["key_policy"] = self.computer_configure["key_policy"]
Copy link
Member Author

@unkcpz unkcpz Nov 10, 2023

Choose a reason for hiding this comment

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

Such if clauses can be simplified and moved to the authparams, but since there are still three sources for the setup, maybe good to keep it as it is?

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (140172a) 85.83% compared to head (e0edaa5) 85.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #537      +/-   ##
==========================================
+ Coverage   85.83%   85.88%   +0.04%     
==========================================
  Files          27       27              
  Lines        4610     4618       +8     
==========================================
+ Hits         3957     3966       +9     
+ Misses        653      652       -1     
Flag Coverage Δ
python-3.10 85.88% <100.00%> (+0.04%) ⬆️
python-3.8 85.91% <100.00%> (+0.04%) ⬆️
python-3.9 85.91% <100.00%> (+0.04%) ⬆️

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

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

@unkcpz unkcpz added this to the v2.1.0 milestone Nov 10, 2023
@unkcpz unkcpz force-pushed the fix/xx/key-policy-filename-configure branch from 937241a to 7bb157c Compare November 15, 2023 10:15
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
@unkcpz unkcpz force-pushed the fix/xx/key-policy-filename-configure branch from 7bb157c to 6f8ea9f Compare November 15, 2023 10:18
Copy link
Member

@yakutovicha yakutovicha left a comment

Choose a reason for hiding this comment

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

Thanks, @unkcpz, I have a bunch of little requests.

aiidalab_widgets_base/computational_resources.py Outdated Show resolved Hide resolved
aiidalab_widgets_base/computational_resources.py Outdated Show resolved Hide resolved
aiidalab_widgets_base/computational_resources.py Outdated Show resolved Hide resolved
aiidalab_widgets_base/computational_resources.py Outdated Show resolved Hide resolved
@unkcpz unkcpz force-pushed the fix/xx/key-policy-filename-configure branch from 6076b23 to 6d549b6 Compare November 15, 2023 22:56
@unkcpz unkcpz requested a review from yakutovicha November 15, 2023 23:41
Copy link
Member

@yakutovicha yakutovicha left a comment

Choose a reason for hiding this comment

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

LGTM!

@unkcpz unkcpz merged commit c4d4c66 into master Nov 16, 2023
13 checks passed
@unkcpz unkcpz deleted the fix/xx/key-policy-filename-configure branch November 16, 2023 08:12
unkcpz added a commit to unkcpz/aiidalab-widgets-base that referenced this pull request Nov 16, 2023
…#537)

This PR detects the unsaved changes in the already confirmed steps. If there are any unsaved changes, it will block the submit step and show the blocker messages there. This is achieved by observing the selected_index of the _wizard_app_widget, and comparing the related values.

---------

Co-authored-by: Jusong Yu <[email protected]>
Co-authored-by: Miki Bonacci <[email protected]>
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