hise-publication-viewer
v1.2.8
Published
Renders publication objects for the Human Immune System Explorer (HISE)
Downloads
137
Keywords
Readme
hise-publication-viewer
Renders publication objects for the Human Immune System Explorer (HISE).
Exports a React component that renders a publication object, which includes the report, visualizations, and notebook and file download.
Default export is meant to be used only for 'preview mode' in the internal application.
Intaliation and usage
Intall via npm:
npm install hise-publication-viewer
# or
yarn add hise-publication-viewer
Then in a .jsx
file:
import PublicationViewer from 'hise-publication-viewer';
...
<PublicationViewer
publication={{
// Publication object
}}
/>
A publication object has the following properties:
{
//
// Required fields
//
// The publication title
title
// Short description of publication
summary
// List of publication funders
funders
// List of author objects with firstName and lastName (required), middleName and suffix,orcidId, affiliation (affil), and affiliation ROR (affilRor)
authorInfo
// List of preview images representing publication
heroImages
// Link to the publication report, a PDF or HTML file
reportLink
// Year of publication
publicationYear
// Publishing journal/resource
publisher
//
// Optional fields
//
// Link to download the associated Jupyter notebook
publicNotebook
// Links to datafiles required to run the notebook
publicFileSet
// Links to any github repos related to the publication
githubLinks
// Link to an interactive plotly visualization or dash app
publicVisualization
}
Development
Package components can be developed and tested using Storybook:
yarn storybook
Using the package locally via yarn link
If you want to try using this package locally, run:
yarn link
and in either HISE or public HISE:
yarn link hise-publication-viewer
To see any changes you've made, run
yarn build:local ingest-ui
or
yarn build:local hise-public-ui
build:local
runs the normal build
script but also replaces the React import so there aren't two versions being imported. The argument after build:local
is the directory name of the package you're linking to. For more context: https://github.com/facebook/react/issues/14721#issuecomment-815897397
If this does not work, you may also need to remove and reinstall node_modules from the repo that you are using this package.
Make sure to run yarn build
before committing changes.