Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com>
  • Loading branch information
federicazanca and ElliottKasoar authored Jun 4, 2024
1 parent 83dde1e commit 763fa9a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions aiida_mlip/calculations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def validate_inputs(
)
):
raise InputValidationError(
"Either 'arch' or 'model' must be specified in the inputs or config"
"'arch' and 'model' must both be specified in either the inputs or config"
)


Expand Down Expand Up @@ -256,7 +256,7 @@ def prepare_for_submission(

return calcinfo

def _define_architecture(self, cmd_line: dict) -> Union[dict, str]:
def _define_architecture(self, cmd_line: dict) -> tuple[dict, str]:
"""
Find architecture in inputs or config file and add to command line if needed.
Expand All @@ -267,10 +267,9 @@ def _define_architecture(self, cmd_line: dict) -> Union[dict, str]:
Returns
-------
cmd_line_updated: dict
Dictionary containing the cmd line keys updated with the architecture.
architecture: str
Architecture type, either from inputs/config or a default value ("mace_mp").
tuple[dict, str]
Dictionary containing the cmd line keys updated with the architecture, and
architecture type, either from inputs/config or a default value ("mace_mp").
"""
architecture = None
cmd_line_updated = cmd_line
Expand Down Expand Up @@ -303,8 +302,8 @@ def _add_model_to_cmdline(self, cmd_line: dict, architecture: str) -> dict:
Returns
-------
dict
Dictionary containing the cmd line keys updated with the model.
dict
Dictionary containing the cmd line keys updated with the model.
"""
model_path = None
cmd_line_updated = cmd_line
Expand Down

0 comments on commit 763fa9a

Please sign in to comment.