From b9691c7deae30bd6422fb7b0681572b7b6f78ae3 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Wed, 15 Jul 2020 14:16:11 +0100 Subject: Web: add license to input form --- bh20sequploader/bh20seq-schema.yml | 3 ++- bh20simplewebuploader/main.py | 3 ++- example/minimal_metadata_example.yaml | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bh20sequploader/bh20seq-schema.yml b/bh20sequploader/bh20seq-schema.yml index b3d4d12..29ac22c 100644 --- a/bh20sequploader/bh20seq-schema.yml +++ b/bh20sequploader/bh20seq-schema.yml @@ -15,7 +15,7 @@ $graph: fields: license_type: doc: License types as defined in https://wiki.creativecommons.org/images/d/d6/Ccrel-1.0.pdf - type: string? + type: string jsonldPredicate: _id: https://creativecommons.org/ns#License title: @@ -258,6 +258,7 @@ $graph: virus: virusSchema technology: technologySchema submitter: submitterSchema + license: licenseSchema id: doc: The subject (eg the fasta/fastq file) that the metadata describes type: string diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index 8b5781a..8a6794e 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -47,6 +47,7 @@ def type_to_heading(type_name): Turn a type name like "sampleSchema" from the metadata schema into a human-readable heading. """ + print(type_name,file=sys.stderr) # Remove camel case decamel = re.sub('([A-Z])', r' \1', type_name) # Split @@ -233,7 +234,7 @@ if os.path.isfile("bh20sequploader/bh20seq-schema.yml"): else: METADATA_SCHEMA = yaml.safe_load(pkg_resources.resource_stream("bh20sequploader", "bh20seq-schema.yml")) METADATA_OPTION_DEFINITIONS = yaml.safe_load(pkg_resources.resource_stream("bh20sequploader", "bh20seq-options.yml")) -print(METADATA_SCHEMA,file=sys.stderr) +# print(METADATA_SCHEMA,file=sys.stderr) FORM_ITEMS = generate_form(METADATA_SCHEMA, METADATA_OPTION_DEFINITIONS) @app.route('/') diff --git a/example/minimal_metadata_example.yaml b/example/minimal_metadata_example.yaml index 51f8a87..1b46cc7 100644 --- a/example/minimal_metadata_example.yaml +++ b/example/minimal_metadata_example.yaml @@ -1,5 +1,9 @@ id: placeholder + +license: + license_type: http://creativecommons.org/licenses/by/4.0/ + host: host_species: http://purl.obolibrary.org/obo/NCBITaxon_9606 @@ -15,4 +19,4 @@ technology: sample_sequencing_technology: [http://www.ebi.ac.uk/efo/EFO_0008632] submitter: - authors: [John Doe] \ No newline at end of file + authors: [John Doe] -- cgit v1.2.3