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

Accept expected_minimum in JSON result #108

Merged
merged 9 commits into from
Sep 24, 2021

Conversation

langdal
Copy link
Member

@langdal langdal commented Sep 22, 2021

Expose expected minimum in frontend

This PR depends on BoostV/process-optimizer-api#26 being merged and that the API project version is bumped to 1.4.0

  • Generate new interface based on OpenAPI
  • Store expected minimum in result JSON
  • Expose experiment.result.expectedMinimum somewhere in the UI
  • Rename next-experiments component to result-data (if the placement of expected results is OK)
  • Add migration step to handle the addition of expectedMinimum to result
  • Refresh OpenAPI when targe API version has been released

The structure of the expectedMinimum entry is like this:

"expectedMinimum": [
      [
        632.849136434717,
        911.306868608154,
        889.5600636978522,
        "Ræv"
      ],
      -0.07431193235012623
    ]

Closes #106

@langdal langdal requested a review from j-or September 23, 2021 12:02
@langdal langdal marked this pull request as ready for review September 23, 2021 19:13
})

it("should migrate to 4 from 3 (expectedMinimum added to result)", () => {
expect(migrate(version2, "4")).toEqual(version4)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be migrate(3, 4)?

json = migration.converter(json)
const migrationIndex = MIGRATIONS.findIndex(m => m === migration)
const isLastMigration = migrationIndex === MIGRATIONS.length - 1
const isLastMigration = migrationIndex === MIGRATIONS.length - 1 || migration.version === stopAtVersion
Copy link
Contributor

Choose a reason for hiding this comment

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

Can migrationIndex === MIGRATIONS.length - 1 be removed now that there is a stopAtVersion with a default?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes it could be removed, however, I think it would be better to keep it to prevent errors where a user enters a non-existing stopVersion

@langdal langdal merged commit c2f1bd5 into main Sep 24, 2021
@langdal langdal deleted the feature/expose-expected_minimum-in-the-frontend branch September 24, 2021 07:50
@langdal langdal added this to the v1.4.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose expected_minimum including standard deviation in the frontend
2 participants