Skip to content

Commit

Permalink
Merge pull request #144 from WISDEM/release-2.2.8
Browse files Browse the repository at this point in the history
Release 2.2.8
  • Loading branch information
akey7 authored May 18, 2020
2 parents be295f6 + 48bcc26 commit f42d2d2
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
language: python
python:
- "3.7"

# command to install dependencies
install:
- pip install pandas==0.25.2
- pip install numpy
- pip install sympy
- pip install shapely
- pip install xlsxwriter
- pip install xlrd
- pip install psycopg2-binary
- pip install sqlalchemy
- pip install pytest


env:
global:
- LANDBOSSE_INPUT_DIR: $TRAVIS_BUILD_DIR/project_input_template
- LANDBOSSE_OUTPUT_DIR: $TRAVIS_BUILD_DIR/project_input_template

# command to run tests
script:
- python $TRAVIS_BUILD_DIR/main.py --validate

branches:
only:
- develop
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Build Status](https://travis-ci.com/WISDEM/LandBOSSE.svg?branch=issue_136_add_tests)](https://travis-ci.com/WISDEM/LandBOSSE)
# LandBOSSE

## Welcome to LandBOSSE!
Expand Down
2 changes: 1 addition & 1 deletion landbosse/model/FoundationCost.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def calculate_costs(self, calculate_costs_input_dict, calculate_costs_output_dic
foundation_cost = foundation_cost.append(material_costs)

# calculate mobilization cost as percentage of total foundation cost and add to foundation_cost
mob_cost = pd.DataFrame([['Mobilization', foundation_cost['Cost USD'].sum() * 0.1, 'Foundation']],
mob_cost = pd.DataFrame([['Mobilization', foundation_cost['Cost USD'].sum() * 0.05, 'Foundation']],
columns=['Type of cost', 'Cost USD', 'Phase of construction'])
foundation_cost = foundation_cost.append(mob_cost)

Expand Down
11 changes: 11 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@
)
if validation_was_successful:
print('Validation passed.')
build_status = 0
else:
print('Validation failed. See mismatched data above.')
build_status = 1

# XlsxGenerator has a context manager that writes each individual
# worksheet to the output .xlsx. Also, copy file input structure.
Expand All @@ -95,3 +97,12 @@

# Print end timestamp
print(f'>>>>>>>> End run {datetime.now()} <<<<<<<<<<')

# returns an exit code of either 0 (successful validation), or 1 (validation failed).
#
# If validation was not enabled, exit with a status of 0 (no errors)

if validation_enabled:
exit(build_status)
else:
exit(0)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed project_input_template/project_data/project_1.xlsx
Binary file not shown.
Binary file modified project_input_template/project_list.xlsx
Binary file not shown.
Binary file not shown.

0 comments on commit f42d2d2

Please sign in to comment.