Skip to content

MIDRC/midrc-bih

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

105 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the NextJS Application for the MIDRC BDF Imaging Hub.

Supported Runtime Versions

This project requires:

  • Node.js >= 22.11.0
  • npm >= 10.9.0
  • TypeScript ^5.9.3
  • Python >= 3.6

The project is built with Next.js ^15.5.5.

Getting Started

Gen3 Data Commons using the Gen3 Frontend Framework is a matter of the following:

  • create a clone of Gen3 Data Commons Application  

  • Configure the commons by editing the configuration files in the config

  • Add your pages and content

  • Deploy via helm charts or Docker.

Changes to the Gen3 Data Commons Application can be pulled from the Common Frontend Repository. You need configure git to pull from the Common Frontend Repository.

git remote add upstream https://github.com/uc-cdis/commons-frontend-app.git

or

git remote add upstream git@github.com:uc-cdis/commons-frontend-app.git

changes to main can be pulled from the Common Frontend Repository by running:

git pull upstream main

Please see Styling and Theming and Local Development with Helm Charts for more information on setting up and configuring the Gen3 Data Commons Application. This documentation is currently less complete than we would like, but we will be adding to it as development progresses.

Installation for local testing

The minimum node version is set to v20.11.0 only from an LTS perspective. Node can be downloaded from the official Node.js site. You may also consider using a Node version manager. Your version of Node may not ship with npm v10. To install it, run:

npm install npm@10.2.4 -g

Note: if you see this error:

npm ERR! code ENOWORKSPACES
npm ERR! This command does not support workspaces.

you can run npx next telemetry disable

Alternatively, you can use nvm to install the correct version of npm:

nvm install 20.11.0

Install Dependencies

From the root of the project, install dependencies by running:

npm install

Run the Development Server

npm run dev

Open http://localhost:3000 with your browser to see the result.

Docker

You build a Docker image by:

docker build .

REST-API

The tools utilized for MIDRC interact with the Gen3 API. For more information, see the service specifications of the Gen3 API.

Harmonization

MIDRC BIH leverages a data model in order to harmonize the discovery metadata aggregated across the data mesh. If you would like to view some sample submission templates, you can find them in this directory. Including for example, dataset.json, subject.json, etc.

Updating a forked commons

The following steps usually apply to update a forked commons.

Get the changes from the parent fork:

git remote add upstream git@github.com:uc-cdis/commons-frontend-app.git 
git fetch upstream

Create a branch and merge changes from upstream:

git merge upstream/main

If the above has the error message: "fatal: refusing to merge unrelated histories" error. This often happens when the repo was created as a template, not a fork. To resolve this, the --allow-unrelated-histories flag can be used during the merge operation. This flag forces Git to merge the branches despite lacking a common history.

git merge upstream/main --allow-unrelated-histories

If you use this flag, it is recommended that you carefully review the changes and resolve any conflicts before finalizing the merge.

You will see merge conflicts. In general: take the remote's version for everything except the config files, as those are customized to the commons config. Resolve any remaining config issues and open a PR. Test the new common by running it locally or in a staging environment.

If you'd like to contribute to this project, check out CONTRIBUTING.md.

About

Collection of configuration files required to deploy the MIDRC Biomedical Imaging Hub (BIH) using the Gen3 software.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 78.2%
  • JavaScript 18.7%
  • Dockerfile 2.1%
  • Other 1.0%