Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a check for duplicate analysis tasks and subtasks #908

Merged
merged 2 commits into from
Sep 27, 2022

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Sep 27, 2022

This happens frequently by mistake and produces a very obscure error message. With this merge, the error message will be more straightforward, e.g.:

ValueError: Analysis tasks failed these checks:
  A task named climatologyMapSeaIceSpeedSH has been added more than once

@xylar xylar self-assigned this Sep 27, 2022
Comment on lines -79 to +80
subtasks : ``OrderedDict`` of ``AnalysisTasks``
Subtasks of this task, with subtask names as keys
subtasks : list of mpas_analysis.shared.AnalysisTask
Subtasks of this task
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An incorrect docstring I noticed in the process of writing the function above.

@xylar xylar merged commit c8e4e60 into MPAS-Dev:develop Sep 27, 2022
@xylar
Copy link
Collaborator Author

xylar commented Sep 27, 2022

Testing

I made sure tasks listed fine for this branch. I tested this on a branch with duplicate task names and got the expected error when I did:

mpas_analysis --list

@xylar xylar deleted the detect_repeat_task_names branch September 27, 2022 20:32
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant