Commit cc540ed5 authored by Markus Scheidgen's avatar Markus Scheidgen

Merge branch 'v0.8.3' into 'master'

Release 0.8.3

See merge request !135
parents f522e4b6 41238db5
Pipeline #79064 passed with stages
in 25 minutes and 31 seconds
......@@ -5,7 +5,7 @@ This project implements the new *nomad@FAIRDI* infrastructure. Contrary to its N
predecessor, it implements the NOMAD Repository and NOMAD Archive functionality within
a single cohesive application. This project provides all necessary artifacts to develop,
test, deploy, and operate the NOMAD Respository and Archive, e.g. at
[https://repository.nomad-coe.eu/app/gui](https://repository.nomad-coe.eu/app/gui).
[https://nomad-lab.eu](https://nomad-lab.eu).
In the future, this project's aim is to integrate more NOMAD CoE components, like the NOMAD
Encyclopedia and NOMAD Analytics Toolkit, to fully integrate NOMAD with one GUI and consistent
......@@ -37,7 +37,7 @@ nomad parse --show-backend <your-file-to-parse>
### For NOMAD developer
Read the [docs](https://repository.nomad-coe.eu/app/docs/index.html). The documentation is also part
Read the [docs](https://nomad-lab.eu/prod/rae/docs/index.html). The documentation is also part
of the source code. It covers aspects like introduction, architecture, development setup/deployment,
contributing, and API reference.
......
......@@ -4,8 +4,8 @@ API Reference
This is just a brief summary of all API endpoints of the NOMAD API. For a more compelling documention
consult our *swagger* dashboards:
- (NOMAD API)[swagger dashboard](https://repository.nomad-coe.eu/app/api/)
- (NOMAD's Optimade API)[swagger dashboard](https://repository.nomad-coe.eu/app/optimade/)
- (NOMAD API)[swagger dashboard](https://nomad-lab.eu/prod/rae/api/)
- (NOMAD's Optimade API)[swagger dashboard](https://nomad-lab.eu/prod/rae/optimade/)
Summary
......
......@@ -12,7 +12,7 @@ trade-offs between expressiveness, learning curve, and convinience:
- use a generic Python HTTP library like [requests](https://requests.readthedocs.io/en/master/)
- use more specific Python libraries like [bravado](https://github.com/Yelp/bravado) that turn HTTP requests into NOMAD
specific function calls based on an [OpenAPI spec](https://swagger.io/specification/) that NOMAD offers and that describes our API
- directly in the browser via our generated [swagger dashboard](https://repository.nomad-coe.eu/app/api/)
- directly in the browser via our generated [swagger dashboard](../api/)
- use the NOMAD Python client library, which offers custom and more powerful
implementations for certain tasks (currently only for accessing the NOMAD Archive)
......@@ -39,7 +39,7 @@ our gui) for entries that fit search criteria, like compounds having atoms *Si*
it:
```
curl -X GET "http://repository.nomad-coe.eu/app/api/repo/?atoms=Si&atoms=O"
curl -X GET "http://nomad-lab.eu/prod/rae/api/repo/?atoms=Si&atoms=O"
```
Here we used curl to send an HTTP GET request to return the resource located by the given URL.
......@@ -47,20 +47,20 @@ In practice you can omit the `-X GET` (which is the default) and you might want
the output:
```
curl "http://repository.nomad-coe.eu/app/api/repo/?atoms=Si&atoms=O" | python -m json.tool
curl "http://nomad-lab.eu/prod/rae/api/repo/?atoms=Si&atoms=O" | python -m json.tool
```
You'll see the the metadata of the first 10 entries that match your criteria. There
are various other query parameters. You find a full list in the generated [swagger dashboard
of our API](https://repository.nomad-coe.eu/app/api/).
of our API](https://nomad-lab.eu/prod/rae/api/).
Besides search criteria you can determine how many results (`per_page`) and what page of
results should be returned (`page`). If you want to go beyond the first 10.000 results
you can use our *scroll* API (`scroll=true`, `scroll_after`). You can limit what properties
should be returned (`include`, `exclude`). See the the generated [swagger dashboard
of our API](https://repository.nomad-coe.eu/app/api/) for more parameters.
of our API](https://nomad-lab.eu/prod/rae/api/) for more parameters.
If you use the [NOMAD Repository and Archive search interface](https://repository.nomad-coe.eu/app/gui/search)
If you use the [NOMAD Repository and Archive search interface](https://nomad-lab.eu/prod/rae/gui/search)
and create a query, you can click th a **<>**-button (right and on top of the result list).
This will give you some code examples with URLs for your search query.
......@@ -69,21 +69,21 @@ identified an entry (given via a `upload_id`/`calc_id`, see the query output), a
you want to download it:
```
curl "http://repository.nomad-coe.eu/app/api/raw/calc/JvdvikbhQp673R4ucwQgiA/k-ckeQ73sflE6GDA80L132VCWp1z/*" -o download.zip
curl "http://nomad-lab.eu/prod/rae/api/raw/calc/JvdvikbhQp673R4ucwQgiA/k-ckeQ73sflE6GDA80L132VCWp1z/*" -o download.zip
```
With `*` you basically requests all the files under an entry or path..
If you need a specific file (that you already know) of that calculation:
```
curl "http://repository.nomad-coe.eu/app/api/raw/calc/JvdvikbhQp673R4ucwQgiA/k-ckeQ73sflE6GDA80L132VCWp1z/INFO.OUT"
curl "http://nomad-lab.eu/prod/rae/api/raw/calc/JvdvikbhQp673R4ucwQgiA/k-ckeQ73sflE6GDA80L132VCWp1z/INFO.OUT"
```
You can also download a specific file from the upload (given a `upload_id`), if you know
the path of that file:
```
curl "http://repository.nomad-coe.eu/app/api/raw/JvdvikbhQp673R4ucwQgiA/exciting_basis_set_error_study/monomers_expanded_k8_rgkmax_080_PBE/72_Hf/INFO.OUT"
curl "http://nomad-lab.eu/prod/rae/api/raw/JvdvikbhQp673R4ucwQgiA/exciting_basis_set_error_study/monomers_expanded_k8_rgkmax_080_PBE/72_Hf/INFO.OUT"
```
If you have a query
......@@ -91,19 +91,19 @@ that is more selective, you can also download all results. Here all compounds th
consist of Si, O, bulk material simulations of cubic systems (currently ~100 entries):
```
curl "http://repository.nomad-coe.eu/app/api/raw/query?only_atoms=Si&only_atoms=O&system=bulk&crystal_system=cubic" -o download.zip
curl "http://nomad-lab.eu/prod/rae/api/raw/query?only_atoms=Si&only_atoms=O&system=bulk&crystal_system=cubic" -o download.zip
```
In a similar way you can see the archive of an entry:
```
curl "http://repository.nomad-coe.eu/app/api/archive/f0KQE2aiSz2KRE47QtoZtw/6xe9fZ9xoxBYZOq5lTt8JMgPa3gX" | python -m json.tool
curl "http://nomad-lab.eu/prod/rae/api/archive/f0KQE2aiSz2KRE47QtoZtw/6xe9fZ9xoxBYZOq5lTt8JMgPa3gX" | python -m json.tool
```
Or query and display the first page of 10 archives:
```
curl "http://repository.nomad-coe.eu/app/api/archive/query?only_atoms=Si&only_atoms=O" | python -m json.tool
curl "http://nomad-lab.eu/prod/rae/api/archive/query?only_atoms=Si&only_atoms=O" | python -m json.tool
```
## Using Python's *request* library
......@@ -115,7 +115,7 @@ client library that allows you to send requests:
import requests
import json
response = requests.get("http://repository.nomad-coe.eu/app/api/archive/query?only_atoms=Si&only_atoms=O")
response = requests.get("http://nomad-lab.eu/prod/rae/api/archive/query?only_atoms=Si&only_atoms=O")
data = response.json()
print(json.dumps(data), indent=2)
```
......@@ -128,7 +128,7 @@ specific functions for you.
```python
from bravado.client import SwaggerClient
nomad_url = 'http://repository.nomad-coe.eu/app/api'
nomad_url = 'http://nomad-lab.eu/prod/rae/api'
# create the bravado client
client = SwaggerClient.from_url('%s/swagger.json' % nomad_url)
......@@ -194,7 +194,7 @@ data you also need an account (email, password). The toy account used here, shou
available on most nomad installations:
```python
nomad_url = 'https://labdev-nomad.esc.rzg.mpg.de/fairdi/nomad/latest/api'
nomad_url = 'https://nomad-lab.eu/prod/rae/api'
user = 'leonard.hofstadter@nomad-fairdi.tests.de'
password = 'password'
```
......@@ -220,7 +220,7 @@ class KeycloakAuthenticator(Authenticator):
self.password = password
self.token = None
self.__oidc = KeycloakOpenID(
server_url='https://repository.nomad-coe.eu/fairdi/keycloak/auth/',
server_url='https://nomad-lab.eu/fairdi/keycloak/auth/',
realm_name='fairdi_nomad_prod',
client_id='nomad_public')
......@@ -296,7 +296,7 @@ if upload.tasks_status != 'SUCCESS':
```
Of course, you can also visit the nomad GUI
([https://labdev-nomad.esc.rzg.mpg.de/fairdi/nomad/latest/gui/uploads](https://labdev-nomad.esc.rzg.mpg.de/fairdi/nomad/latest/gui/uploads))
([https://nomad-lab.eu/prod/rae/gui/uploads](https://nomad-lab.eu/prod/rae/gui/uploads))
to inspect your uploads. (You might click reload, if you had the page already open.)
......@@ -379,7 +379,7 @@ or downloading data are only **GET** operations controlled by URL parameters. Fo
Downloading data:
```
curl http://repository.nomad-coe.eu/app/api/raw/query?upload_id=<your_upload_id> -o download.zip
curl http://nomad-lab.eu/prod/rae/api/raw/query?upload_id=<your_upload_id> -o download.zip
```
It is a litle bit trickier, if you need to authenticate yourself, e.g. to download
......@@ -387,18 +387,18 @@ not yet published or embargoed data. All endpoints support and most require the
an access token. To acquire an access token from our usermanagement system with curl:
```
curl --data 'grant_type=password&client_id=nomad_public&username=<your_username>&password=<your password>' \
https://repository.nomad-coe.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/token
https://nomad-lab.eu/fairdi/keycloak/auth/realms/fairdi_nomad_prod/protocol/openid-connect/token
```
You can use the access-token with:
```
curl -H 'Authorization: Bearer <you_access_token>' \
http://repository.nomad-coe.eu/app/api/raw/query?upload_id=<your_upload_id> -o download.zip
http://nomad-lab.eu/prod/rae/api/raw/query?upload_id=<your_upload_id> -o download.zip
```
### Conclusions
This was just a small glimpse into the nomad API. You should checkout our
[swagger-ui](https://repository.nomad-coe.eu/app/api/)
[swagger-ui](nomad-lab.eu/prod/rae/api/)
for more details on all the API endpoints and their parameters. You can explore the
API via the swagger-ui and even try it in your browser.
......
......@@ -27,7 +27,7 @@ Here is a breakdown of the different arguments:
* :code:`-n <url>`: Url to the API endpoint in the source deployment. This API will
be queried to fetch the data to be mirrored. E.g.
http://repository.nomad-coe.eu/api
http://nomad-lab.eu/prod/rae/api
* :code:`-u <username>`: Your username that is used for authentication in the API call.
* :code:`-w <password>`: Your password that is used for authentication in the API call.
* :code:`mirror <query>`: Your query as a JSON dictionary. See the documentation for
......
......@@ -14,7 +14,7 @@ Download and install latest release from nomad
.. code-block:: sh
curl https://repository.nomad-coe.eu/app/dist/nomad-lab.tar.gz -o nomad-lab.tar.gz
curl https://nomad-lab.eu/prod/rae/dist/nomad-lab.tar.gz -o nomad-lab.tar.gz
pip install ./nomad-lab.tar.gz
There are different layers of dependencies that you have to install, in order to use
......
......@@ -200,4 +200,4 @@ def setup(app):
# }, True)
# app.add_transform(AutoStructify)
extlinks = {'api': ('https://repository.nomad-coe.eu/app/api/%s', 'NOMAD API ')}
\ No newline at end of file
extlinks = {'api': ('https://nomad-lab.eu/prod/rae/api/%s', 'NOMAD API ')}
\ No newline at end of file
......@@ -14,9 +14,10 @@ This is the documentation of **nomad@FAIRDI**, the Open-Source continuation of t
original NOMAD-coe software that reconciles the original code base,
integrate it's services, allows 3rd parties to run individual and federated instance of
the nomad infrastructure, provides nomad to other material science domains, and applies
the FAIRDI principles as proliferated by the [FAIRDI Data Infrastructure e.V.](http://fairdi.eu).
the FAIRDI principles as proliferated by the [FAIRDI Data Infrastructure e.V.](https://fairdi.eu).
A central and publically available instance of the nomad software is run at the
[MPCDF](https://www.mpcdf.mpg.de/) in Garching, Germany.
[MPCDF](https://www.mpcdf.mpg.de/) in Garching, Germany. Software development and the
operation of NOMAD is done by the [NOMAD Laboratory](https://nomad-lab.eu)
The nomad software runs SAAS on a server and is used via web-based GUI and ReSTful
API. Originally developed and hosted as individual services, **nomad@FAIRDI**
......@@ -24,8 +25,7 @@ provides all services behind one GUI and API into a single coherent, integrated,
modular software project.
This documentation is only about the nomad *software*; it is about architecture,
how to contribute, code reference, engineering and operation of nomad. It is not a
nomad user manual.
how to contribute, code reference, engineering and operation of nomad.
## Architecture
......
......@@ -10,7 +10,7 @@ The NOMAD Metainfo stores descriptive and structured information about materials
data contained in the NOMAD Archive. The Metainfo can be understood as the schema of
the Archive. The NOMAD Archive data is
structured to be independent of the electronic-structure theory code or molecular-simulation,
(or beyond). The NOMAD Metainfo can be browsed as part of the `NOMAD Repository and Archive web application <https://repository.nomad-coe.eu/app/gui/metainfo>`_.
(or beyond). The NOMAD Metainfo can be browsed as part of the `NOMAD Repository and Archive web application <https://nomad-lab.eu/prod/rae/gui/metainfo>`_.
Typically (meta-)data definitions are generated only for a predesigned and specific scientific field,
application or code. In contrast, the NOMAD Metainfo considers all pertinent information
......@@ -29,10 +29,8 @@ the archive data is solely served by NOMAD's API.
The NOMAD Metainfo started within the `NOMAD Laboratory <https://nomad-lab.eu>`_. It was discussed at the
`CECAM workshop Towards a Common Format for Computational Materials Science Data <https://th.fhi-berlin.mpg.de/meetings/FCMSD2016/>`_
and is open to external contributions and extensions. More information can be found in:
- `Towards a Common Format for Computational Materials Science Data (Psi-K 2016 Highlight) <http://th.fhi-berlin.mpg.de/site/uploads/Publications/Psik_Highlight_131-2016.pdf>`_ provides a description on how to establish code-independent formats in detail and presents the challenges and practical strategies for achieving a common format for the representation of computational material-science data.
- `The Novel Materials Discovery Laboratory - Data formats and compression, D1.1 <https://www.nomad-coe.eu/uploads/outreach/Public%20Deliverables/NOMAD%20D1.1%20public%20KO20June2016.pdf>`_ outlines possible data formats, concepts, and compression techniques used to build a homogeneous (code-independent) data archive, called the NOMA
and is open to external contributions and extensions. More information can be found in
`Towards a Common Format for Computational Materials Science Data (Psi-K 2016 Highlight) <http://th.fhi-berlin.mpg.de/site/uploads/Publications/Psik_Highlight_131-2016.pdf>`_.
Metainfo Python Interface
......
......@@ -2,13 +2,14 @@
Uploading Data to the NOMAD Repository
======================================
To contribute your data to the repository, please, login to our `upload page <../uploads>`_ (you need to register first, if you do not have a NOMAD account yet).
To contribute your data to the repository, please, login to our `upload page <../gui/uploads>`_
(you need to register first, if you do not have a NOMAD account yet).
*A note for returning NOMAD users!* We revised the upload process with browser based upload
alongside new shell commands. The new Upload page allows you to monitor upload processing
and verify processing results before publishing your data to the Repository.
The `upload page <../uploads>`_ acts as a staging area for your data. It allows you to
The `upload page <../gui/uploads>`_ acts as a staging area for your data. It allows you to
upload data, to supervise the processing of your data, and to examine all metadata that
NOMAD extracts from your uploads. The data on the upload page will be private and can be
deleted again. If you are satisfied with our processing, you can publish the data.
......@@ -29,8 +30,9 @@ extract the most important information of POTCAR files and store it in the files
POTCAR files are only available to the uploader and assigned co-authors.
This is done automatically; you don't need to do anything.
Once published, data cannot be erased. Linking a corrected version to a corresponding older one ("erratum") will be possible soon.
Files from an improved calculation, even for the same material, will be handled as a new entry.
Once published, data cannot be erased. Linking a corrected version to a corresponding older
one ("erratum") will be possible soon. Files from an improved calculation, even for the
same material, will be handled as a new entry.
You can publish data as being open access or restricted for up to three years (with embargo).
For the latter you may choose with whom you want to share your data. We strongly support the
......
......@@ -4,7 +4,7 @@ This is a brief example on how to use the public nomad@FAIRDI API.
from bravado.client import SwaggerClient
nomad_url = 'http://repository.nomad-coe.eu/app/api'
nomad_url = 'http://nomad-lab.eu/prod/rae/api'
# create the bravado client
client = SwaggerClient.from_url('%s/swagger.json' % nomad_url)
......
......@@ -8,7 +8,7 @@ from urllib.parse import urlparse
from keycloak import KeycloakOpenID
from time import time
nomad_url = 'http://repository.nomad-coe.eu/app/api'
nomad_url = 'http://nomad-lab.eu/prod/rae/api'
user = 'yourusername'
password = 'yourpassword'
......@@ -21,7 +21,7 @@ class KeycloakAuthenticator(Authenticator):
self.password = password
self.token = None
self.__oidc = KeycloakOpenID(
server_url='https://repository.nomad-coe.eu/fairdi/keycloak/auth/',
server_url='https://nomad-lab.eu/fairdi/keycloak/auth/',
realm_name='fairdi_nomad_prod',
client_id='nomad_public')
......
{
"name": "nomad-fair-gui",
"version": "0.8.2",
"version": "0.8.3",
"commit": "e98694e",
"private": true,
"dependencies": {
......
window.nomadEnv = {
'keycloakBase': 'https://repository.nomad-coe.eu/fairdi/keycloak/auth/',
'keycloakBase': 'https://nomad-lab.eu/fairdi/keycloak/auth/',
'keycloakRealm': 'fairdi_nomad_test',
'keycloakClientId': 'nomad_gui_dev',
'appBase': 'http://localhost:8000/fairdi/nomad/latest',
'debug': false,
'matomoEnabled': true,
'matomoUrl': 'https://repository.nomad-coe.eu/fairdi/stat',
'matomoEnabled': false,
'matomoUrl': 'https://nomad-lab.eu/prod/stat',
'matomoSiteId': '2',
'version': {
"label": "0.8.2",
"label": "0.8.3",
"isBeta": false,
"usesBetaData": false,
"officialUrl": "https://repository.nomad-coe.eu/app/gui"
"officialUrl": "https://nomad-lab.eu/prod/rae/gui"
}
}
......@@ -100,7 +100,7 @@ export default function About() {
window.location.href = 'https://encyclopedia.nomad-coe.eu/gui/#/search'
})
makeClickable('analytics', () => {
window.location.href = 'https://www.nomad-coe.eu/index.php?page=bigdata-analyticstoolkit'
window.location.href = 'https://nomad-lab.eu/index.php?page=AItutorials'
})
makeClickable('search', () => {
history.push('/search')
......@@ -144,10 +144,14 @@ export default function About() {
This is the *graphical user interface* (GUI) for the NOMAD Repository and
Archive. It allows you to **search, access, and download all NOMAD data** in its
raw (Repository) and processed (Archive) form. You can **upload and manage your own
raw materials science data**. Learn more about what data can be uploaded
and how to prepare your data on the [NOMAD Repository homepage](https://repository.nomad-coe.eu/).
You can access all published data without an account. If you want to provide
your own data, please login or register for an account.
raw materials science data**. You can access all published data without an account.
If you want to provide your own data, please login or register for an account.
You can learn more about on the NOMAD Repository and Archive
[homepage](https://nomad-lab.eu/index.php?page=repo-arch), our
[documentation](${appBase}/docs/index.html).
There is also an [FAQ](https://nomad-lab.eu/index.php?page=repository-archive-faqs)
and the more detailed [uploader documentation](${appBase}/docs/upload.html).
`}</Markdown>
</Grid>
<InfoCard xs={6} title="Interactive Search" top>
......@@ -217,7 +221,7 @@ export default function About() {
There is a [tutorial on how to use the API with plain Python](${appBase}/docs/api_tutorial.html).
Another [tutorial covers how to install and use NOMAD's Python client library](${appBase}/docs/archive_tutorial.html).
The [NOMAD Analytics Toolkit](https://analytics-toolkit.nomad-coe.eu) allows to use
The [NOMAD Analytics Toolkit](https://nomad-lab.eu/index.php?page=AIToolkit) allows to use
this without installation and directly on NOMAD servers.
`}</Markdown></InfoCard>
<Grid item xs={12}>
......
......@@ -278,7 +278,7 @@ function MainMenu() {
/>
<MainMenuItem
title="FAQ"
path="/faq"
href="https://nomad-lab.eu/index.php?page=repository-archive-faqs"
tooltip="Frequently Asked Questions (FAQ)"
icon={<FAQIcon/>}
/>
......@@ -456,7 +456,7 @@ class NavigationUnstyled extends React.Component {
disableGutters
>
<div className={classes.title}>
<a href="https://nomad-coe.eu">
<a href="https://nomad-lab.eu">
<img alt="The NOMAD logo" className={classes.logo} src={`${guiBase}/nomad.png`}></img>
</a>
<Typography variant="h6" color="inherit" noWrap>
......
......@@ -17,7 +17,10 @@ class Quantity extends React.Component {
row: PropTypes.bool,
column: PropTypes.bool,
data: PropTypes.object,
quantity: PropTypes.string,
quantity: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func
]),
withClipboard: PropTypes.bool,
ellipsisFront: PropTypes.bool
}
......@@ -79,8 +82,18 @@ class Quantity extends React.Component {
valueClassName = `${valueClassName} ${classes.ellipsisFront}`
}
let value
if (!loading) {
const value = data && quantity && _.get(data, quantity)
if (typeof quantity === 'string') {
value = data && quantity && _.get(data, quantity)
} else {
try {
value = quantity(data)
} catch {
value = undefined
}
}
if (children && children.length !== 0) {
content = children
} else if (value) {
......@@ -95,12 +108,14 @@ class Quantity extends React.Component {
}
}
const useLabel = label || (typeof quantity === 'string' ? quantity : 'MISSING LABEL')
if (row || column) {
return <div className={row ? classes.row : classes.column}>{children}</div>
} else {
return (
<div className={classes.root}>
<Typography noWrap classes={{root: classes.label}} variant="caption">{label || quantity}</Typography>
<Typography noWrap classes={{root: classes.label}} variant="caption">{useLabel}</Typography>
<div className={classes.valueContainer}>
{loading
? <Typography noWrap={noWrap} variant={typography} className={valueClassName}>
......@@ -108,7 +123,7 @@ class Quantity extends React.Component {
</Typography> : content}
{withClipboard
? <CopyToClipboard className={classes.valueAction} text={clipboardContent} onCopy={() => null}>
<Tooltip title={`Copy ${label || quantity} to clipboard`}>
<Tooltip title={`Copy ${useLabel} to clipboard`}>
<div>
<IconButton disabled={!clipboardContent} classes={{root: classes.valueActionButton}} >
<ClipboardIcon classes={{root: classes.valueActionIcon}}/>
......
import React from 'react'
import PropTypes from 'prop-types'
import { Typography } from '@material-ui/core'
import { Typography, Button, makeStyles, Tooltip } from '@material-ui/core'
import Quantity from '../Quantity'
import _ from 'lodash'
import {appBase} from '../../config'
export default class DFTEntryOverview extends React.Component {
static propTypes = {
data: PropTypes.object.isRequired,
loading: PropTypes.bool
const useStyles = makeStyles(theme => ({
actions: {
marginTop: theme.spacing(1),
textAlign: 'right',
margin: -theme.spacing(1)
}
}))
render() {
const { data } = this.props
export default function DFTEntryOverview(props) {
const classes = useStyles()
const {data} = props
if (!data.dft) {
return <Typography color="error">No metadata available</Typography>
}
if (!data.dft) {
return <Typography color="error">No metadata available</Typography>
}
const material_name = entry => entry.encyclopedia.material.material_name
return (
<Quantity column>
<Quantity row>
<Quantity quantity="formula" label='formula' noWrap {...this.props} />
</Quantity>
<Quantity row>
<Quantity quantity="dft.code_name" label='dft code' noWrap {...this.props} />
<Quantity quantity="dft.code_version" label='dft code version' noWrap {...this.props} />
</Quantity>
<Quantity row>
<Quantity quantity="dft.basis_set" label='basis set' noWrap {...this.props} />
<Quantity quantity="dft.xc_functional" label='xc functional' noWrap {...this.props} />
</Quantity>
<Quantity row>
<Quantity quantity="dft.system" label='system type' noWrap {...this.props} />
<Quantity quantity="dft.crystal_system" label='crystal system' noWrap {...this.props} />
<Quantity quantity="dft.spacegroup_symbol" label="spacegroup" noWrap {...this.props}>
<Typography noWrap>
{_.get(data, 'dft.spacegroup_symbol')} ({_.get(data, 'dft.spacegroup')})
</Typography>
</Quantity>
return <div>
<Quantity column>
<Quantity row>
<Quantity quantity="formula" label='formula' noWrap {...props} />
<Quantity quantity={material_name} label='material name' noWrap {...props} />
</Quantity>
<Quantity row>
<Quantity quantity="dft.code_name" label='dft code' noWrap {...props} />
<Quantity quantity="dft.code_version" label='dft code version' noWrap {...props} />
</Quantity>
<Quantity row>
<Quantity quantity="dft.basis_set" label='basis set' noWrap {...props} />
<Quantity quantity="dft.xc_functional" label='xc functional' noWrap {...props} />
</Quantity>
<Quantity row>
<Quantity quantity="dft.system" label='system type' noWrap {...props} />
<Quantity quantity="dft.crystal_system" label='crystal system' noWrap {...props} />
<Quantity quantity="dft.spacegroup_symbol" label="spacegroup" noWrap {...props}>
<Typography noWrap>
{_.get(data, 'dft.spacegroup_symbol')} ({_.get(data, 'dft.spacegroup')})
</Typography>
</Quantity>
</Quantity>
)
}
</Quantity>
{data.encyclopedia && data.encyclopedia.material &&
<div className={classes.actions}>
<Tooltip title="Show the material of this entry in the NOMAD Encyclopedia.">
<Button color="primary" href={`${appBase}/encyclopedia/#/material/${data.encyclopedia.material.material_id}`}>
material
</Button>
</Tooltip>
</div>
}
</div>
}
DFTEntryOverview.propTypes = {
data: PropTypes.object.isRequired
}
......@@ -138,11 +138,10 @@ class RepoEntryView extends React.Component {
<CardContent classes={{root: classes.cardContent}}>
<Quantity column style={{maxWidth: 350}}>
<Quantity quantity="calc_id" label={`${domain ? domain.entryLabel : 'entry'} id`} noWrap withClipboard {...quantityProps} />
<Quantity quantity="pid" label='PID' loading={loading} placeholder="not yet assigned" noWrap {...quantityProps} withClipboard />
<Quantity quantity={entry => entry.encyclopedia.material.material_id} label='material id' loading={loading} noWrap {...quantityProps} withClipboard />
<Quantity quantity="raw_id" label='raw id' loading={loading} noWrap {...quantityProps} withClipboard />
<Quantity quantity="external_id" label='external id' loading={loading} noWrap {...quantityProps} withClipboard />
<Quantity quantity="mainfile" loading={loading} noWrap ellipsisFront {...quantityProps} withClipboard />
<Quantity quantity="calc_hash" label={`${domain ? domain.entryLabel : 'entry'} hash`} loading={loading} noWrap {...quantityProps} />
<Quantity quantity="upload_id" label='upload id' {...quantityProps} noWrap withClipboard />
<Quantity quantity="upload_time" label='upload time' noWrap {...quantityProps} >
<Typography noWrap>
......
......@@ -8,6 +8,7 @@ import MetainfoSearch from './MetainfoSearch'
import { FormControl, Select, Input, MenuItem, ListItemText, InputLabel, makeStyles } from '@material-ui/core'
import { schema } from '../MetaInfoRepository'
import { errorContext } from '../errors'
import { appBase } from '../../config'
export const help = `
The NOMAD *metainfo* defines all quantities used to represent archive data in
......@@ -37,7 +38,7 @@ reference (blue) relations.
If you bookmark this page, you can save the definition represented by the highlighted
*main* card.
To learn more about the meta-info, visit the [meta-info homepage](https://metainfo.nomad-coe.eu/nomadmetainfo_public/archive.html).
To learn more about the meta-info, visit the [meta-info documentation](${appBase}/docs/metainfo.html).
`
const MenuProps = {
PaperProps: {
......
import React from 'react'
import PropTypes, { instanceOf } from 'prop-types'
import Markdown from '../Markdown'
import { withStyles, Paper, IconButton, FormGroup, FormLabel, Tooltip, Typography } from '@material-ui/core'
import { withStyles, Paper, IconButton, FormGroup, FormLabel, Tooltip, Typography, Link } from '@material-ui/core'
import UploadIcon from '@material-ui/icons/CloudUpload'
import Dropzone from 'react-dropzone'
import Upload from './Upload'
......@@ -14,13 +14,13 @@ import { withApi } from '../api'
import { withCookies, Cookies } from 'react-cookie'
import Pagination from 'material-ui-flat-pagination'
import { CopyToClipboard } from 'react-copy-to-clipboard'
import { guiBase } from '../../config'
import { guiBase, appBase } from '../../config'
import qs from 'qs'
import { CodeList } from '../About'
export const help = `
NOMAD allows you to upload data. After upload, NOMAD will process your data: it will
identify the main output files of [supported codes](https://www.nomad-coe.eu/the-project/nomad-repository/nomad-repository-howtoupload)
identify the main output files of supported codes.
and then it will parse these files. The result will be a list of entries (one per each identified mainfile).
Each entry is associated with metadata. This is data that NOMAD acquired from your files and that
describe your calculations (e.g. chemical formula, used code, system type and symmetry, etc.).
......@@ -275,6 +275,8 @@ class UploadPage extends React.Component {
NOMAD will search through all files and identify the relevant files automatically.
Each uploaded file can be <b>up to 32GB</b> in size, you can have <b>up to 10 unpublished
uploads</b> simultaneously. Your uploaded data is not published right away.
Find more details about uploading data in our <Link href={`${appBase}/docs/upload.html`}>documentation</Link> or visit
our <Link href="https://nomad-lab.eu/index.php?page=repository-archive-faqs">FAQs</Link>.
</Typography>
<Typography>
The following codes are supported: <CodeList/>.
......
......@@ -3,7 +3,7 @@ import { createMuiTheme } from '@material-ui/core'
window.nomadEnv = window.nomadEnv || {}
export const version = window.nomadEnv.version
export const appBase = window.nomadEnv.appBase.replace(/\/$/, '')
// export const apiBase = 'http://repository.nomad-coe.eu/v0.8/api'
// export const apiBase = 'http://nomad-lab.eu/prod/rae/api'
export const apiBase = `${appBase}/api`
export const optimadeBase = `${appBase}/optimade`
export const guiBase = process.env.PUBLIC_URL
......@@ -19,7 +19,7 @@ export const maxLogsToShow = 50
export const consent = `
By using this web-site and by uploading and downloading data, you agree to the
[terms of use](https://www.nomad-coe.eu/the-project/nomad-repository/nomad-repository-terms).
[terms of use](https://nomad-lab.eu/index.php?page=terms).
Uploaded data is licensed under the Creative Commons Attribution license
([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)). You can publish
......
......@@ -18,7 +18,7 @@ export const matomo = matomoEnabled ? PiwikReactRouter({
siteId: matomoSiteId,
clientTrackerName: 'stat.js',
serverTrackerName: 'stat'
}) : null
}) : []
const keycloak = Keycloak({
url: keycloakBase,
......
......@@ -20,7 +20,8 @@ from typing import Dict, Any
from flask_restplus import Resource, fields