Skip to content

Commit

Permalink
Merge pull request #66 from GNS-Science/update-common
Browse files Browse the repository at this point in the history
Update nzshm-common dependency
  • Loading branch information
chrisdicaprio authored Nov 20, 2024
2 parents 77efd33 + 2b734bd commit fa34800
Show file tree
Hide file tree
Showing 24 changed files with 44 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.7.9
current_version = 0.7.10
commit = True
tag = True

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.7.10] - 2024-11-20

### Changed
- updated nzshm-common dependency

## [0.7.9] - 2024-02-26

### Changed
Expand Down
21 changes: 14 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool]
[tool.poetry]
name = "toshi-hazard-store"
version = "0.7.9"
version = "0.7.10"
homepage = "https://github.com/GNS-Science/toshi-hazard-store"
description = "Library for saving and retrieving NZHSM openquake hazard results with convenience (uses AWS Dynamodb)."
authors = ["GNS Science <[email protected]>"]
Expand Down Expand Up @@ -38,12 +38,12 @@ python = ">=3.10,<3.13"
# urllib3 = ">2"
pandas = "~2.0.3"
numpy = "^1.26.4"
nzshm-common = "^0.6.1"
pynamodb-attributes = "^0.4.0"
pynamodb = "^5.5.1"
openquake-engine = {version = "^3.18.0", optional = true}
fiona = {version = "^1.9.5", optional = true}
networkx = {version = "^3.2.1", optional = true}
nzshm-common = {git = "https://github.com/GNS-Science/nzshm-common-py.git", rev = "pre-release"}

[tool.poetry.group.dev.dependencies]
black = { version = "^22.3"}
Expand Down
2 changes: 1 addition & 1 deletion scripts/nz_binned_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Dict, List, Tuple

from nzshm_common.grids.region_grid import load_grid
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from nzshm_common.location.location import LOCATIONS_BY_ID


Expand Down
4 changes: 2 additions & 2 deletions scripts/ths_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import click
import pandas as pd
from nzshm_common.grids import RegionGrid, load_grid
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location.location import LOCATION_LISTS, LOCATIONS, location_by_id
from nzshm_common.location import CodedLocation, location_by_id
from nzshm_common.location.location import LOCATION_LISTS, LOCATIONS

from toshi_hazard_store import model, query
from toshi_hazard_store.config import DEPLOYMENT_STAGE, LOCAL_CACHE_FOLDER, REGION
Expand Down
4 changes: 2 additions & 2 deletions scripts/ths_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import click
import pandas as pd
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location.location import LOCATIONS, location_by_id
from nzshm_common.location import CodedLocation, location_by_id
from nzshm_common.location.location import LOCATIONS

from toshi_hazard_store import model, query, query_v3
from toshi_hazard_store.config import DEPLOYMENT_STAGE, LOCAL_CACHE_FOLDER, REGION
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pynamo_disagg_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np
from moto import mock_dynamodb
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation

from toshi_hazard_store import model

Expand Down
2 changes: 1 addition & 1 deletion tests/test_pynamo_models_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pynamodb.exceptions
from moto import mock_dynamodb
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation

from toshi_hazard_store import model

Expand Down
2 changes: 1 addition & 1 deletion tests/test_query_disaggs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import numpy as np
from moto import mock_dynamodb
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from nzshm_common.location.location import LOCATIONS_BY_ID

from toshi_hazard_store import model, query
Expand Down
2 changes: 1 addition & 1 deletion tests/test_query_hazard_agg_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from unittest.mock import patch

from moto import mock_dynamodb
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from nzshm_common.location.location import LOCATIONS_BY_ID

from toshi_hazard_store import model, query_v3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_query_hazard_agg_vs30_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from unittest.mock import patch

from moto import mock_dynamodb
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from nzshm_common.location.location import LOCATIONS_BY_ID

from toshi_hazard_store import model, query_v3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_query_hazard_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from unittest.mock import patch

from moto import mock_dynamodb
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from nzshm_common.location.location import LOCATIONS_BY_ID

from toshi_hazard_store import model, query
Expand Down
2 changes: 1 addition & 1 deletion tests/test_query_rlzs_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import unittest

from moto import mock_dynamodb
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from nzshm_common.location.location import LOCATIONS_BY_ID

from toshi_hazard_store import model, query_v3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_query_rlzs_vs30_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import unittest

from moto import mock_dynamodb
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from nzshm_common.location.location import LOCATIONS_BY_ID

from toshi_hazard_store import model, query_v3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_site_specific_vs30.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import unittest

from moto import mock_dynamodb
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation

from toshi_hazard_store import model

Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import unittest

from nzshm_common.grids.region_grid import load_grid
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation


class TestCodedLocation(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion toshi_hazard_store/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = """GNS Science"""
__email__ = '[email protected]'
__version__ = '0.7.9'
__version__ = '0.7.10'

import toshi_hazard_store.model as model
import toshi_hazard_store.query.hazard_query as query_v3 # alias for clients using deprecated module name
2 changes: 1 addition & 1 deletion toshi_hazard_store/model/disagg_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import datetime, timezone

import numpy as np
from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from pynamodb.attributes import UnicodeAttribute
from pynamodb_attributes import FloatAttribute

Expand Down
2 changes: 1 addition & 1 deletion toshi_hazard_store/model/location_indexed_model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import uuid
from datetime import datetime, timezone

from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from pynamodb.attributes import UnicodeAttribute, VersionAttribute
from pynamodb.models import Model
from pynamodb_attributes import FloatAttribute, TimestampAttribute
Expand Down
2 changes: 1 addition & 1 deletion toshi_hazard_store/model/openquake_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
from typing import Iterable, Iterator, Sequence, Union

from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from pynamodb.attributes import JSONAttribute, ListAttribute, NumberAttribute, UnicodeAttribute, UnicodeSetAttribute
from pynamodb.indexes import AllProjection, LocalSecondaryIndex
from pynamodb.models import Model
Expand Down
2 changes: 1 addition & 1 deletion toshi_hazard_store/query/disagg_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import logging
from typing import Iterable, Iterator, List, Type, Union

from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation
from pynamodb.expressions.condition import Condition

from toshi_hazard_store.model import (
Expand Down
2 changes: 1 addition & 1 deletion toshi_hazard_store/query/hazard_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import logging
from typing import Iterable, Iterator, Union

from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation

import toshi_hazard_store.model as model

Expand Down
2 changes: 1 addition & 1 deletion toshi_hazard_store/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Common utilities."""

from nzshm_common.location.code_location import CodedLocation
from nzshm_common.location import CodedLocation


def normalise_site_code(oq_site_object: tuple, force_normalized: bool = False) -> CodedLocation:
Expand Down

0 comments on commit fa34800

Please sign in to comment.