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

Feat/guppy explorer #505

Merged
merged 40 commits into from Apr 24, 2019
Merged

Feat/guppy explorer #505

merged 40 commits into from Apr 24, 2019

Conversation

@qingyashu
Copy link
Contributor

qingyashu commented Apr 15, 2019

Use guppy for data explorer instead of arranger. Portal config like this (under dataExplorerConfig block):

"guppyConfig": {
      "dataType": "subject",
      "fieldMapping": [
        { "field": "project", "name": "Project" },
        { "field": "study", "name": "Study" },
        { "field": "race", "name": "Race" },
        { "field": "ethnicity", "name": "Ethnicity" },
        { "field": "gender", "name": "Gender" },
        { "field": "vital_status", "name": "Vital Status" },
        { "field": "whatever_lab_result_value", "name": "Lab Result Value" },
        { "field": "file_count", "name": "File Count" },
        { "field": "file_type", "name": "File Type" },
        { "field": "file_format", "name": "File Format" }
      ],
      "manifestMapping": {
        "resourceIndexType": "file",
        "resourceIdField": "file_id",
        "referenceIdFieldInResourceIndex": "subject_id",
        "referenceIdFieldInDataIndex": "subject_id"
      }
    },
    "charts": {
      "project": {
        "chartType": "count",
        "title": "Projects"
      },
      "study": {
        "chartType": "count",
        "title": "Studies"
      },
      "file_type": {
        "chartType": "count",
        "title": "File Types"
      },
      "ethnicity": {
        "chartType": "stackedBar",
        "title": "Ethnicity"
      },
      "gender": {
        "chartType": "pie",
        "title": "Gender"
      },
      "race": {
        "chartType": "pie",
        "title": "Race"
      },
      "vital_status": {
        "chartType": "bar",
        "title": "Vital Status"
      }
    },
    "filters": {
      "tabs": [
        {
          "title": "Project",
          "fields": [
            "project",
            "study"
          ]
        },
        {
          "title": "Subject",
          "fields": [
            "race",
            "ethnicity",
            "gender",
            "vital_status"
          ]
        },
        {
          "title": "File",
          "fields": [
            "file_type"
          ]
        }
      ]
    },
    "buttons": [
      {
        "enabled": true,
        "type": "data",
        "title": "Download All Data",
        "leftIcon": "user",
        "rightIcon": "download",
        "fileName": "data.json"
      },
      {
        "enabled": true,
        "type": "manifest",
        "title": "Download Manifest",
        "leftIcon": "datafile",
        "rightIcon": "download",
        "fileName": "manifest.json"
      }
    ],
    "table": {
      "enabled": true,
      "fields": [
        "project",
        "study",
        "race",
        "ethnicity",
        "gender",
        "vital_status",
        "whatever_lab_result_value",
        "file_count",
        "file_type",
        "file_format"
      ]
    }

Notice that filters and charts are same as previous cofnig, and for table there's extra table.fields block. For backward compatibility, if there's no "guppyConfig" block in portal config, data explorer will still use arranger for data explorer page by reading arrangerConfig and related config blocks.

New Features

  • Use guppy for data explorer instead of arranger

Breaking Changes

Bug Fixes

Improvements

Dependency updates

Deployment changes

qingyashu added 18 commits Mar 14, 2019
"guppyConfig": {
"dataType": "subject",
"fieldMapping": [
{ "field": "project", "name": "Project" },

This comment has been minimized.

Copy link
@thanh-nguyen-dang

thanh-nguyen-dang Apr 15, 2019

Member

Should we automate this part to only configure the special mapping?
I mean if it is only project -> Project or vital_status -> Vital Status you don't need to put it in the fieldMapping.

This comment has been minimized.

Copy link
@qingyashu

qingyashu Apr 15, 2019

Author Contributor

I think sometimes some field name mapping will need more caring, like thrpyv, but yeah automation is a good idea, I think we could combine both automation and customized names

@qingyashu qingyashu force-pushed the feat/guppy-explorer branch from e27040d to 0dae0fa Apr 16, 2019
@qingyashu qingyashu requested a review from thanh-nguyen-dang Apr 17, 2019
@@ -123,7 +123,7 @@
},
"login": {
"title": "NIAID Data Hub",
"subTitle": "Explore, Analyze, and Share Data",
"subTitle": "search, compare, and download data",

This comment has been minimized.

Copy link
@abgeorge7

abgeorge7 Apr 17, 2019

Contributor

can you change this back to "Explore, Analyze, and Share Data" ?

This comment has been minimized.

Copy link
@qingyashu

qingyashu Apr 17, 2019

Author Contributor

Prod use this so I copied them

This comment has been minimized.

Copy link
@abgeorge7

abgeorge7 Apr 17, 2019

Contributor

:O I'll change prod - they should all be "Explore, Analyze, and Share Data" now

"hiv_status"
]
}
]
},
"table": {
"enabled": false
"enabled": true,

This comment has been minimized.

Copy link
@abgeorge7

abgeorge7 Apr 17, 2019

Contributor

and this to false?

This comment has been minimized.

Copy link
@qingyashu

qingyashu Apr 17, 2019

Author Contributor

Sure~

const end = (this.state.currentPage + 1) * this.state.pageSize;
return (
<div className={`explorer-table ${this.props.className}`}>
<p className='explorer-table__description'>{`Showing ${start} - ${end} of ${totalCount} cases`}</p>

This comment has been minimized.

Copy link
@abgeorge7

abgeorge7 Apr 17, 2019

Contributor

"cases" here shouldn't be hardcoded - for example, NIAID uses "subjects"

qingyashu and others added 12 commits Apr 18, 2019
* feat(Explorer): export to PFB
* feat(Guppy/Explorer): unified toaster for export to workspace and export to PFB
* feat(Guppy/Explorer): functionality for export to PFB button
@ZakirG
ZakirG approved these changes Apr 24, 2019
@qingyashu qingyashu merged commit f01ad70 into master Apr 24, 2019
3 of 4 checks passed
3 of 4 checks passed
Codacy/PR Quality Review Hang in there, Codacy is reviewing your Pull request.
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@m0nhawk m0nhawk deleted the feat/guppy-explorer branch Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.