Skip to content

Commit

Permalink
Minor edits (#211)
Browse files Browse the repository at this point in the history
* del : TODO.md removed

* fix : description_control function modified

* fix : Get_Input function updated

* doc : CI badges updated

* fix : Get_Input function updated
  • Loading branch information
sepandhaghighi authored Feb 15, 2024
1 parent cc56197 commit 14c0dcc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 52 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
* [MATLAB](https://github.com/ECSIM/opem/tree/master/MATLAB)
* [Issues & Bug Reports](https://github.com/ECSIM/opem#issues--bug-reports)
* [Contribution](https://github.com/ECSIM/opem/blob/master/.github/CONTRIBUTING.md)
* [Todo](https://github.com/ECSIM/opem/blob/master/TODO.md)
* [Outputs](https://github.com/ECSIM/opem#outputs)
* [Thanks](https://github.com/ECSIM/opem#thanks)
* [Reference](https://github.com/ECSIM/opem#reference)
Expand Down Expand Up @@ -76,8 +75,8 @@ Modeling and simulation of proton-exchange membrane fuel cells (PEMFC) may work
</tr>
<tr>
<td align="center">CI</td>
<td align="center"><img src="https://github.com/ECSIM/opem/workflows/CI/badge.svg?branch=master"></td>
<td align="center"><img src="https://github.com/ECSIM/opem/workflows/CI/badge.svg?branch=develop"></td>
<td align="center"><img src="https://github.com/ECSIM/opem/actions/workflows/test.yml/badge.svg?branch=master"></td>
<td align="center"><img src="https://github.com/ECSIM/opem/actions/workflows/test.yml/badge.svg?branch=develop"></td>
</tr>
</table>

Expand Down
45 changes: 0 additions & 45 deletions TODO.md

This file was deleted.

9 changes: 5 additions & 4 deletions opem/Functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,15 @@ def input_test(a):
return "1"


def Get_Input(InputParams, input_item=input, params_default={}):
def Get_Input(InputParams, input_item=input, params_default=None):
"""
Get inputs from users.
:param InputParams : input parameters for each model
:type InputParams :dict
:param input_item : input function (this parameter added for Get_Input doctest)
:param params_default: default parameters
:type params_default : dict
:return: input dictionary
"""
try:
Expand All @@ -227,7 +229,7 @@ def Get_Input(InputParams, input_item=input, params_default={}):
if isfloat(Input_Item):
Input_Flag = True
else:
if item in params_default:
if params_default is not None and item in params_default:
Input_Item = params_default[item]
Input_Flag = True
else:
Expand Down Expand Up @@ -678,8 +680,7 @@ def description_control(
print(i + " : " + str(Test_Vector[i]))
print("\n")
line()
input_temp = input("Press any key to continue")
del input_temp
_ = input("Press any key to continue")
Analysis_Dict[Analysis_Name](
InputMethod=Test_Vector, TestMode=True)
else:
Expand Down

0 comments on commit 14c0dcc

Please sign in to comment.