Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/run-python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
python -m pip install --upgrade pip
pip install --upgrade hatch
- name: Test with hatch/pytest
env:
HDX_KEY_TEST: ${{ secrets.HDX_BOT_SCRAPERS_API_TOKEN }}
GSHEET_AUTH: ${{ secrets.GSHEET_AUTH }}
run: |
hatch run test:test
- name: Check styling
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies = [
"defopt>=6.4.0",
"email_validator",
"hdx-python-country>=3.6.4",
"hdx-python-utilities>=3.6.4",
"hdx-python-utilities>=3.6.5",
"libhxl>=5.2",
"makefun",
"ndg-httpsclient",
Expand All @@ -57,7 +57,7 @@ content-type = "text/markdown"
Homepage = "https://github.com/OCHA-DAP/hdx-python-api"

[project.optional-dependencies]
test = ["pytest", "pytest-cov"]
test = ["pytest", "pytest-cov", "gspread"]
dev = ["pre-commit"]


Expand Down
53 changes: 38 additions & 15 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ attrs==23.2.0
# frictionless
# jsonlines
# jsonschema
cachetools==5.3.3
# via google-auth
certifi==2024.2.2
# via requests
cffi==1.16.0
Expand All @@ -27,32 +29,40 @@ click==8.1.7
# via typer
colorama==0.4.6
# via typer
coverage[toml]==7.4.1
coverage[toml]==7.4.3
# via
# coverage
# pytest-cov
cryptography==42.0.2
cryptography==42.0.5
# via pyopenssl
defopt==6.4.0
# via hdx-python-api (pyproject.toml)
distlib==0.3.8
# via virtualenv
dnspython==2.5.0
dnspython==2.6.1
# via email-validator
docopt==0.6.2
# via
# ckanapi
# num2words
docutils==0.20.1
# via defopt
email-validator==2.1.0.post1
email-validator==2.1.1
# via hdx-python-api (pyproject.toml)
et-xmlfile==1.1.0
# via openpyxl
filelock==3.13.1
# via virtualenv
frictionless==5.16.1
# via hdx-python-utilities
google-auth==2.28.1
# via
# google-auth-oauthlib
# gspread
google-auth-oauthlib==1.2.0
# via gspread
gspread==6.0.2
# via hdx-python-api (pyproject.toml)
hdx-python-country==3.6.4
# via hdx-python-api (pyproject.toml)
hdx-python-utilities==3.6.5
Expand All @@ -61,7 +71,7 @@ hdx-python-utilities==3.6.5
# hdx-python-country
humanize==4.9.0
# via frictionless
identify==2.5.34
identify==2.5.35
# via pre-commit
idna==3.6
# via
Expand Down Expand Up @@ -95,7 +105,7 @@ makefun==1.15.2
# via hdx-python-api (pyproject.toml)
markdown-it-py==3.0.0
# via rich
marko==2.0.2
marko==2.0.3
# via frictionless
markupsafe==2.1.5
# via jinja2
Expand All @@ -107,6 +117,8 @@ nodeenv==1.8.0
# via pre-commit
num2words==0.5.13
# via quantulum3
oauthlib==3.2.2
# via requests-oauthlib
openpyxl==3.1.2
# via hdx-python-utilities
packaging==23.2
Expand All @@ -123,19 +135,23 @@ ply==3.11
# libhxl
pockets==0.9.1
# via sphinxcontrib-napoleon
pre-commit==3.6.1
pre-commit==3.6.2
# via hdx-python-api (pyproject.toml)
pyasn1==0.5.1
# via
# hdx-python-api (pyproject.toml)
# ndg-httpsclient
# pyasn1-modules
# rsa
pyasn1-modules==0.3.0
# via google-auth
pycparser==2.21
# via cffi
pydantic==2.6.1
pydantic==2.6.3
# via
# frictionless
# inflect
pydantic-core==2.16.2
pydantic-core==2.16.3
# via pydantic
pygments==2.17.2
# via rich
Expand All @@ -147,7 +163,7 @@ pyphonetics==0.5.3
# via hdx-python-country
pyrsistent==0.20.0
# via jsonschema
pytest==8.0.0
pytest==8.0.2
# via
# hdx-python-api (pyproject.toml)
# pytest-cov
Expand Down Expand Up @@ -180,12 +196,17 @@ requests==2.31.0
# hdx-python-api (pyproject.toml)
# libhxl
# requests-file
# requests-oauthlib
requests-file==2.0.0
# via hdx-python-utilities
requests-oauthlib==1.3.1
# via google-auth-oauthlib
rfc3986==2.0.0
# via frictionless
rich==13.7.0
rich==13.7.1
# via typer
rsa==4.9
# via google-auth
ruamel-yaml==0.18.6
# via hdx-python-utilities
ruamel-yaml-clib==0.2.8
Expand All @@ -203,6 +224,8 @@ six==1.16.0
# sphinxcontrib-napoleon
sphinxcontrib-napoleon==0.7
# via defopt
strenum==0.4.15
# via gspread
stringcase==1.2.0
# via frictionless
structlog==24.1.0
Expand All @@ -217,7 +240,7 @@ typer[all]==0.9.0
# via
# frictionless
# typer
typing-extensions==4.9.0
typing-extensions==4.10.0
# via
# frictionless
# inflect
Expand All @@ -228,21 +251,21 @@ unidecode==1.3.8
# via
# libhxl
# pyphonetics
urllib3==2.2.0
urllib3==2.2.1
# via
# libhxl
# requests
validators==0.22.0
# via frictionless
virtualenv==20.25.0
virtualenv==20.25.1
# via pre-commit
wheel==0.42.0
# via libhxl
xlrd==2.0.1
# via hdx-python-utilities
xlrd3==1.1.0
# via libhxl
xlsxwriter==3.1.9
xlsxwriter==3.2.0
# via tableschema-to-template
xlwt==1.3.0
# via hdx-python-utilities
Expand Down
4 changes: 2 additions & 2 deletions src/hdx/api/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def __init__(self, **kwargs: Any) -> None:
f"No HDX configuration parameter and no configuration file at default path: {Configuration.default_hdx_config_yaml}."
)
hdx_config_yaml = None
hdx_config_dict = dict()
hdx_config_dict = {}
if hdx_config_yaml:
logger.info(
f"Loading HDX configuration from: {hdx_config_yaml}"
Expand Down Expand Up @@ -178,7 +178,7 @@ def __init__(self, **kwargs: Any) -> None:
)
project_config_dict = load_yaml(project_config_yaml)
else:
project_config_dict = dict()
project_config_dict = {}

self.data = merge_two_dictionaries(
hdx_base_config_dict, project_config_dict
Expand Down
Loading