Commit e893fbff authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Merge branch 'release' into 'v0.8.1'

Release

See merge request !126
parents f339af36 2866fce1
Pipeline #77825 passed with stages
in 20 minutes and 1 second
......@@ -26,12 +26,12 @@ You can install the `nomad` Python package from source distribution with pip. Pl
note, that this will only install part of NOMAD's dependencies that will only allow
your to use NOMAD's client library, e.g. to access the NOMAD Archive.
```
pip install nomad
pip install nomad-lab
```
To **use the NOMAD parsers for example**, install the `parsing` extra:
```
pip install nomad[parsing]
pip install nomad-lab[parsing]
nomad parse --show-backend <your-file-to-parse>
```
......@@ -48,6 +48,7 @@ Omitted versions are plain bugfix releases with only minor changes and fixes.
### v0.8.1
- switched to support Python 3.7
- client library as pypi package `nomad-lab`
### v0.8.0
- new underlying datamodel that allows to maintain multiple domains
......
Subproject commit 4674d1ad944d181aab12695503154d839f40b5b0
Subproject commit 2849061c5212de8e2845ec0c3ed96b7a7f4e67d9
Subproject commit 89e18d81a5a6fa658c1c0008f0078cb58dd2cbd2
Subproject commit ca7513c0e23b20d738f65b081b482e74a8d0527d
Subproject commit d054d15c08b6da05d8afded4410474bdea999717
Subproject commit 99f576323efc2aa8ede5b63b108d9fe6901a8795
......@@ -6,5 +6,11 @@ window.nomadEnv = {
'debug': false,
'matomoEnabled': true,
'matomoUrl': 'https://repository.nomad-coe.eu/fairdi/stat',
'matomoSiteId': '2'
'matomoSiteId': '2',
'version': {
"label": "0.8.1",
"isBeta": true,
"usesBetaData": true,
"officialUrl": "https://repository.nomad-coe.eu/app/gui"
}
}
// trigger rebuild
import React, { useEffect, useState, useContext, useCallback, useRef } from 'react'
import PropTypes from 'prop-types'
import { compose } from 'recompose'
......@@ -7,7 +5,7 @@ import classNames from 'classnames'
import { MuiThemeProvider, withStyles, makeStyles } from '@material-ui/core/styles'
import { LinearProgress, MenuList, Typography,
AppBar, Toolbar, Button, DialogContent, DialogTitle, DialogActions, Dialog, Tooltip,
Snackbar, SnackbarContent, FormGroup, FormControlLabel, Switch } from '@material-ui/core'
Snackbar, SnackbarContent, FormGroup, FormControlLabel, Switch, IconButton } from '@material-ui/core'
import { Route, Link, withRouter, useLocation } from 'react-router-dom'
import BackupIcon from '@material-ui/icons/Backup'
import SearchIcon from '@material-ui/icons/Search'
......@@ -18,6 +16,7 @@ import MetainfoIcon from '@material-ui/icons/Info'
import DocIcon from '@material-ui/icons/Help'
import CodeIcon from '@material-ui/icons/Code'
import TermsIcon from '@material-ui/icons/Assignment'
import UnderstoodIcon from '@material-ui/icons/Check'
import {help as searchHelp, default as SearchPage} from './search/SearchPage'
import HelpDialog from './Help'
import { ApiProvider, withApi, apiContext } from './api'
......@@ -25,7 +24,7 @@ import { ErrorSnacks, withErrors } from './errors'
import { help as entryHelp, default as EntryPage } from './entry/EntryPage'
import About from './About'
import LoginLogout from './LoginLogout'
import { guiBase, consent, nomadTheme, appBase } from '../config'
import { guiBase, consent, nomadTheme, appBase, version } from '../config'
import {help as metainfoHelp, default as MetaInfoBrowser} from './metaInfoBrowser/MetaInfoBrowser'
import packageJson from '../../package.json'
import {help as uploadHelp, default as UploadPage} from './uploads/UploadPage'
......@@ -109,6 +108,48 @@ MainMenuItem.propTypes = {
'icon': PropTypes.element.isRequired
}
const useBetaSnackStyles = makeStyles(theme => ({
root: {},
snack: {
backgroundColor: amber[700]
}
}))
function BetaSnack() {
const classes = useBetaSnackStyles()
const [understood, setUnderstood] = useState(false)
if (!version) {
console.log.warning('no version data available')
return ''
}
if (!version.isBeta) {
return ''
}
return <Snackbar className={classes.root}
anchorOrigin={{
vertical: 'bottom',
horizontal: 'left'
}}
open={!understood}
>
<SnackbarContent
className={classes.snack}
message={<span style={{color: 'white'}}>
You are using a beta version of NOMAD ({version.label}). {
version.usesBetaData ? 'This version is not using the official data. Everything you upload here, might get lost.' : ''
} Click <a style={{color: 'white'}} href={version.officialUrl}>here for the official NOMAD version</a>.
</span>}
action={[
<IconButton key={0} color="inherit" onClick={() => setUnderstood(true)}>
<UnderstoodIcon />
</IconButton>
]}
/>
</Snackbar>
}
function Consent() {
const [cookies, setCookie] = useCookies()
const [accepted, setAccepted] = useState(cookies['terms-accepted'])
......@@ -505,6 +546,7 @@ class App extends React.PureComponent {
render() {
return (
<MuiThemeProvider theme={nomadTheme}>
<BetaSnack />
<ErrorSnacks>
<ApiProvider>
<Navigation>
......
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 = `${appBase}/api`
......
......@@ -93,7 +93,13 @@ data:
"matomoSiteId": {{ .Values.gui.matomoSiteId }},
"matomoUrl": "{{ .Values.gui.matomoUrl }}",
"matomoEnabled": {{ .Values.gui.matomoEnabled }},
"debug": {{ .Values.gui.debug }}
"debug": {{ .Values.gui.debug }},
"version": {
"label": "{{ .Values.version.label }}",
"isBeta": {{ .Values.version.isBeta }},
"usesBetaData": {{ .Values.version.usesBetaData }},
"officialUrl": "{{ .Values.version.officialUrl }}"
}
};
---
apiVersion: apps/v1
......
## Default values for nomad@FAIRDI
version:
label: "0.8.1"
isBeta: false
usesBetaData: false
officialUrl: "https://repository.nomad-coe.eu/app/gui"
## Everything concerning the container images to be used
image:
......
......@@ -43,6 +43,7 @@ requirements.txt where specific comments are used to assign an extra to requirem
ignore_extra_requires = ['optimade']
''' Dependencies where the extra_requires should not be added '''
def parse_requirements():
'''
Parses the requirements.txt file to extras install and extra requirements.
......@@ -179,7 +180,7 @@ def compile_dependency_setup_kwargs(paths, **kwargs):
# 3. requires
local_install_requires = set()
if not name in ignore_extra_requires:
if name not in ignore_extra_requires:
for extra_require in local_kwargs.get('extras_require', {}).values():
for require in extra_require:
local_install_requires.add(require)
......@@ -234,17 +235,26 @@ def setup_kwargs():
from nomad import config
install_requires, extras_require = parse_requirements()
with open("README.md", "r") as fh:
long_description = fh.read()
return dict(
name='nomad-lab',
author='NOMAD Laboratory',
author_email='markus.scheidgen@physik.hu-berlin.de',
url='https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR',
version=config.meta.version,
license='APACHE 2.0',
description='The NOvel MAterials Discovery (NOMAD) Python package',
long_description=long_description,
long_description_content_type="text/markdown",
package_dir={'': './'},
packages=['nomad.%s' % pkg for pkg in find_packages('./nomad')] + ['nomad'],
setup_requires=['pip', 'setuptools', 'wheel', 'fastentrypoints', 'numpy', 'pyyaml'],
install_requires=install_requires,
extras_require=extras_require,
include_package_data=True,
python_requires='>=3.6',
entry_points='''
[console_scripts]
nomad=nomad.cli:run_cli
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment