-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add test script * change cease to closure * Delete tests/pyincore/analyses/businessclosure directory * removed deprecated methods and classes * removed outdated test and modified building period method * Add Lisa Wang fixes. * removed files and commented code * #7: Create Repair Curve class to be used with residential recovery analysis * fixed pep8 issues (#21) * fixed pep8 issues * Pyincore util to convert population dislocation output for heatmap #3 (#5) * add utility function to save as shapefile * add filter * write a test * fix bug * add snippet of code to test util and upload * Added conda recipe (#18) * Added conda recipe * changed python version to 3.8 * #6: IncoreClient will show the error messages that the api returns. Pytests added (#16) updated client error messages returned * added github action for automatic docs build (#24) * added github action for automatic docs build * changed the version info in master branch * modified based on comment * renamed the file * #26: run pyincore pytests (#33) * #26: run pyincore pytests * #26: Added cache to test performance * #26: another push to test performance difference * #26: Move caching to correct place * #26:another test * #26: test without mamba * #26: re-enable mamba * 34 add percentage in utils cge output to json (#36) * add percentages, refactor test script, pep8 * joplin pd files * #28 add joplin building functionality recovery time model (#30) * restoration model,documentation and test script * add global target functionality level * add utility with mean and dev, add numpy arrays, filter no hazard * FL mapping to Limit states, filter by archetype and chain in tests * pep8 changes * Need to pass the dataset type as a parameter to from dataframe method #8 (#35) * add data_type parameter to pass in * put correct dataset type to set_result * add test * fix bug and add one example test on epf * remove test code * add to test_format.py * fix format * #9 convert pd outputs to json (#27) * init functions with test jsons * ad dislocation by housing * add input path and output files * add test script * expand jsons with population dislocation keys * test script and list bug * race, tenure, total calculations * pop disl id with hhinc column, improved income json * improve household code, improved total json * delete test csv output * doc modules and csv output to json script * full test script * change class name to match the python file name * change names of keys based on the SC input, add percentages * add percentages, check total zeroes, improve test script * except missing category key * add files to test script * pep8 changes * add comma in the list of categories * merge conflicts in tests * combine popdisl scripts and tests * comment out service upload * fix heatmap filter bug * remove csv output * Updated CHANGELOG and set version to 1.1.0 Co-authored-by: ncsa-mo <[email protected]> Co-authored-by: Diego Calderon <[email protected]> Co-authored-by: Santiago Nunez-Corrales <[email protected]> Co-authored-by: Gowtham Naraharisetty <[email protected]> Co-authored-by: Diego <[email protected]> Co-authored-by: Chen Wang <[email protected]> Co-authored-by: YONG WOOK KIM <[email protected]> Co-authored-by: Gowtham Naraharisetty <[email protected]>
- Loading branch information
1 parent
661adff
commit b0b0675
Showing
58 changed files
with
1,560 additions
and
1,743 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 |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: DOC | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
- 'release/*' | ||
|
||
tags: | ||
- '*' | ||
|
||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
- 'release/*' | ||
|
||
env: | ||
MAIN_REPO: IN-CORE/pyincore | ||
|
||
jobs: | ||
|
||
# ---------------------------------------------------------------------- | ||
# DOCKER BUILD | ||
# ---------------------------------------------------------------------- | ||
docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# checkout source code | ||
- uses: actions/checkout@v2 | ||
|
||
# calculate some variables that are used later | ||
- name: version information | ||
run: | | ||
if [ "${{ github.event.release.target_commitish }}" != "" ]; then | ||
BRANCH="${{ github.event.release.target_commitish }}" | ||
elif [[ $GITHUB_REF =~ pull ]]; then | ||
BRANCH="$(echo $GITHUB_REF | sed 's#refs/pull/\([0-9]*\)/merge#PR-\1#')" | ||
else | ||
BRANCH=${GITHUB_REF##*/} | ||
fi | ||
echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV | ||
if [ "$BRANCH" == "master" ]; then | ||
version=$(awk -F= '/^release/ { print $2}' docs/source/conf.py | sed "s/[ ']//g") | ||
tags="latest" | ||
oldversion="" | ||
while [ "${oldversion}" != "${version}" ]; do | ||
oldversion="${version}" | ||
tags="${tags},${version}" | ||
version=${version%.*} | ||
done | ||
echo "VERSION=${version}" >> $GITHUB_ENV | ||
echo "TAGS=${tags}" >> $GITHUB_ENV | ||
elif [ "$BRANCH" == "develop" ]; then | ||
echo "VERSION=develop" >> $GITHUB_ENV | ||
echo "TAGS=develop" >> $GITHUB_ENV | ||
else | ||
echo "VERSION=testing" >> $GITHUB_ENV | ||
echo "TAGS=${BRANCH}" >> $GITHUB_ENV | ||
fi | ||
# build image | ||
- name: Build image | ||
uses: elgohr/[email protected] | ||
with: | ||
name: incore/doc/pyincore | ||
no_push: true | ||
|
||
# this will publish to NCSA | ||
- name: Publish to NCSA Hub | ||
#if: github.event_name != 'pull_request' && github.repository == env.MAIN_REPO | ||
if: github.repository == env.MAIN_REPO | ||
uses: elgohr/[email protected] | ||
env: | ||
BRANCH: ${{ env.GITHUB_BRANCH }} | ||
VERSION: ${{ env.VERSION }} | ||
BUILDNUMBER: ${{ github.run_number }} | ||
GITSHA1: ${{ github.sha }} | ||
with: | ||
registry: hub.ncsa.illinois.edu | ||
name: incore/doc/pyincore | ||
username: ${{ secrets.HUB_USERNAME }} | ||
password: ${{ secrets.HUB_PASSWORD }} | ||
tags: "${{ env.TAGS }}" | ||
buildargs: BRANCH,VERSION,BUILDNUMBER,GITSHA1 |
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,48 @@ | ||
name: pytests | ||
|
||
# Runs unit tests on: | ||
# - any push to any branch | ||
# - when a PR is opened/reopened - this is just for additional safety and covers the case of master -> develop PRs without new pushes | ||
|
||
# TODO: Use mamba instead of conda for installing packages. Improves on ~5mins it takes to install requirements. | ||
# https://github.com/mamba-org/provision-with-micromamba | ||
|
||
on: | ||
push: | ||
|
||
pull_request: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
unit_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
- 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" | ||
mamba-version: "*" | ||
use-mamba: true | ||
python-version: 3.8 | ||
activate-environment: base | ||
environment-file: environment.yml | ||
use-only-tar-bz2: true | ||
|
||
- name: Run tests with pytest | ||
run: | | ||
echo "${{secrets.PYTEST_USER_TOKEN}}" > tests/pyincore/.incorepw | ||
$CONDA/bin/python -m pytest --ignore=tests/test_format.py --ignore=tests/pyincore/analyses |
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
File renamed without changes.
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
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,27 @@ | ||
name: base | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- boto3 | ||
- deprecated | ||
- fiona>=1.8.4 | ||
- geopandas>=0.6.1 | ||
- ipopt>=3.11 | ||
- jsonpickle>=1.1 | ||
- networkx>=2.2 | ||
- numpy>=1.16.6,<2.0a0 | ||
- owslib>=0.17.1 | ||
- pandas>=0.24.1 | ||
- pycodestyle>=2.6.0 | ||
- pyomo>=5.6 | ||
- pyproj>=1.9.6 | ||
- pytest>=3.9.0 | ||
- python-jose>=3.0 | ||
- pyyaml>=3.13 | ||
- rasterio>=1.0.18 | ||
- requests>=2.21.0 | ||
- rtree>=0.8.3 | ||
- scipy>=1.2.0 | ||
- shapely>=1.6.4.post1 | ||
- wntr>=0.1.6 |
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
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
Oops, something went wrong.