Skip to content

Commit

Permalink
Update URL to point to dev server, fix dependency name in pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-turner-1 committed Jan 22, 2025
1 parent 943c9b4 commit 9643c17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies = [
"jsonschema",
"pooch",
"xarray",
"access-ipy-telemetry>=0.1.0",
"access-py-telemetry>=0.1.0",
]
dynamic = ["version"]

Expand Down
10 changes: 6 additions & 4 deletions src/access_nri_intake/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

import intake
import intake.catalog
from access_ipy_telemetry.api import ApiHandler
from access_ipy_telemetry.cli import configure_telemetry
from access_py_telemetry.api import ApiHandler
from access_py_telemetry.cli import configure_telemetry

from access_nri_intake.utils import get_catalog_fp

api_handler = ApiHandler()
api_handler.server_url = "https://reporting-dev.access-nri-store.cloud.edu.au"

CATALOG_NAME_FORMAT = (
r"^v(?P<yr>2[0-9]{3})\-(?P<mon>1[0-2]|0[1-9])\-(?P<day>0[1-9]|[1-2][0-9]|3[0-1])$"
Expand All @@ -22,12 +23,13 @@
cat_version = data._captured_init_kwargs.get("metadata", {}).get(
"version", "latest"
) # Get the catalog version number and set it to "latest" if it can't be found
configure_telemetry(["--enable", "--silent"])
api_handler.add_extra_field("catalog", {"catalog_version": cat_version})
except FileNotFoundError:
warnings.warn(
"Unable to access a default catalog location. Calling intake.cat.access_nri will not work.",
RuntimeWarning,
stacklevel=2,
)
data = intake.catalog.Catalog()
finally:
configure_telemetry(["--enable", "--silent"])
api_handler.add_extra_field("catalog", {"catalog_version": cat_version})

0 comments on commit 9643c17

Please sign in to comment.