A React component to explore AiiDA provenance.
This is a new version under development with the goal to replace https://github.com/materialscloud-org/aiida-explorer.
The initial version of this tool was created by Sharan Poojari during Google Summer of Code 2024 (see the final report).
This repository contains
- the
AiidaExplorer
component (library), which is also published tonpm
; and - a demo page illustrating the usage, which is deployed to github pages (https://aiidateam.github.io/aiida-explorer/).
Install via
npm install aiida-explorer
And use with the following (note that the components needs to be inside a Routes
object as it contains Route
objects itself.)
import { BrowserRouter, Routes, Route } from "react-router-dom";
import AiidaExplorer from "aiida-explorer";
<BrowserRouter>
<Routes>
<Route path="/*" element={<AiidaExplorer apiUrl={aiidaRestApiUrl} />} />
</Routes>
</BrowserRouter>;
where aiidaRestApiUrl
is the base url of the AiiDA REST API.
For development, start the demo page by
npm install
npm run dev
To build just the AiidaExplorer
component and test locally in an external application (e.g. before publishing to npm
), use
npm run build:lib
npm pack
which will create a .tgz
file that can then be installed by the external application via
npm install /path/to/aiida-explorer-x.y.z.tgz
To make a new version and publish to npm via GitHub Actions:
npm version <major/minor/patch>
git push --follow-tags
The demo page is deployed to Github pages automatically from the main
branch.
Additionally, any pull request gets deployed in it's own subpath as well.
Manual deployment to Github pages should not be done, as that might break any PR previews.