Bump wheel from 0.45.1 to 0.46.2#104
Closed
dependabot[bot] wants to merge 1 commit into
Closed
GitHub Actions / Test Results
failed
Jan 22, 2026 in 0s
1 errors, 146 pass in 21s
147 tests 146 ✅ 21s ⏱️
1 suites 0 💤
1 files 0 ❌ 1 🔥
Results for commit df28038.
Annotations
Check failure on line 0 in tests.hdx.api.test_ckan.TestCKAN
github-actions / Test Results
test_create_dataset (tests.hdx.api.test_ckan.TestCKAN) with error
test-results.xml [took 0s]
Raw output
failed on setup with "hdx.api.configuration.ConfigurationError: No HDX API key supplied as a parameter or in configuration!"
self = <tests.hdx.api.test_ckan.TestCKAN object at 0x7f459709d160>
@pytest.fixture(scope="class")
def configuration(self):
hdx_key = getenv("HDX_KEY_TEST")
> Configuration._create(
hdx_site="demo",
user_agent="test",
hdx_key=hdx_key,
)
tests/hdx/api/test_ckan.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/hdx/api/configuration.py:566: in _create
cls.setup(configuration, **kwargs)
src/hdx/api/configuration.py:527: in setup
cls._configuration = Configuration(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_stage_site': {'url': 'https://stage.data-humdata-org.ahcon...w.githubusercontent.com/OCHA-DAP/hdx-ckan/master/ckanext-hdx_package/ckanext/hdx_package/config/resource_formats.json'}
kwargs = {'hdx_key': '', 'hdx_site': 'demo', 'user_agent': 'test'}
hdx_base_config_found = False
hdx_base_config_dict = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_stage_site': {'url': 'https://stage.data-humdata-org.ahcon...w.githubusercontent.com/OCHA-DAP/hdx-ckan/master/ckanext-hdx_package/ckanext/hdx_package/config/resource_formats.json'}
hdx_base_config_json = ''
hdx_base_config_yaml = PosixPath('/home/runner/work/hdx-python-api/hdx-python-api/src/hdx/api/hdx_base_configuration.yaml')
hdx_config_found = False, hdx_config_dict = {}, hdx_config_json = ''
def __init__(self, **kwargs: Any) -> None:
super().__init__()
self._session = None
self._remoteckan = None
self._emailer = None
hdx_base_config_found = False
hdx_base_config_dict = kwargs.get("hdx_base_config_dict")
if hdx_base_config_dict:
hdx_base_config_found = True
logger.info("Loading HDX base configuration from dictionary")
hdx_base_config_json = kwargs.get("hdx_base_config_json", "")
if hdx_base_config_json:
if hdx_base_config_found:
raise ConfigurationError("More than one HDX base configuration given!")
hdx_base_config_found = True
logger.info(f"Loading HDX base configuration from: {hdx_base_config_json}")
hdx_base_config_dict = load_json(hdx_base_config_json)
hdx_base_config_yaml = kwargs.get("hdx_base_config_yaml", "")
if hdx_base_config_found:
if hdx_base_config_yaml:
raise ConfigurationError("More than one HDX base configuration given!")
else:
if not hdx_base_config_yaml:
hdx_base_config_yaml = Configuration.default_hdx_base_config_yaml
logger.info(
f"No HDX base configuration parameter. Using default base configuration file: {hdx_base_config_yaml}."
)
logger.info(f"Loading HDX base configuration from: {hdx_base_config_yaml}")
hdx_base_config_dict = load_yaml(hdx_base_config_yaml)
hdx_config_found = False
hdx_config_dict = kwargs.get("hdx_config_dict")
if hdx_config_dict:
hdx_config_found = True
logger.info("Loading HDX configuration from dictionary")
hdx_config_json = kwargs.get("hdx_config_json", "")
if hdx_config_json:
if hdx_config_found:
raise ConfigurationError("More than one HDX configuration given!")
hdx_config_found = True
logger.info(f"Loading HDX configuration from: {hdx_config_json}")
hdx_config_dict = load_json(hdx_config_json)
hdx_config_yaml = kwargs.get("hdx_config_yaml", "")
if hdx_config_found:
if hdx_config_yaml:
raise ConfigurationError("More than one HDX configuration given!")
else:
if not hdx_config_yaml:
hdx_config_yaml = Path(Configuration.default_hdx_config_yaml)
if not hdx_config_yaml.is_file():
hdx_config_yaml = hdx_config_yaml.with_suffix(".yml")
if hdx_config_yaml.is_file():
logger.info(
f"No HDX configuration parameter. Using default configuration file: {hdx_config_yaml}."
)
else:
logger.info(
f"No HDX configuration parameter and no configuration file at default path: {Configuration.default_hdx_config_yaml}."
)
hdx_config_yaml = None
hdx_config_dict = {}
if hdx_config_yaml:
logger.info(f"Loading HDX configuration from: {hdx_config_yaml}")
hdx_config_dict = load_yaml(hdx_config_yaml)
self.data = merge_two_dictionaries(hdx_base_config_dict, hdx_config_dict)
project_config_found = False
project_config_dict = kwargs.get("project_config_dict")
if project_config_dict is not None:
project_config_found = True
logger.info("Loading project configuration from dictionary")
project_config_json = kwargs.get("project_config_json", "")
if project_config_json:
if project_config_found:
raise ConfigurationError("More than one project configuration given!")
project_config_found = True
logger.info(f"Loading project configuration from: {project_config_json}")
project_config_dict = load_json(project_config_json)
project_config_yaml = kwargs.get("project_config_yaml", "")
if project_config_found:
if project_config_yaml:
raise ConfigurationError("More than one project configuration given!")
else:
if project_config_yaml:
logger.info(
f"Loading project configuration from: {project_config_yaml}"
)
project_config_dict = load_yaml(project_config_yaml)
else:
project_config_dict = {}
self.data = merge_two_dictionaries(hdx_base_config_dict, project_config_dict)
ua = kwargs.get("full_agent")
if ua:
self.user_agent = ua
else:
try:
self.user_agent = UserAgent.get(prefix=Configuration.prefix, **kwargs)
except UserAgentError:
self.user_agent = UserAgent.get(
prefix=Configuration.prefix, **self.data
)
hdx_url = kwargs.get("hdx_url")
if not hdx_url:
hdx_url = os.getenv("HDX_URL")
if not hdx_url:
hdx_url = self.data.get("hdx_url")
if hdx_url:
hdx_site = "custom"
self.hdx_site = "hdx_custom_site"
hdx_url = hdx_url.rstrip("/")
self.data[self.hdx_site] = {"url": hdx_url}
else:
hdx_site = kwargs.get("hdx_site")
if not hdx_site:
hdx_site = os.getenv("HDX_SITE")
if not hdx_site:
hdx_site = self.data.get("hdx_site")
if not hdx_site:
hdx_site = "stage"
self.hdx_site = f"hdx_{hdx_site}_site"
if self.hdx_site not in self.data:
raise ConfigurationError(
f"{self.hdx_site} not defined in configuration!"
)
hdx_read_only = kwargs.get("hdx_read_only")
if hdx_read_only is None:
hdx_read_only = self.data.get("hdx_read_only")
if hdx_read_only is None:
hdx_read_only = False
self.hdx_read_only = hdx_read_only
logger.info(f"Read only access to HDX: {str(self.hdx_read_only)}")
if self.hdx_site == "hdx_custom_site":
hdx_key = None
else:
hdx_key_site = f"hdx_key_{hdx_site}"
hdx_key = kwargs.get(hdx_key_site)
if not hdx_key:
hdx_key = os.getenv(f"HDX_KEY_{hdx_site.upper()}")
if not hdx_key:
hdx_key = self.data.get(hdx_key_site)
if not hdx_key:
hdx_key = kwargs.get("hdx_key")
if not hdx_key:
hdx_key = os.getenv("HDX_KEY")
if not hdx_key:
hdx_key = self.data.get("hdx_key")
if hdx_key:
self.hdx_key = hdx_key
return
if not self.hdx_read_only:
> raise ConfigurationError(
"No HDX API key supplied as a parameter or in configuration!"
)
E hdx.api.configuration.ConfigurationError: No HDX API key supplied as a parameter or in configuration!
src/hdx/api/configuration.py:224: ConfigurationError
Loading