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

[EDNA-130] Add an optimized getter of filtered experiments #92

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

Conversation

gromakovsky
Copy link
Member

@gromakovsky gromakovsky commented May 7, 2021

Description

In order to construct dashboard selectors we use the /experiments endpoint which sends a lot of data, especially if you pass no filters (which happens for example if you open dashboard from scratch and it has no filters). So we add another endpoint which returns only data about experiments necessary to construct dashboard selectors. Additionally, we add endpoints to query names of all projects, compounds, etc. because they work faster than /projects, /compounds, etc.

It's ready, but I want to add more tests/improve existing ones.

Related issue(s)

Resolves https://issues.serokell.io/issue/EDNA-130

✅ Checklist for your Pull Request

Related changes (conditional)

  • Tests

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from
      silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:

Stylistic guide (mandatory)

@gromakovsky gromakovsky self-assigned this May 7, 2021
@gromakovsky gromakovsky force-pushed the gromak/edna130-optimized-filter-experiments branch 3 times, most recently from f26fa82 to 7090ab3 Compare May 7, 2021 13:28
@gromakovsky gromakovsky marked this pull request as ready for review May 7, 2021 13:28
@gromakovsky gromakovsky changed the title [WIP] [EDNA-130] Add an optimized getter of filtered experiments [EDNA-130] Add an optimized getter of filtered experiments May 7, 2021
Problem: in order to construct dashboard selectors we use the
`/experiments` endpoint to get all experiments. It sends a lot of data
and works slowly, especially when we pass no filters.

Solution: add another endpoints that returns only names of relevant
projects, compounds and targets. It works much faster, returns less
data and still makes it possible to construct selectors.
In future we'll also add endpoints to query all project/compound/target
names without querying all data about them.
Problem: sometimes we need to know names of all entities of certain,
e. g. all projects on upload page, so that the user can select a
project. Currently it can be done by calling `/projects`, but it's a
bit expensive because it also gets more data than necessary.

Solution: add new endpoints to get names of all entities.
For projects we have 2 such getters: all projects in the system
(including projects without any experiments) and only projects with
experiments.
All projects in the system are needed for the Upload page and
all projects with experiments are needed for the Dashboard page.
@gromakovsky gromakovsky force-pushed the gromak/edna130-optimized-filter-experiments branch from 7090ab3 to ea9e00b Compare May 8, 2021 13:13
@gromakovsky
Copy link
Member Author

Apparently this PR won't be reviewed/merged any time soon. Maybe we'll come back to it in summer. Here are a couple of things we should improve:

  1. getExperimentsSummary tests lack tests with more than 1 filter.
  2. The second commit has no tests.

@gromakovsky
Copy link
Member Author

One more TODO: use new getters of names in this PR or make sure there is an issue about that.

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.

1 participant