Skip to content

Feat/guppy explorer#505

Merged
qingyashu merged 40 commits into
masterfrom
feat/guppy-explorer
Apr 24, 2019
Merged

Feat/guppy explorer#505
qingyashu merged 40 commits into
masterfrom
feat/guppy-explorer

Conversation

@qingyashu
Copy link
Copy Markdown
Contributor

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

Comment thread data/config/default.json Outdated
"guppyConfig": {
"dataType": "subject",
"fieldMapping": [
{ "field": "project", "name": "Project" },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 Compare April 16, 2019 15:30
Comment thread data/config/ndh.json Outdated
"login": {
"title": "NIAID Data Hub",
"subTitle": "Explore, Analyze, and Share Data",
"subTitle": "search, compare, and download data",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Prod use this so I copied them

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread data/config/ndh.json Outdated
},
"table": {
"enabled": false
"enabled": true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and this to false?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@qingyashu qingyashu merged commit f01ad70 into master Apr 24, 2019
@m0nhawk m0nhawk deleted the feat/guppy-explorer branch August 14, 2019 20:08
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.

5 participants