Skip to content

Commit

Permalink
Merge pull request #151 from IN-CORE/release-1.9.0
Browse files Browse the repository at this point in the history
Release 1.9.0
  • Loading branch information
ywkim312 committed Dec 13, 2023
2 parents b53b2f3 + 77da8a8 commit 3918648
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
echo "TOKEN=${{ secrets.TEST_PYPI_API_TOKEN }}" >> $GITHUB_ENV
fi
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
vars: [ { python-version: '3.8', sleep: '0s' }, { python-version: '3.9', sleep: '60s' } ]
# { python-version: '3.10', sleep: '120s' }, { python-version: '3.11', sleep: '180s' } ]
vars: [ { python-version: '3.9', sleep: '0s' }, { python-version: '3.10', sleep: '60s' },
{ python-version: '3.11', sleep: '120s' }, { python-version: '3.12', sleep: '180s' } ]
name: Python ${{ matrix.vars.python-version }} Test
steps:
- name: Checkout source code
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ tests/.incorepw

# incore download data or test data
tests/data/
tests/pyincore_viz/data/
cache_data/
original/

Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.9.0] - 2023-12-13
### Added
- Local hazard visualization [#143](https://github.com/IN-CORE/pyincore-viz/issues/143)

### Changed
- Clean dependencies [#145](https://github.com/IN-CORE/pyincore-viz/issues/145)

## [1.8.4] - 2023-11-08
### Updated
- Basemap api updated to use open street map [#138](https://github.com/IN-CORE/pyincore-viz/issues/138)
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ In case of `conda`, the package management and deployment tool
is called `anaconda`. Create the environment from the terminal at the project
folder (called `pyincore_viz` here) and activate it:
```
conda create -n pyincore_viz python=3.7
conda create -n pyincore_viz python=3.9
conda activate pyincore_viz
```
or
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
author = 'Yong Wook Kim'

# The short X.Y version
version = '1.8'
version = '1.9'
# The full version, including alpha/beta/rc tags
release = '1.8.4'
release = '1.9.0'

# -- General configuration ---------------------------------------------------

Expand Down
12 changes: 6 additions & 6 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ dependencies:
- branca>=0.3.0
- contextily>=1.0.0
- deprecated
- geopandas>=0.6.1
- geopandas>=0.14.0
- ipyleaflet>=0.16.0
- ipywidgets>=7.6.0
- lxml>=4.6.3
- matplotlib>=2.1.0
- networkx>=2.2
- numpy>=1.16.1
- matplotlib>=3.8.0
- networkx>=3.2.1
- numpy>=1.26.0,<2.0a0
- owslib>=0.17.1
- pandas>=0.24.1
- pandas>=2.1.2
- pillow
- pycodestyle>=2.6.0
- pyincore>=1.11.0
- pytest>=3.9.0
- python-jose>=3.0
- rasterio>=1.3.3
- rasterio>=1.3.9
93 changes: 93 additions & 0 deletions pyincore_viz/geoutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,99 @@ def get_ipyleaflet_heatmap(locations=None, radius=10, blur=10, max=1, name=""):

return heatmap

@staticmethod
def plot_local_earthquake(eq_dataset):
"""
Plot local earthquake data on the map
"""
demand_type = eq_dataset.demand_type
demand_units = eq_dataset.demand_units
hazard_type = eq_dataset.hazard_type
period = eq_dataset.period
title = "Demand Type: " + demand_type.upper() + ", Demand Units: " + demand_units + ", Period: " + \
str(period) + ", Hazard Type: " + hazard_type
raster_file_path = eq_dataset.dataset.local_file_path

GeoUtil.plot_raster_file_with_legend(raster_file_path, title)

@staticmethod
def plot_local_tsunami(tsu_dataset):
"""
Plot local tsunami data on the map
args:
tsu_dataset (obj): pyincore TsunamiDataset object
returns:
none
"""
demand_type = tsu_dataset.demand_type
demand_units = tsu_dataset.demand_units
hazard_type = tsu_dataset.hazard_type
title = "Demand Type: " + demand_type.upper() + ", Demand Units: " + str(demand_units) + \
", Hazard Type: " + hazard_type
raster_file_path = tsu_dataset.dataset.local_file_path

GeoUtil.plot_raster_file_with_legend(raster_file_path, title)

@staticmethod
def plot_local_flood(flood_dataset):
"""
Plot local tsunami data on the map
args:
tsu_dataset (obj): pyincore TsunamiDataset object
returns:
none
"""
demand_type = flood_dataset.demand_type
demand_units = flood_dataset.demand_units
hazard_type = flood_dataset.hazard_type
title = "Demand Type: " + demand_type.upper() + ", Demand Units: " + str(demand_units) + \
", Hazard Type: " + hazard_type
raster_file_path = flood_dataset.dataset.local_file_path

GeoUtil.plot_raster_file_with_legend(raster_file_path, title)

@staticmethod
def plot_local_hurricane(hur_dataset):
"""
Plot local hurricane data on the map
args:
hur_dataset (obj): pyincore HurricaneDataset object
returns:
none
"""
demand_type = hur_dataset.demand_type
demand_units = hur_dataset.demand_units
hazard_type = hur_dataset.hazard_type
title = "Demand Type: " + demand_type.upper() + ", Demand Units: " + str(demand_units) + \
", Hazard Type: " + hazard_type
raster_file_path = hur_dataset.dataset.local_file_path

GeoUtil.plot_raster_file_with_legend(raster_file_path, title)

@staticmethod
def plot_local_tornado(tornado):
"""
Plot local tornado data on the map
args:
dataset (obj): pyincore TornadoDataset object
returns:
outmap (obj): ipyleaflet map object
"""
gdf = tornado.hazardDatasets[0].dataset.get_dataframe_from_shapefile()
id_field = tornado.EF_RATING_FIELD

outmap = GeoUtil.plot_gdf_map(gdf, id_field)

return outmap

@staticmethod
def plot_multiple_vector_dataset(dataset_list):
"""Plot multiple vector datasets on the same map.
Expand Down
2 changes: 1 addition & 1 deletion pyincore_viz/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import logging
from logging import config as logging_config

PACKAGE_VERSION = "1.8.4"
PACKAGE_VERSION = "1.9.0"

INCORE_GEOSERVER_WMS_URL = "https://incore.ncsa.illinois.edu/geoserver/incore/wms"
INCORE_GEOSERVER_DEV_WMS_URL = "https://incore-dev.ncsa.illinois.edu/geoserver/incore/wms"
Expand Down
22 changes: 11 additions & 11 deletions recipes/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "pyincore-viz" %}
{% set version = "1.8.4" %}
{% set version = "1.9.0" %}

package:
name: {{ name|lower }}
Expand All @@ -22,33 +22,33 @@ build:

requirements:
build:
- python>=3.6
- python>=3.9
- pip
- numpy>=1.16.1
- numpy>=1.26.0,<2.0a0

host:
- python>=3.6
- python>=3.9
- pip
- numpy>=1.16.1
- numpy>=1.26.0,<2.0a0

run:
- python>=3.6
- python>=3.9
- {{ pin_compatible('numpy') }}
- gdal
- branca>=0.3.0
- contextily>=1.0.0
- deprecated
- geopandas>=0.6.1
- geopandas>=0.14.0
- ipyleaflet>=0.16.0
- ipywidgets>=7.6.0
- lxml>=4.6.3
- matplotlib>=2.1.0
- networkx>=2.2
- matplotlib>=3.8.0
- networkx>=3.2.1
- owslib>=0.17.1
- pandas>=0.24.1
- pandas>=2.1.2
- pillow
- pyincore>=1.11.0
- rasterio>=1.3.3
- rasterio>=1.3.9

test:
# Python imports
Expand Down
12 changes: 6 additions & 6 deletions requirements.min
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ branca>=0.3.0
contextily>=1.0.0
descartes>=1.1.0
deprecated
geopandas>=0.6.1
geopandas>=0.14.0
ipyleaflet>=0.16.0
ipywidgets>=7.6.0
lxml>=4.6.3
matplotlib>=2.1.0
networkx>=2.2
numpy>=1.16.1
matplotlib>=3.8.0
networkx>=3.2.1
numpy>=1.26.0,<2.0a0
owslib>=0.17.1
pandas>=0.24.1
pandas>=2.1.2
pillow
pycodestyle>=2.6.0
pyincore>=1.11.0
pytest>=3.9.0
python-jose>=3.0
rasterio>=1.3.3
rasterio>=1.3.9
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
branca>=0.3.0
contextily>=1.0.0
deprecated
geopandas>=0.6.1
geopandas>=0.14.0
ipyleaflet>=0.16.0
ipywidgets>=7.6.0
lxml>=4.6.3
matplotlib>=2.1.0
networkx>=2.2
numpy>=1.16.1
matplotlib>=3.8.0
networkx>=3.2.1
numpy>=1.26.0,<2.0a0
owslib>=0.17.1
pandas>=0.24.1
pandas>=2.1.2
pillow
pycodestyle>=2.6.0
pyincore>=1.11.0
pytest>=3.9.0
python-jose>=3.0
rasterio>=1.3.3
rasterio>=1.3.9
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from setuptools import setup, find_packages

# version number of pyincore
version = '1.8.4'
version = '1.9.0'

with open("README.rst", encoding="utf-8") as f:
readme = f.read()
Expand Down Expand Up @@ -56,18 +56,18 @@
'branca>=0.3.0',
'contextily>=1.0.0',
'deprecated',
'geopandas>=0.6.1',
'geopandas>=0.14.0',
'ipyleaflet>=0.16.0',
'ipywidgets>=7.6.0',
'lxml>=4.6.3',
'matplotlib>=2.1.0',
'networkx>=2.2',
'numpy>=1.16.1',
'matplotlib>=3.8.0',
'networkx>=3.2.1',
'numpy>=1.26.0,<2.0a0',
'owslib>=0.17.1',
'pandas>=0.24.1',
'pandas>=2.1.2',
'pillow',
'pyincore>=1.11.0',
'rasterio>=1.3.3'
'rasterio>=1.3.9'
],

extras_require={
Expand Down

0 comments on commit 3918648

Please sign in to comment.