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
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 (in src/App.jsx
) 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