Skip to content

Add kagglehub #1334

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

Merged
merged 2 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ RUN pip install mpld3 \
geoplot \
eli5 \
kaggle \
kagglehub \
mock \
pytest && \
/tmp/clean-layer.sh
Expand Down
15 changes: 15 additions & 0 deletions tests/test_kagglehub.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import unittest
from unittest import mock

import kagglehub


class TestKagglehub(unittest.TestCase):
def test_login(self):
with self.assertLogs('kagglehub', level='INFO') as l:
with mock.patch("builtins.input") as mock_input:
mock_input.side_effect = ["lastplacelarry", "some-key"]
# Disabling credentials validation since network access is disabled in unittest.
kagglehub.login(validate_credentials=False)

self.assertIn("credentials set", l.output[0])