Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pjamesjoyce committed Dec 9, 2019
1 parent 6d41549 commit 673692c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
15 changes: 14 additions & 1 deletion ci/travis/recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "lcopt-dev" %}
{% set version = "0.4.2.dev" %}
{% set version = "0.4.3.dev" %}

package:
name: '{{ name|lower }}'
Expand All @@ -16,11 +16,23 @@ build:
- lcopt-launcher = lcopt.bin.lcopt_launcher:main
- lcopt-bw2-setup = lcopt.bin.lcopt_bw2_setup:main
- lcopt-bw2-setup-forwast = lcopt.bin.lcopt_bw2_setup_forwast:main
- lcopt-settings = lcopt.bin.lcopt_settings:main

requirements:
build:
- python
- setuptools
- python
- bw2data >=3.4.2
- brightway2 >=2.1.2
- pandas
- pyyaml
- eidl
- flask
- pywin32 # [win]
- bw2io >=0.7.1
- numpy x.x

run:
- python
- bw2data >=3.4.2
Expand All @@ -31,6 +43,7 @@ requirements:
- flask
- pywin32 # [win]
- bw2io >=0.7.1
- numpy x.x

about:
home: https://github.com/pjamesjoyce/lcopt/
Expand Down
3 changes: 1 addition & 2 deletions lcopt/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ def run_analyses(self, demand_item, demand_item_code, amount=1, methods=DEFAULT_
lca.lcia()
else:
lca.switch_method(m)
lca.redo_lcia(
)
lca.redo_lcia(fu)
scores.append(lca.score)

# method units at list
Expand Down
16 changes: 11 additions & 5 deletions lcopt/static/js/waterfall.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,25 @@ function postOrder(d, total_score, cutoff, m){
for (i in splice_dict){
splice_dict[i].sort(sortNumber).reverse();
}
//console.log(splice_dict);
console.log(splice_dict);
d.eachAfter(function(n){
if(splice_dict[n.data.activity]){
for(j in splice_dict[n.data.activity]){
remove_index = splice_dict[n.data.activity][j];
//console.log("removing child " + remove_index + " of " + n.data.activity)
//console.log(n.children[remove_index].data.activity)
//console.log(n.children[remove_index])
n.children.splice(remove_index,1);

if (n.children.length == 0){
//console.log('no children left')
n.children = null;
try {
n.children.splice(remove_index,1);

if (n.children.length == 0){
//console.log('no children left')
n.children = null;
}
}
catch(error) {
console.error(error);
}
//console.log(n.children);
}
Expand Down

0 comments on commit 673692c

Please sign in to comment.