-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from GNS-Science/feature/serialise_model_1.0.4
Add enriched json for the new NSHM_1.0.4 version
- Loading branch information
Showing
12 changed files
with
2,693 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
#! v1_0_0.py | ||
#! nshm_v1_0_4.py | ||
|
||
import itertools | ||
import json | ||
from pathlib import Path | ||
|
||
import dacite # for dataclass reconstitution | ||
|
||
import nzshm_model.source_logic_tree.SLT_v8_gmm_v2_final as slt_config # NOQA F401 | ||
from nzshm_model.source_logic_tree.slt_config import from_config | ||
import nzshm_model.source_logic_tree.SLT_v9p0p0 as slt_config # NOQA F401 | ||
from nzshm_model.source_logic_tree.logic_tree import SourceLogicTree | ||
|
||
version = 'NSHM_1.0.4' | ||
title = "NSHM version 1.0.4, corrected fault geometry" | ||
|
||
py_slt = Path(__file__).parent / "source_logic_tree" / "SLT_v9p0p0.py" | ||
json_slt = Path(__file__).parent / "source_logic_tree" / "SLT_v9p0p0.json" | ||
|
||
|
||
def source_logic_tree(): | ||
return from_config(py_slt, version, title) | ||
return dacite.from_dict(data_class=SourceLogicTree, data=json.load(open(json_slt))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "SLT_v8", | ||
"version": "NSHM_1.0.0", | ||
"title": "", | ||
"fault_system_lts": [ | ||
{ | ||
|
Oops, something went wrong.