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

Create Login #2

Merged
merged 10 commits into from
Apr 26, 2024
Merged

Create Login #2

merged 10 commits into from
Apr 26, 2024

Conversation

searscr
Copy link
Collaborator

@searscr searscr commented Apr 24, 2024

Short description of the changes:

This creates the Login Dialog and a Login widget that can be used in other neutrons projects to provide a simple interface for logging in to ONCat.

Read the docs page

Manual test for the reviewer

Test out the widget and dialog with the following commands.

git clone [email protected]:neutrons/pyoncatqt.git
conda env create -f environement.yml
conda activate pyoncaqt-developer
pip install -e .
pyoncatqt

References

Relates to EWM #4464

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

self.client_id = get_data("login.oncat", f"{key}_id")
if not self.client_id:
raise ValueError(f"Invalid key: {key}, ONCat client ID not found")
return
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can omitt that.

self.oncat_url = get_data("login.oncat", "oncat_url")
self.client_id = get_data("login.oncat", f"{key}_id")
if not self.client_id:
raise ValueError(f"Invalid key: {key}, ONCat client ID not found")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you put a more descriptive message: e.g. Invalid module {key}. No OnCat client Id is found for this application.

Copy link
Collaborator

@mpatrou mpatrou left a comment

Choose a reason for hiding this comment

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

Tested locally. It looks very good!

@searscr searscr merged commit 128ff78 into next Apr 26, 2024
3 checks passed
@searscr searscr deleted the make_things branch April 26, 2024 22:10
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.

3 participants