Skip to content

Commit

Permalink
also bugfix in lookup.py and test fail due to pkg dep
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhelle committed Sep 20, 2024
1 parent d889c9d commit 5279fbd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
fi
python -m pip install -e .
- name: Install test dependencies
# ToDo - remove pip install xgboost when flaml is fixed
run: |
if [ -f requirements-dev.txt ]; then
python -m pip install -r requirements-dev.txt
Expand All @@ -63,6 +64,7 @@ jobs:
python -m pip install Pygments respx pytest-xdist markdown beautifulsoup4 Pillow async-cache lxml
fi
python -m pip install "pandas>=1.3.0" "pygeohash>=1.2.0"
python -m pip install "xgboost"
- name: Prepare test dummy data
run: |
mkdir ~/.msticpy
Expand Down
20 changes: 10 additions & 10 deletions msticpy/context/lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@
import logging
import warnings
from collections import ChainMap
from typing import (
TYPE_CHECKING,
Any,
Callable,
ClassVar,
Iterable,
Mapping,
Sized,
)
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Iterable, Mapping, Sized

import nest_asyncio
import pandas as pd
Expand Down Expand Up @@ -59,6 +51,8 @@

logger: logging.Logger = logging.getLogger(__name__)

_HTTP_PROVIDER_LEGAL_KWARGS: list[str] = ["timeout", "ApiID", "AuthKey", "Instance"]


class ProgressCounter:
"""Progress counter for async tasks."""
Expand Down Expand Up @@ -811,7 +805,13 @@ def _load_providers(

# instantiate class sending args from settings to init
try:
provider_instance: Provider = provider_class(**(settings.args))
# filter out any args that are not valid for the provider
provider_args = {
key: value
for key, value in settings.args.items()
if key in _HTTP_PROVIDER_LEGAL_KWARGS
}
provider_instance: Provider = provider_class(**(provider_args))
except MsticpyConfigError as mp_ex:
# If the TI Provider didn't load, raise an exception
err_msg: str = (
Expand Down

0 comments on commit 5279fbd

Please sign in to comment.