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

feat(login): api key #840

Merged
merged 34 commits into from
Mar 5, 2024
Merged

feat(login): api key #840

merged 34 commits into from
Mar 5, 2024

Conversation

elboy3
Copy link
Contributor

@elboy3 elboy3 commented Mar 4, 2024

Shortcut:

https://app.shortcut.com/galileo/story/13305/dq-login-via-api-key

Description:

Allow for user login via api key

Tests:
Screen Shot 2024-02-26 at 6 09 22 PM

  • Local.
  • CI.

Building off of https://github.com/rungalileo/dataquality/pull/835/files

@elboy3 elboy3 mentioned this pull request Mar 4, 2024
2 tasks
@elboy3 elboy3 marked this pull request as ready for review March 5, 2024 00:35
@elboy3 elboy3 requested review from dcaustin33 and a team as code owners March 5, 2024 00:35
@@ -30,7 +30,7 @@
dataquality.get_insights()
"""

__version__ = "1.6.1"
__version__ = "2.0.1"
Copy link
Member

Choose a reason for hiding this comment

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

Let's also update this in pyproject.toml?

Comment on lines 34 to 36
if os.environ.get("PYTEST_XDIST_WORKER_COUNT"):
pid = os.getpid()
os.environ["SCIKIT_LEARN_DATA"] = f"~/scikit_learn_data_{pid}"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use a fixture?

@mock.patch("requests.post", side_effect=mocked_failed_login_requests)
def test_bad_login(mock_post: MagicMock, set_test_config: Callable) -> None:
set_test_config(token=None)
os.environ[GALILEO_AUTH_METHOD] = "email"
del os.environ["GALILEO_API_KEY"]
Copy link
Member

Choose a reason for hiding this comment

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

Ooh, ugly... Can we do this with monkey patch, please?

@elboy3 elboy3 requested a review from setu4993 March 5, 2024 19:00
Copy link
Member

@setu4993 setu4993 left a comment

Choose a reason for hiding this comment

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

🚀 🔑 🚪

@elboy3 elboy3 merged commit abd7679 into main Mar 5, 2024
3 checks passed
@elboy3 elboy3 deleted the feat/login/api-key-v2 branch March 5, 2024 21:23
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