Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Allow declaring and retriveing names associated with draws in the Scenario class #1452

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tbhallett
Copy link
Collaborator

@tbhallett tbhallett commented Aug 2, 2024

Fixes #1451

This line can be added to the Scenario class:

    def draw_names(self, draw_number) -> str:
        return list(self._scenarios.keys())[draw_number]

and in the analysis script, the draw_names can be retrieved using

extract_draw_names(results_path)

Optionally, the existing extract_parameters function can index the parameters being changes by these same draw names.

@tbhallett tbhallett requested a review from tamuri August 2, 2024 17:48
@tbhallett tbhallett requested a review from tamuri October 17, 2024 09:37
def draw_name(self, draw_number) -> str:
"""Returns the name of the draw corresponding to the given draw number. This is offered for convenience so that
the logfile contain a 'user-friendly' label for the draw."""
return ""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can the default be this instead?

Suggested change
return ""
return str(draw_number)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready to merge
Development

Successfully merging this pull request may close these issues.

Save a label for the draw when using Scenario class
2 participants