0.0.2 • Published 1 year ago
aiida-explorer v0.0.2
Next-gen AiiDA provenance explorer
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-explorerAnd 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.
Development
Using the demo page
For development, start the demo page (in src/App.jsx) by
npm install
npm run devBuilding and testing locally the library
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 packwhich will create a .tgz file that can then be installed by the external application via
npm install /path/to/aiida-explorer-x.y.z.tgzPublishing a new version of the library on npm
To make a new version and publish to npm via GitHub Actions:
npm version <major/minor/patch>
git push --follow-tags