Skip to content

Commit

Permalink
fixing paths again
Browse files Browse the repository at this point in the history
  • Loading branch information
Kendra Johnson authored and Kendra Johnson committed Apr 3, 2024
1 parent ade3689 commit 62a3c76
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions openquake/mbt/tests/tools/mfd_sample/mfd_sample_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import toml
import shutil
import unittest
import tempfile
Expand Down Expand Up @@ -35,8 +36,22 @@ def test_generate_cats(self):
class TestWorkflow(unittest.TestCase):

def test_full_wkflow(self):
config_fi = os.path.join(BASE_PATH, 'test.toml')
#config_fi = os.path.join(BASE_PATH, 'config', 'test.toml')
config_fi = os.path.join(BASE_PATH, 'config', 'test.toml')
config = toml.load(config_fi)
cat_fi_name = config['main']['catalogue_filename']
cat_fi_name_new = os.path.join(BASE_PATH, cat_fi_name)
config['main']['catalogue_filename'] = cat_fi_name_new
dec_toml = config['decluster']['decluster_settings']
dec_toml_new = os.path.join(BASE_PATH, dec_toml)
config['decluster']['decluster_settings'] = dec_toml_new
comp_toml = config['completeness']['completeness_settings']
comp_toml_new = os.path.join(BASE_PATH, comp_toml)
config['completeness']['completeness_settings'] = comp_toml_new

config_fi_new = os.path.join(BASE_PATH, 'test_tmp.toml')
file=open(config_fi_new,"w")
toml.dump(config, file)

make_many_mfds(config_fi)

expected_fi = os.path.join(BASE_PATH, 'expected2', 'mfd-results.csv')
Expand Down

0 comments on commit 62a3c76

Please sign in to comment.