Skip to content

Commit

Permalink
doc improvements; docs layout; theme switcher; update mkdocs libs;
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbc committed May 27, 2024
1 parent 26e55ab commit e98430c
Show file tree
Hide file tree
Showing 10 changed files with 408 additions and 525 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
- ths_r4_query
- migration/ths_r4_sanity
- extract datasets directly from hdf5
- more documtention

### Changed
- switch to nzshm-common#pre-release branch
- switch to nzshm-model#pre-release branch
- move outdated scripts to scripts/legacy
- new documentation theme

## [0.8.0] - 2024-02
### Added
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@
* PyPI: <https://pypi.org/project/toshi-hazard-store/>
* Free software: GPL-3.0-only


This library provides different hazard storage options used withon NSHM hazard pipelines. Third parties may wish to
process models based on, or similar in scale to the NZSHM 22.

## Features

* Manage Openquake hazard results in AWS DynamodDB tables defined herein.
* Option for caching using sqlite, See NZSHM22_HAZARD_STORE_LOCAL_CACHE environment variable.
* Option to use a local sqlite store instead of DynamoDB, see THS_USE_SQLITE_ADAPTER and THS_SQLITE_FOLDER variables.
* cli tools for end users
* Extract realisations from PSHA (openquake) hazard calcs and store these in Parquet dataset.
* Manage Openquake hazard results in AWS DynamodDB tables defined herein (used by NSHM project).
* CLI tools for end users
* **Legacy features:**
* Option for caching using sqlite, See NZSHM22_HAZARD_STORE_LOCAL_CACHE environment variable.
* Option to use a local sqlite store instead of DynamoDB, see THS_USE_SQLITE_ADAPTER and THS_SQLITE_FOLDER variables.

## Credits

Expand Down
59 changes: 0 additions & 59 deletions docs/domain_model/demo_thp_stategies.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Newest first:
These are outputs from the [ths_r4_sanity script](../cli/ths_r4_sanity.md)

## ARROW_DIRECT May 10

first test pass

```
INFO:pynamodb.settings:Override settings for pynamo available /etc/pynamodb/global_default_settings.py
querying arrow/parquet dataset DIRECT_CLASSIC
calculation_id, uniq_rlzs, uniq_locs, uniq_imts, uniq_gmms, uniq_srcs, uniq_vs30, consistent
Expand Down Expand Up @@ -58,6 +59,7 @@ T3BlbnF1YWtlSGF6YXJkVGFzazoxMzI4NTEw, 2262897, 3991, 27, 21, 1, 1, True
T3BlbnF1YWtlSGF6YXJkVGFzazoxMzI4NTEy, 2262897, 3991, 27, 21, 1, 1, True
Grand total: 96981300
```

## NLOC IMT defragged

Expand Down
File renamed without changes.
69 changes: 40 additions & 29 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ watch:
- toshi_hazard_store
- scripts
nav:
- Home: index.md
- Installation: installation.md
- Configuration: configuration.md
- Usage: usage.md
# - Local configuration: sqlite_adapter_usage.md
- Home:
- README: index.md
- Installation: installation.md
- Configuration: configuration.md
- Usage:
- Vanilla (DynamodDB): usage.md
- LOCAL (sqlite): sqlite_adapter_usage.md
# - Parquet: TODO.md
- CLI tools:
- store_hazard_v4: cli/store_hazard_v4.md
- ths_r4_import: cli/ths_r4_import.md
Expand All @@ -21,36 +24,48 @@ nav:
- ths_r4_filter_dataset: cli/ths_r4_filter_dataset.md
- ths_r4_query: cli/ths_r4_query.md
- Legacy scripts: cli/legacy.md
- Migrations:
# - Overview: migration_overview.md
- Hazard dataset May-2024: migration/hazard_import_processing-may-2024.md
- Arrow sanity tests: migration/arrow_sanity_testing.md
- Rev4 migration testing: migration/revision_4_migration_testing.md
- Rev4 disagg testing: migration/revision_4_disagg_testing.md
- Query API:
- Hazard: hazard_query_api.md
- Gridded Hazard: gridded_hazard_query_api.md
- Hazard Disaggregation: hazard_disagg_query_api.md
- Database Models:
- New Hazard: domain_model/proposed_hazard_models.md
- Hazard: domain_model/openquake_models.md
- Gridded Hazard: domain_model/gridded_hazard_models.md
- Hazard Disaggregation: domain_model/disaggregation_models.md
- PROPOSED:
- Hazard: domain_model/proposed_hazard_models.md
- Migration Tests: domain_model/revision_4_migration_testing.md
- Contributing: contributing.md
- Changelog: changelog.md

theme:
name: material
language: en
#logo: assets/logo.png
palette:
scheme: preference
primary: indigo
accent: indigo
# Palette toggle for light mode
- scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- navigation.indexes
- navigation.instant
- navigation.tabs.sticky
- navigation.tabs
# - navigation.tabs.sticky

markdown_extensions:
- mkdocs-click
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.critic
- pymdownx.caret
- pymdownx.mark
Expand All @@ -65,9 +80,8 @@ markdown_extensions:
- pymdownx.details
- admonition
- toc:
baselevel: 2
baselevel: 1
permalink: true
slugify: !!python/name:pymdownx.slugs.uslugify
- meta
- pymdownx.superfences:
custom_fences:
Expand All @@ -80,29 +94,26 @@ plugins:
- search:
lang: en
- mkdocstrings:
watch:
- toshi_hazard_store
- scripts
handlers:
python:
options:
show_submodules: true

extra:
social:
- icon: fontawesome/brands/twitter
# replace with your own tweet link below
link: https://github.com/waynerv/cookiecutter-pypackage
name: Tweet
- icon: fontawesome/brands/facebook
# replace with your own facebook link below
link: https://github.com/waynerv/cookiecutter-pypackage
name: Facebook
# - icon: fontawesome/brands/twitter
# # replace with your own tweet link below
# link: https://github.com/waynerv/cookiecutter-pypackage
# name: Tweet
# - icon: fontawesome/brands/facebook
# # replace with your own facebook link below
# link: https://github.com/waynerv/cookiecutter-pypackage
# name: Facebook
- icon: fontawesome/brands/github
link: https://github.com/GNS-Science/toshi-hazard-store
name: Github
- icon: material/email
link: "mailto:[email protected].nz"
link: "mailto:[email protected].nz"
# to enable disqus, uncomment the following and put your disqus id below
# disqus: disqus_id
# uncomment the following and put your google tracking id below to enable GA
Expand Down
Loading

0 comments on commit e98430c

Please sign in to comment.