Skip to content

Commit

Permalink
Pytest issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CHRISCARLON committed Sep 7, 2024
1 parent 3089877 commit 3f38a74
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 196 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/herding_cats_explorer_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Create pytest.ini
run: |
echo "[pytest]" > pytest.ini
echo "pythonpath = src/" >> pytest.ini
echo "pythonpath = HerdingCats/" >> pytest.ini
- name: Run tests
run: pytest tests/
17 changes: 9 additions & 8 deletions HerdingCats/herding_cats.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,13 +649,14 @@ def polars_data_loader(self, resource_data: Optional[List]) -> pl.DataFrame:

# Example usage...
if __name__ == "__main__":
with CkanCatSession("HUMANITARIAN") as session:
with CkanCatSession("subak") as session:
explore = CkanCatExplorer(session)
all_packages = explore.package_list_dictionary()
data = all_packages.get("cameroon-humanitarian-needs")
info = explore.package_show_info_json(data)
dl_link = explore.extract_resource_url(info, "cmr_hpc_needs_2024")

analyser = CkanCatAnalyser()
df = analyser.polars_data_loader(dl_link)
print(df)
print(all_packages)
# data = all_packages.get("cameroon-humanitarian-needs")
# info = explore.package_show_info_json(data)
# dl_link = explore.extract_resource_url(info, "cmr_hpc_needs_2024")

# analyser = CkanCatAnalyser()
# df = analyser.polars_data_loader(dl_link)
# print(df)
186 changes: 0 additions & 186 deletions HerdingCats/test.py

This file was deleted.

1 change: 0 additions & 1 deletion tests/test_endpoint_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import requests
from loguru import logger

# "https://data.gov.uk" FOR SOME READ THIS DOES NOT WORK???
CATALOGUES = [
"https://data.london.gov.uk",
"https://data.subak.org",
Expand Down

0 comments on commit 3f38a74

Please sign in to comment.