ral-facilities / datagateway

DataGateway is a portal that supports discovery and access large science facilities data. It is developed as a plugin for SciGateway
Apache License 2.0
9 stars 5 forks source link

DataGateway

License Build Status codecov

DataGateway is a ReactJs-based web application that provides ways of discovering and accessing data produced at large-scale science facilities. DataGateway is a micro-frontend that can be integrated with the parent web application SciGateway.

DataGateway uses Yarn workspaces to manage it's monorepo structure, so please use Yarn instead of npm for package management.

The SciGateway application offers features such as authentication and authorisation functionality, notifications, cookies management. In this way, DataGateway relies on SciGateway for these overarching features, and can focus on providing data discoverability and downloads. The data is organised according to the data hierarchy that reflects the data pipelines in each facility. The data is shown in a tabular format depicting the main metadata fields.

For more details about the project's architecture, development guidelines and installation procedures, visit the SciGateway documentation.

Code structure

The project is structured as a monorepo. This means that the actual code packages are located under /packages - below is a description of each package:

Available Scripts

In the project directory, you can run:

yarn install

This will install all the project dependencies. Running yarn install at the top level initialises all the packages, and you will be ready to start development in any of them!

yarn workspace {workspace-name} add {package(s)} / yarn workspaces run add {package(s)}

Adds new packages. Use the first command to add a package to a project at the top level. Alternatively, you can also change directory to the plugin you're developing and run yarn add {package(s)} like normal. Use the second command to add a package to all projects.

yarn workspace datagateway-dataview add loglevel

This will add the loglevel package to datagateway-dataview

yarn workspaces add loglevel

This will add the loglevel package to all packages.

Remember that you can use --dev to save as a devDependency instead of a regular dependency.

yarn datagateway-dataview

Runs the datagateway-dataview start script, which runs the app in development mode. Open http://localhost:3000 to view it in the browser.

Similarly, use yarn datagateway-download and yarn datagateway-search to run the datagateway-download and datagateway-search packages respectively.

yarn test

Runs both unit tests and e2e tests for all packages

yarn test:unit

Runs unit tests for all packages

yarn test:e2e

Runs e2e tests for all packages

yarn lint

Lints all packages

yarn tsc

Runs tsc on all packages - currently this will re-build datagateway-common