Skip to content
Snippets Groups Projects
Commit 341d9204 authored by Maeva Pourpoint's avatar Maeva Pourpoint
Browse files

Add docstrings to the dataclasses

parent a2c4885f
No related branches found
No related tags found
1 merge request!5Metadata survey level
...@@ -31,6 +31,10 @@ logger = logging.getLogger(__name__) ...@@ -31,6 +31,10 @@ logger = logging.getLogger(__name__)
@dataclass @dataclass
class BaseMetadata: class BaseMetadata:
"""
This class handles the metadata attributes shared at all levels: survey;
station; run; electric; magnetic; auxiliary.
"""
# List of metadata fields that are required for archiving but "missing" # List of metadata fields that are required for archiving but "missing"
# because not provided by the user. # because not provided by the user.
metadata_missing: Set[str] = field(default_factory=set) metadata_missing: Set[str] = field(default_factory=set)
...@@ -40,6 +44,10 @@ class BaseMetadata: ...@@ -40,6 +44,10 @@ class BaseMetadata:
@dataclass @dataclass
class BaseSurvey(BaseMetadata): class BaseSurvey(BaseMetadata):
"""
This class handles the metadata attributes shared at the survey and station
levels.
"""
restricted_status: Optional[str] = field(default=None, restricted_status: Optional[str] = field(default=None,
metadata={'xml_id': ['restricted_status'], metadata={'xml_id': ['restricted_status'],
'required': True, 'required': True,
...@@ -72,6 +80,7 @@ class BaseSurvey(BaseMetadata): ...@@ -72,6 +80,7 @@ class BaseSurvey(BaseMetadata):
@dataclass @dataclass
class Survey(BaseSurvey): class Survey(BaseSurvey):
"""This class handles all the metadata attributes at the survey level."""
acquired_by_author: Optional[str] = field(default=None, acquired_by_author: Optional[str] = field(default=None,
metadata={'xml_id': ['comments', 'mt.survey.acquired_by.author'], metadata={'xml_id': ['comments', 'mt.survey.acquired_by.author'],
'required': False, 'required': False,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment