diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index 4f8a8c76..90381a07 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -191,7 +191,7 @@ RUN JAXVER=$(pip freeze | grep -e "^jax==") && \ "matplotlib<3.8.0" \ seaborn \ python-dateutil dask dask-expr igraph \ - pyyaml joblib husl geopy mne pyshp \ + pyyaml joblib geopy mne pyshp \ pandas \ polars \ flax \ @@ -242,7 +242,6 @@ RUN apt-get install -y libfreetype6-dev && \ wordcloud \ xgboost \ pydot \ - python-Levenshtein \ hep_ml && \ # NLTK Project datasets mkdir -p /usr/share/nltk_data && \ @@ -309,8 +308,6 @@ RUN pip install mpld3 \ arrow \ nilearn \ nibabel \ - pronouncing \ - markovify \ imgaug \ preprocessing \ path.py \ @@ -325,7 +322,6 @@ RUN pip install mpld3 \ hyperopt \ fitter \ langid \ - trueskill \ # Useful data exploration libraries (for missing data and generating reports) missingno \ pandas-profiling \ @@ -349,7 +345,6 @@ RUN pip install mpld3 \ SimpleITK \ hmmlearn \ gplearn \ - PyAstronomy \ squarify \ fuzzywuzzy \ python-louvain \ @@ -379,19 +374,16 @@ RUN pip install mpld3 \ kaggle \ kagglehub \ google-generativeai \ - mock \ pytest && \ /tmp/clean-layer.sh RUN rm -rf /opt/conda/lib/python3.10/site-packages/numpy-1.23.5.dist-info* -RUN pip install tensorpack && \ - # Add google PAIR-code Facets - cd /opt/ && git clone https://github.com/PAIR-code/facets && cd facets/ && jupyter nbextension install facets-dist/ --user && \ + # Add google PAIR-code Facets +RUN cd /opt/ && git clone https://github.com/PAIR-code/facets && cd facets/ && jupyter nbextension install facets-dist/ --user && \ export PYTHONPATH=$PYTHONPATH:/opt/facets/facets_overview/python/ && \ pip install kmodes --no-dependencies && \ pip install librosa \ polyglot \ - mmh3 \ sentencepiece \ cufflinks \ lime \ @@ -606,8 +598,7 @@ RUN apt-get install tesseract-ocr -y && \ pip install pytesseract \ wand \ pdf2image \ - PyPDF \ - pyocr && \ + PyPDF && \ /tmp/clean-layer.sh ENV TESSERACT_PATH=/usr/bin/tesseract diff --git a/tests/test_levenshtein.py b/tests/test_levenshtein.py deleted file mode 100644 index 2ea45c98..00000000 --- a/tests/test_levenshtein.py +++ /dev/null @@ -1,9 +0,0 @@ -import unittest - -import Levenshtein - -class TestLevenshtein(unittest.TestCase): - def test_distance(self): - distance = Levenshtein.distance('Levenshtein', 'Lenvinsten') - - self.assertEqual(4, distance) \ No newline at end of file diff --git a/tests/test_rapidfuzz.py b/tests/test_rapidfuzz.py deleted file mode 100644 index e0cdf93a..00000000 --- a/tests/test_rapidfuzz.py +++ /dev/null @@ -1,13 +0,0 @@ -import unittest - -# needed for the Word Error Rate metric: -# competitions/metrics/python/deployed_metrics/general_use_metrics/word_error_rate.py -import rapidfuzz - -class TestRapidfuzz(unittest.TestCase): - def test_distance(self): - distance = rapidfuzz.distance.Levenshtein.distance( - 'Levenshtein', 'Lenvinsten' - ) - - self.assertEqual(4, distance) diff --git a/tests/test_user_secrets.py b/tests/test_user_secrets.py index 9cb9c7c5..67c628f7 100644 --- a/tests/test_user_secrets.py +++ b/tests/test_user_secrets.py @@ -7,7 +7,7 @@ from test.support.os_helper import EnvironmentVarGuard from urllib.parse import urlparse from datetime import datetime, timedelta -import mock +from unittest.mock import Mock, patch from google.auth.exceptions import DefaultCredentialsError from google.cloud import bigquery @@ -182,11 +182,11 @@ def test_fn(): self._test_client(test_fn, '/requests/GetUserSecretByLabelRequest', {'Label': "__gcloud_sdk_auth__"}, secret=secret) - @mock.patch('kaggle_secrets.datetime') + @patch('kaggle_secrets.datetime') def test_get_access_token_succeeds(self, mock_dt): secret = '12345' now = datetime(1993, 4, 24) - mock_dt.utcnow = mock.Mock(return_value=now) + mock_dt.utcnow = Mock(return_value=now) def call_get_bigquery_access_token(): client = UserSecretsClient()