Skip to content

Commit

Permalink
Merge pull request #3250 from radical-cybertools/fix/metadata_dict
Browse files Browse the repository at this point in the history
we expect task metadata to be a dict - enforce and document
  • Loading branch information
andre-merzky authored Oct 30, 2024
2 parents 5d5ec46 + 1f54a74 commit 489a1e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/radical/pilot/task_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class TaskDescription(ru.TypedDict):
raptor_file (str, optional): Optional application supplied Python
source file to load `raptor_class` from.
metadata (Any, optional): User defined metadata. Default None.
metadata (dict, optional): User defined metadata. Default None.
timeout (float, optional): Any timeout larger than 0 will result in
the task process to be killed after the specified amount of seconds.
Expand Down Expand Up @@ -584,7 +584,7 @@ class TaskDescription(ru.TypedDict):
RAPTOR_ID : str ,
RAPTOR_FILE : str ,
RAPTOR_CLASS : str ,
METADATA : None ,
METADATA : {str: None} ,
TIMEOUT : float ,
CLEANUP : bool ,
PILOT : str ,
Expand Down Expand Up @@ -648,7 +648,7 @@ class TaskDescription(ru.TypedDict):
RAPTOR_ID : '' ,
RAPTOR_FILE : '' ,
RAPTOR_CLASS : '' ,
METADATA : None ,
METADATA : dict() ,
TIMEOUT : 0.0 ,
CLEANUP : False ,
PILOT : '' ,
Expand Down
4 changes: 3 additions & 1 deletion tests/integration_tests/test_lm/test_mpirun.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ def test_configure(self, mocked_init):
component._init_from_info(lm_info)

self.assertEqual(component._command, self.resource['mpirun_path'])
self.assertEqual(component._mpi_version, self.resource['mpi_version'])
self.assertEqual(component._mpi_flavor, self.resource['mpi_flavor'])

# we don't match a specific version, but just if the version is set
self.assertTrue(bool(component._mpi_version))


# ------------------------------------------------------------------------------
#
Expand Down

0 comments on commit 489a1e7

Please sign in to comment.