-
Notifications
You must be signed in to change notification settings - Fork 2
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
ranking interventions first pass and better simulation output naming #5969
base: main
Are you sure you want to change the base?
Conversation
…A-ASKEM/terarium into start-ranking-interventions
@@ -345,7 +345,9 @@ public ResponseEntity<Dataset> createFromSimulationResult( | |||
@PathVariable("id") final UUID id, | |||
@PathVariable("project-id") final UUID projectId, | |||
@RequestParam("dataset-name") final String datasetName, | |||
@RequestParam("add-to-project") final Boolean addToProject | |||
@RequestParam("add-to-project") final Boolean addToProject, | |||
@RequestParam("model-configuration-id") final Optional<UUID> modelConfigurationId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think Optional
is right here, you can just use UUID
. If you want to make these params optional it would be done like:
@RequestParam(
value = "model-configuration-id",
required = false
) final String modelConfigurationId,
@@ -93,6 +93,8 @@ public Dataset createDatasetFromSimulation( | |||
final String datasetName, | |||
final UUID projectId, | |||
final boolean addToProject, | |||
final Optional<UUID> modelConfigurationId, | |||
final Optional<UUID> interventionPolicyId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to Derek's comment, you don't really need Optionals, just
final UUID modelConfigurationId,
final UUID interventionPolicyId,
you can pass in nulls, Optionals are typically when you programmatically fetch something and you are not sure if you will have a result or not.
Also I think there is already an object-mapper instance in the class you can use, don't need to create a new one.
Description
modelConfigurationId
andinterventionPolicyId
are stored in themetadata.simulationAttributes
of datasets resulting from simulations (we will need access to these assets when we rank interventions)