Skip to content

Commit

Permalink
update to fix bugs introduced by dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter James Joyce authored and Peter James Joyce committed Nov 15, 2019
1 parent 0471c89 commit 2fae248
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -24,4 +24,6 @@ lcopt.egg-info/
/lcopt/assets/lcopt_config.yml
__pycache__/
tests/__pycache__/
video_transcript.txt
video_transcript.txt

.idea/
Binary file modified lcopt/assets/ecoinvent_example.lcopt
Binary file not shown.
4 changes: 2 additions & 2 deletions lcopt/data_store.py
Expand Up @@ -74,15 +74,15 @@ def __init__(self):

def load_config(self):
with open(self.config_file, 'r') as cf:
config = yaml.load(cf)
config = yaml.safe_load(cf)
if config is None:
self.write_default_config()
config = DEFAULT_CONFIG
return config

def refresh(self):
with open(self.config_file, 'r') as cf:
self.config = yaml.load(cf)
self.config = yaml.safe_load(cf)

def write_default_config(self):
self.write_config(DEFAULT_CONFIG)
Expand Down
2 changes: 1 addition & 1 deletion lcopt/model.py
Expand Up @@ -155,7 +155,7 @@ def __init__(self, name=hex(random.getrandbits(128))[2:-1], load=None, useForwas

# default settings for bw2 analysis
self.analysis_settings = {'amount': 1,
'methods': [('IPCC 2013', 'climate change', 'GWP 100a'), ('USEtox', 'human toxicity', 'total')],
'methods': [('IPCC 2013', 'climate change', 'GWP 100a')],
#'top_processes': 10,
#'gt_cutoff': 0.01,
'pie_cutoff': 0.05
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -89,7 +89,7 @@ def create_shortcut(where, script_name, icon=None):

setup(
name='lcopt-dev',
version="0.4.2",
version="0.4.3_dev",
packages=packages,
author="P. James Joyce",
author_email="pjamesjoyce@gmail.com",
Expand Down
Binary file modified tests/assets/Test_model.lcopt
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/test_interact.py
Expand Up @@ -494,9 +494,9 @@ def test_analysis(flask_client, fully_formed_model):

def test_alter_methods(flask_client, fully_formed_model):

method_list = [('ReCiPe Midpoint (H)', 'climate change', 'GWP100'),
('ReCiPe Midpoint (H)', 'human toxicity', 'HTPinf'),
('ReCiPe Midpoint (H)', 'particulate matter formation', 'PMFP')]
method_list = [('ReCiPe Midpoint (H) V1.13', 'climate change', 'GWP100'),
('ReCiPe Midpoint (H) V1.13', 'human toxicity', 'HTPinf'),
('ReCiPe Midpoint (H) V1.13', 'particulate matter formation', 'PMFP')]

method_json = json.dumps(method_list)

Expand Down

0 comments on commit 2fae248

Please sign in to comment.