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

Update the utils used to mock the redux state for testing #6361

Merged
merged 2 commits into from
May 3, 2023

Conversation

rileyajones
Copy link
Contributor

Motivation for features / changes

I'm working on a change downstream that involves using a huge chunk of the state and this will make it much easier to test.

Technical description of changes

Some of the mocks were just wrong before.
None of the pieces of state supported being overridden.

Screenshots of UI changes (or N/A)

N/A

@rileyajones rileyajones marked this pull request as ready for review May 3, 2023 00:29
Copy link
Contributor

@JamesHollyer JamesHollyer left a comment

Choose a reason for hiding this comment

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

Did you skip the notification state on purpose or was that a mistake?

google3/third_party/tensorboard/webapp/notification_center/_redux/testing.ts

@rileyajones rileyajones merged commit e166112 into tensorflow:master May 3, 2023
rileyajones added a commit that referenced this pull request May 9, 2023
## Motivation for features / changes
The runs table currently contains the logic to filter runs by hparams,
unfortunately, this logic is not shared with the rest of the dashboard
and so filtering runs this way does not actually effect what is shown on
the dashboard.

## Technical description of changes
I moved out a lot of utility functions from the runs table container
into common selectors. I then created three selectors
1) `getRenderableRuns`
A private selector to help with the readability of
`getFilteredRenderableRuns`
  Gets all runs associated with the provided experiment ids
2) `getFilteredRenderableRuns`
Gets all runs associated with the provided experiment ids while
accounting for filters.
3) `getFilteredRenderableRunsFromRoute`
Retrieves the experiment ids from the route then gets the filtered runs
associated with them

NOTE: The utility functions are encapsulated in a utils object so that
they can be spied on during testing

See the PRs leading up to this
#6340 #6360 #6361 #6323 #6324

## Screenshots of UI changes (or N/A)
N/A
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.

None yet

2 participants