updating master
This commit is contained in:
22
README.md
22
README.md
@@ -31,12 +31,7 @@
|
||||
| google-chrome-stable/stable,now 62.0.3202.94-1 amd64 |
|
||||
| nodejs/unknown,now 6.12.0-1nodesource1 amd64 |
|
||||
|
||||
##### Test locally with CircleCi
|
||||
|
||||
- Go to the project dir
|
||||
- ```circleci build```
|
||||
|
||||
##### Develop
|
||||
##### Set up for Develop and Testing
|
||||
|
||||
- Run the docker container for the 1st time
|
||||
|
||||
@@ -72,12 +67,27 @@ npm install &&\
|
||||
invoke db_migrate
|
||||
```
|
||||
|
||||
|
||||
##### Important
|
||||
- Open another terminal tab, this script watches for changes and pass them
|
||||
to the docker conatiner, which will restart the web server
|
||||
```./watch.sh```
|
||||
|
||||
|
||||
##### Run the server
|
||||
```invoke serve_debug```
|
||||
|
||||
|
||||
##### Test locally without CircleCi
|
||||
```invoke test_ci```
|
||||
|
||||
|
||||
##### Test locally with CircleCi
|
||||
|
||||
- Go to the project dir
|
||||
- ```circleci build```
|
||||
|
||||
|
||||
## OS steps wihout Docker
|
||||
|
||||
#### macOS systems
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
from math import ceil
|
||||
|
||||
from helix.constants.panel_type import PanelType
|
||||
from helix.constants.parts import *
|
||||
|
||||
# This story askes for this special parts to be showed
|
||||
# www.pivotaltracker.com/n/projects/1544689/stories/148016595
|
||||
PARTS_SHOWN_EVEN_WITH_0_ELEMENTS = [
|
||||
delta_kit_inverter_mount,
|
||||
delta_kit_inverter_mount_dt
|
||||
]
|
||||
|
||||
def add_parts_to_list(parts_list, parts_to_add, multiplier=1):
|
||||
for part, quantity in parts_to_add.items():
|
||||
previous_value = parts_list.get(part) or 0
|
||||
if quantity != 0:
|
||||
if quantity != 0 or part in PARTS_SHOWN_EVEN_WITH_0_ELEMENTS:
|
||||
parts_list[part] = previous_value + quantity * multiplier
|
||||
|
||||
|
||||
|
||||
@@ -128,9 +128,17 @@ def standalone_inverter_parts(inverter, system_type, module_type):
|
||||
if inverter['model'] in InverterType.DELTA.all():
|
||||
parts = {}
|
||||
if system_type == SystemType.singleTilt:
|
||||
parts = {**parts, delta_kit_inverter_mount: 1}
|
||||
parts = {
|
||||
**parts,
|
||||
delta_kit_inverter_mount: 1,
|
||||
delta_kit_inverter_mount_dt: 0
|
||||
}
|
||||
else:
|
||||
parts = {**parts, delta_kit_inverter_mount_dt: 1}
|
||||
parts = {
|
||||
**parts,
|
||||
delta_kit_inverter_mount: 0,
|
||||
delta_kit_inverter_mount_dt: 1
|
||||
}
|
||||
if inverter['splice_box']:
|
||||
parts = {**parts, delta_splice_box: 1}
|
||||
return parts
|
||||
|
||||
@@ -206,6 +206,7 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
delta_60kw_inverter: 1,
|
||||
delta_splice_box: 2,
|
||||
delta_kit_inverter_mount: 3,
|
||||
delta_kit_inverter_mount_dt: 0
|
||||
}
|
||||
|
||||
assert_dictionary_equal(self.subject.compute_ebom(), expected_output)
|
||||
@@ -223,7 +224,6 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
'attachment_point': ('Switch Gear', None)
|
||||
},
|
||||
]
|
||||
|
||||
self.user_values.system_type.return_value = SystemType.dualTilt
|
||||
self.user_values.module_type.return_value = ModuleType.Cell96
|
||||
expected_output = {
|
||||
@@ -237,9 +237,9 @@ class EbomCalculatorTest(unittest.TestCase):
|
||||
harness_4_string_mf: 2,
|
||||
harness_4_string_fm: 2,
|
||||
delta_42kw_inverter: 1,
|
||||
delta_kit_inverter_mount: 0,
|
||||
delta_kit_inverter_mount_dt: 1,
|
||||
}
|
||||
|
||||
assert_dictionary_equal(self.subject.compute_ebom(), expected_output)
|
||||
|
||||
def test_computes_ebom_with_aux_plugs(self):
|
||||
|
||||
Reference in New Issue
Block a user