Skip to content

Commit

Permalink
Merge pull request #76 from IN-CORE/release/1.7.0
Browse files Browse the repository at this point in the history
Release/1.7.0
  • Loading branch information
ywkim312 committed Jul 26, 2022
2 parents 1b15b65 + 63cc733 commit dc54f8f
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 17 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/conda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Publish Conda package

on:
release:
types:
- published

pull_request:

jobs:
publish:
name: Build and publish conda packages
runs-on: ubuntu-latest

# need for activated env
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2

- name: get release info
id: release_info
run: |
if [ "${{ github.event.release.tag_name }}" != "" ]; then
version=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')
else
version="$(awk -F= '/^PACKAGE_VERSION/ { print $2}' pyincore-viz/globals.py | sed 's/[ "]//g').${{ github.run_number }}"
fi
echo "VERSION=${version}" >> $GITHUB_ENV
echo "VERSION=${version}"
./version.sh ${version}
testing=$(echo $version | sed 's/[0-9\.]//g')
if [ "$testing" == "" ]; then
echo "LABEL=main" >> $GITHUB_ENV
else
echo "LABEL=rc" >> $GITHUB_ENV
fi
- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}

- name: Install miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: 3.8
use-mamba: true
mamba-version: "*"
channels: conda-forge,in-core
use-only-tar-bz2: true
conda-build-version: "*"

- name: Build conda package
run: |
mkdir dist
conda build --output-folder dist \
--label ${{ env.LABEL }} \
recipes
- name: Upload conda package
if: github.event_name == 'release'
run: |
conda install -y anaconda-client
anaconda --token ${{ secrets.CONDA_INCORE_TOKEN }} upload \
--user IN-CORE \
--label ${{ env.LABEL }} \
dist/*/pyincore-viz-${{ env.VERSION }}-*.tar.bz2
- name: Upload binaries to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*/pyincore-viz-${{ env.VERSION }}-*.tar.bz2
file_glob: true
overwrite: true
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/pyincore-viz-${{ env.VERSION }}*
file: dist/pyincore_viz-${{ env.VERSION }}*
file_glob: true
overwrite: true
4 changes: 2 additions & 2 deletions .github/workflows/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ env:
MAIN_REPO: IN-CORE/pyincore-viz

jobs:
pyclowder:
requirements:
runs-on: ubuntu-latest
if: github.repository == env.MAIN_REPO

steps:
- uses: actions/checkout@v3
Expand All @@ -29,6 +28,7 @@ jobs:
# try and create a PR
- name: create PR if needed
if: github.repository == env.MAIN_REPO
uses: peter-evans/create-pull-request@v3
with:
commit-message: "Updated requirements"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ hs_err_pid*
# vim swap files
*.swp

# backup file
*~

# IDEA:
.idea/*
**.iml
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ 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.7.0] - 2022-07-27
### Changed
- Gdf map visualization accepts both dataset and gdf. [#72](https://github.com/IN-CORE/pyincore-viz/issues/72)
- Updated network visualization. [#68](https://github.com/IN-CORE/pyincore-viz/issues/68)

## [1.6.0] - 2022-06-29
### Added
- Household income and poverty visualization to pop result table. [#55](https://github.com/IN-CORE/pyincore-viz/issues/55)
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.6'
version = '1.7'
# The full version, including alpha/beta/rc tags
release = '1.6.0'
release = '1.7.0'

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

Expand Down
18 changes: 11 additions & 7 deletions pyincore_viz/geoutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,15 @@ def get_gdf_map(datasets: list):
# (min_lat, min_lon, max_lat, max_lon)
bbox_all = [9999, 9999, -9999, -9999]

for dataset in datasets:
# maybe this part should be moved to Dataset Class
gdf = gpd.read_file(dataset.local_file_path)
geo_data = ipylft.GeoData(
geo_dataframe=gdf, name=dataset.metadata['title'])
for i, dataset in enumerate(datasets):
if isinstance(dataset, Dataset):
gdf = dataset.get_dataframe_from_shapefile()
geo_data = ipylft.GeoData(
geo_dataframe=gdf, name=dataset.metadata['title'])
else:
gdf = dataset
geo_data = ipylft.GeoData(
geo_dataframe=gdf, name="GeoDataFrame_" + str(i))
geo_data_list.append(geo_data)

bbox = gdf.total_bounds
Expand Down Expand Up @@ -521,11 +525,11 @@ def plot_network_dataset(network_dataset: NetworkDataset):
"""
# get node file name path
link_path = network_dataset.link.file_path
link_path = network_dataset.links.local_file_path
link_file_name = os.path.basename(link_path)

# get node file name path
node_path = network_dataset.node.file_path
node_path = network_dataset.nodes.local_file_path
node_file_name = os.path.basename(node_path)

# read file using geopandas
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.6.0"
PACKAGE_VERSION = "1.7.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
4 changes: 2 additions & 2 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.6.0.rc.2" %}
{% set version = "1.7.0" %}

package:
name: {{ name|lower }}
Expand Down Expand Up @@ -47,7 +47,7 @@ requirements:
- owslib>=0.17.1
- pandas>=0.24.1
- pillow
- pyincore>=1.0.0
- pyincore>=1.5.0
- rasterio>=1.1.3

test:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ owslib>=0.17.1
pandas>=0.24.1
pillow
pycodestyle>=2.6.0
pyincore>=1.0.0
pyincore>=1.5.0
pytest>=3.9.0
python-jose>=3.0
rasterio>=1.1.3
2 changes: 1 addition & 1 deletion 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.6.0'
version = '1.7.0'

with open("README.rst", encoding="utf-8") as f:
readme = f.read()
Expand Down

0 comments on commit dc54f8f

Please sign in to comment.