Skip to content

Commit f42d2d2

Browse files
authored
Merge pull request #144 from WISDEM/release-2.2.8
Release 2.2.8
2 parents be295f6 + 48bcc26 commit f42d2d2

15 files changed

+42
-1
lines changed

.travis.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: python
2+
python:
3+
- "3.7"
4+
5+
# command to install dependencies
6+
install:
7+
- pip install pandas==0.25.2
8+
- pip install numpy
9+
- pip install sympy
10+
- pip install shapely
11+
- pip install xlsxwriter
12+
- pip install xlrd
13+
- pip install psycopg2-binary
14+
- pip install sqlalchemy
15+
- pip install pytest
16+
17+
18+
env:
19+
global:
20+
- LANDBOSSE_INPUT_DIR: $TRAVIS_BUILD_DIR/project_input_template
21+
- LANDBOSSE_OUTPUT_DIR: $TRAVIS_BUILD_DIR/project_input_template
22+
23+
# command to run tests
24+
script:
25+
- python $TRAVIS_BUILD_DIR/main.py --validate
26+
27+
branches:
28+
only:
29+
- develop

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[![Build Status](https://travis-ci.com/WISDEM/LandBOSSE.svg?branch=issue_136_add_tests)](https://travis-ci.com/WISDEM/LandBOSSE)
12
# LandBOSSE
23

34
## Welcome to LandBOSSE!

landbosse/model/FoundationCost.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ def calculate_costs(self, calculate_costs_input_dict, calculate_costs_output_dic
651651
foundation_cost = foundation_cost.append(material_costs)
652652

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

main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@
6767
)
6868
if validation_was_successful:
6969
print('Validation passed.')
70+
build_status = 0
7071
else:
7172
print('Validation failed. See mismatched data above.')
73+
build_status = 1
7274

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

9698
# Print end timestamp
9799
print(f'>>>>>>>> End run {datetime.now()} <<<<<<<<<<')
100+
101+
# returns an exit code of either 0 (successful validation), or 1 (validation failed).
102+
#
103+
# If validation was not enabled, exit with a status of 0 (no errors)
104+
105+
if validation_enabled:
106+
exit(build_status)
107+
else:
108+
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 not shown.
807 Bytes
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)