-
Notifications
You must be signed in to change notification settings - Fork 0
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 #54 from GNS-Science/feature/53-odds-and-ends
changed location imports; improved documentation
- Loading branch information
Showing
9 changed files
with
44 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.8.2 | ||
current_version = 0.8.3 | ||
commit = True | ||
tag = True | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
::: nzshm_common.location | ||
options: | ||
filters: ["!^_"] |
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,8 +1,7 @@ | ||
__author__ = "GNS Science" | ||
__email__ = '[email protected]' | ||
__version__ = '0.8.2' | ||
__version__ = '0.8.3' | ||
|
||
from .location import location | ||
|
||
# Common classes at the top level for convenience | ||
from .location.coded_location import CodedLocation, CodedLocationBin | ||
|
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 +1,28 @@ | ||
""" | ||
This package provides classes and functions to handle geographical locations. There are a number of | ||
pre-set locations of interest to the NZ NSHM made availabe in this package. They can be accessed via | ||
the "location lists." See examples below. | ||
Classes: | ||
CodedLocation: a location defined by a latitude, longitude pair at a given resolution | ||
CodedLocationBin: a collection of CodedLocations bined at a given resolution (genrally lower than | ||
the resolution of the CodedLocations themselves) | ||
Functions: | ||
get_location_list_names: get the names of the "location lists" which are lists of pre-set locations | ||
get_location_list: get all locations from one or more location lists as CodedLocations | ||
commonly used in the analysis of the NZ NSHM. | ||
get_locations: convert a variety of location identifiers into an iterable of CodedLocations | ||
location_by_id: get information about a particular location in any of the "location lists" | ||
Example: | ||
```py | ||
>>> all_locations = get_location_list(get_location_list_names()) | ||
>>> nz_cities = get_location_list(["NZ"]) | ||
>>> wellington = location_by_id("WLG") | ||
>>> locs = get_locations(["WLG", "CHC"]) | ||
``` | ||
""" | ||
|
||
from .coded_location import CodedLocation, CodedLocationBin | ||
from .location import get_location_list, get_location_list_names, get_locations, location_by_id |
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,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "nzshm-common" | ||
version = "0.8.2" | ||
version = "0.8.3" | ||
homepage = "https://github.com/GNS-Science/nzshm-common-py" | ||
description = "A small pure python library for shared NZ NSHM data like locations." | ||
authors = ["GNS Science <[email protected]>"] | ||
|
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