Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datamodel v1 #49

Merged
merged 14 commits into from
Feb 11, 2020
109 changes: 102 additions & 7 deletions invenio_rdm_records/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,111 @@ def create_fake_record():
"metadata_restricted": False,
"files_restricted": False
},
"_created_by": 2,
"_default_preview": "previewer one",
"_internal_notes": [{
"user": "inveniouser",
"note": "RDM record",
"timestamp": fake.iso8601(tzinfo=None, end_datetime=None),
}],
"_owners": [1],
"access_right": "open",
"contributors": [{"name": fake.name()}],
"description": fake.bs(),
"owners": [1],
"publication_date": fake.iso8601(tzinfo=None, end_datetime=None),
"embargo_date": fake.iso8601(tzinfo=None, end_datetime=None),
"contact": "[email protected]",
"community": {
"primary": "Maincom",
"secondary": ["Subcom One", "Subcom Two"]
},
"resource_type": {
"subtype": "dataset",
"type": "Dataset"
"type": "image",
"subtype": "photo"
},
"title": fake.company() + "'s dataset"
"identifiers": [{
"identifier": "10.5281/zenodo.9999999",
"scheme": "DOI"
}, {
"identifier": "9999.99999",
"scheme": "arXiv"
}],
"creators": [{
"name": fake.name(),
"type": "Personal",
"identifiers": [{
"identifier": "9999-9999-9999-9999",
"scheme": "Orcid"
}],
"affiliations": [{
"name": fake.company(),
"identifier": "entity-one",
"scheme": "entity-id-scheme"
}]
}],
"titles": [{
"title": fake.company() + "'s gallery",
"type": "Other",
"lang": "eng"
}],
"publication_date": fake.iso8601(tzinfo=None, end_datetime=None),
"subjects": [{
"subject": "Romans",
"identifier": "subj-1",
"scheme": "no-scheme"
}],
"contributors": [{
"name": fake.name(),
"type": "Personal",
"identifiers": [{
"identifier": "9999-9999-9999-9998",
"scheme": "Orcid"
}],
"affiliations": [{
"name": fake.company(),
"identifier": "entity-one",
"scheme": "entity-id-scheme"
}],
"role": "RightsHolder"
}],
"dates": [{
# No end date to avoid computations based on start
"start": fake.iso8601(tzinfo=None, end_datetime=None),
"description": "Random test date",
"type": "Other"
}],
"language": "eng",
"related_identifiers": [{
"identifier": "10.5281/zenodo.9999988",
"scheme": "DOI",
"relation_type": "Requires",
"resource_type": {
"type": "image",
"subtype": "photo"
}
}],
"version": "v0.0.1",
"licenses": [{
"license": "Copyright Maximo Decimo Meridio 2020. Long statement",
"uri": "https://opensource.org/licenses/BSD-3-Clause",
"identifier": "BSD-3",
"scheme": "BSD-3",
}],
"descriptions": [{
"description": fake.bs(),
"type": "Abstract",
"lang": "eng"
}],
"locations": [{
"point": {
"lat": 41.902604,
"lon": 12.496189
},
"place": "Rome",
"description": "Rome, from Romans"
}],
"references": [{
"reference_string": "Reference to something et al.",
"identifier": "9999.99988",
"scheme": "GRID"
}]
}

# Create and index record
Expand Down
Loading