Skip to content

Commit

Permalink
Debug parameters cli #1
Browse files Browse the repository at this point in the history
  • Loading branch information
tlestang committed Apr 20, 2020
1 parent b19de10 commit c07052e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ jobs:
pip install .
- name: Install optional scikits.odes package
if: matrix.os != 'windows-latest'
run: |
if: matrix.os != 'windows-latest'
echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH
echo DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
pybamm_install_odes
Expand Down
19 changes: 10 additions & 9 deletions tests/unit/test_parameters/test_parameters_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ def test_add_param(self):

# Check that the new parameters can be accessed from the package
# and that content is correct
new_parameter_filename = pybamm.get_parameters_filepath(
os.path.join(
"input",
"parameters",
"lithium-ion",
"anodes",
os.path.basename(tempdir.name),
"parameters.csv",
)
# new_parameter_filename = pybamm.get_parameters_filepath(
new_parameter_filename = pybamm.path.join(
pybamm.__path__[0],
"input",
"parameters",
"lithium-ion",
"anodes",
os.path.basename(tempdir.name),
"parameters.csv",
)

new_anode = pybamm.ParameterValues({}).read_parameters_csv(
Expand All @@ -70,6 +70,7 @@ def test_edit_param(self):
tempdir = tempfile.TemporaryDirectory(
dir=os.path.join(pybamm.__path__[0], anodes_dir)
)
print(os.path.join(tempdir.name, "parameters.csv"))
with open(os.path.join(tempdir.name, "parameters.csv"), "w") as f:
f.write("hello")

Expand Down

0 comments on commit c07052e

Please sign in to comment.