Commit 11df2a5e authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed duplicate code_name entry in GUI searchQuantities. #341

parent eabff2df
Pipeline #75019 passed with stages
in 28 minutes and 22 seconds
......@@ -26,3 +26,4 @@ nomad.yaml
build/
dist/
setup.json
parser.osio.log
......@@ -5,7 +5,7 @@ import * as d3 from 'd3'
import { scaleBand, scalePow } from 'd3-scale'
import { formatQuantity, nomadPrimaryColor, nomadSecondaryColor, nomadFontFamily } from '../../config.js'
import { searchContext } from './SearchContext.js'
import * as searchQuantities from '../../searchQuantities.json'
import searchQuantities from '../../searchQuantities'
const unprocessedLabel = 'not processed'
const unavailableLabel = 'unavailable'
......
......@@ -234,7 +234,7 @@
"name": "dft.code_name",
"description": "The name of the used code.",
"many": false,
"statistic_size": 36,
"statistic_size": 34,
"statistic_values": [
"ABINIT",
"ATK",
......@@ -246,30 +246,28 @@
"Crystal",
"DL_POLY",
"DMol3",
"elastic",
"elk",
"exciting",
"FHI-aims",
"fleur",
"GAMESS",
"GPAW",
"GPAW",
"Gaussian",
"GPAW",
"gulp",
"libAtoms",
"MOLCAS",
"NWChem",
"Octopus",
"ONETEP",
"ORCA",
"Octopus",
"Phonopy",
"qbox",
"Quantum Espresso",
"Siesta",
"VASP",
"turbomole",
"VASP",
"WIEN2k",
"elastic",
"elk",
"exciting",
"fleur",
"gulp",
"libAtoms",
"qbox",
"turbomole",
"unavailable",
"not processed"
]
......
......@@ -506,8 +506,10 @@ parser_dict['parser/octopus'] = parser_dict['parsers/octopus']
parser_dict['parser/onetep'] = parser_dict['parsers/onetep']
# register code names as possible statistic value to the dft datamodel
code_names = sorted([
getattr(parser, 'code_name')
for parser in parsers
if parser.domain == 'dft' and getattr(parser, 'code_name', None) is not None and getattr(parser, 'code_name') != 'currupted mainfile'])
code_names = sorted(
set([
getattr(parser, 'code_name')
for parser in parsers
if parser.domain == 'dft' and getattr(parser, 'code_name', None) is not None and getattr(parser, 'code_name') != 'currupted mainfile']),
key=lambda code_name: code_name.lower())
datamodel.DFTMetadata.code_name.a_search.statistic_values = code_names + [config.services.unavailable_value, config.services.not_processed_value]
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