Commit a807f9e2 authored by David Sikter's avatar David Sikter
Browse files

Removing UserProvidableMetadata. The ArchiveParser no longer updates any metadata quantities.

parent 9b3bbc0c
Pipeline #117998 passed with stages
in 40 minutes and 23 seconds
......@@ -74,7 +74,7 @@ import sys
from nomad.metainfo import Environment
from .datamodel import (
Dataset, User, Author, EditableUserMetadata, UserProvidableMetadata, AuthLevel,
Dataset, User, Author, EditableUserMetadata, AuthLevel,
UploadMetadata, MongoUploadMetadata, MongoEntryMetadata, MongoSystemMetadata,
EntryMetadata, EntryArchive)
from .optimade import OptimadeEntry, Species
......@@ -290,16 +290,9 @@ class DatasetReference(metainfo.Reference):
dataset_reference = DatasetReference()
class UserProvidableMetadata(metainfo.MCategory):
NOMAD entry metadata quantities that can be edited by the user before publish,
i.e. via metadata files or api/ui.
class EditableUserMetadata(metainfo.MCategory):
''' NOMAD entry metadata quantities that can be edited by the user before or after publish. '''
m_def = metainfo.Category(categories=[UserProvidableMetadata])
class MongoUploadMetadata(metainfo.MCategory):
......@@ -486,11 +479,10 @@ class EntryMetadata(metainfo.MSection):
The code specific identifier extracted from the entry's raw files by the parser,
if supported.
external_id = metainfo.Quantity(
type=str, categories=[MongoEntryMetadata, UserProvidableMetadata, EditableUserMetadata],
type=str, categories=[MongoEntryMetadata, EditableUserMetadata],
A user provided external id. Usually the id for an entry in an external database
where the data was imported from.
......@@ -570,7 +562,7 @@ class EntryMetadata(metainfo.MSection):
external_db = metainfo.Quantity(
type=metainfo.MEnum('EELSDB', 'Materials Project', 'AFLOW', 'OQMD'),
categories=[MongoUploadMetadata, UserProvidableMetadata, EditableUserMetadata],
categories=[MongoUploadMetadata, EditableUserMetadata],
description='The repository or external database where the original data resides',
......@@ -645,7 +637,6 @@ class EntryMetadata(metainfo.MSection):
domain = metainfo.Quantity(
type=metainfo.MEnum('dft', 'ems'),
description='The material science domain',
n_quantities = metainfo.Quantity(
......@@ -24,7 +24,7 @@ import os.path
from functools import lru_cache
from nomad import config
from nomad.datamodel import EntryArchive, UserProvidableMetadata, EntryMetadata
from nomad.datamodel import EntryArchive, EntryMetadata
class Parser(metaclass=ABCMeta):
......@@ -242,12 +242,7 @@ class ArchiveParser(MatchingParser):
metadata_data = archive_data.get(, None)
if metadata_data is not None:
metadata = archive.metadata
for key, value in metadata_data.items():
if UserProvidableMetadata.m_def not in getattr(EntryMetadata, key).categories:
metadata.m_update_from_dict({key: value})
# Setting metadata in this way is not supported (any more)
......@@ -521,7 +521,6 @@ class Proc(Document):
virtually absolute certainty). Because we may need to reload, an object calling a
sync operations should have no unsaved changes.
blocking_processes = all_blocking_processes[self.__class__.__name__]
try_counter = 0
while True:
if self.queue_blocked:
Supports Markdown
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