Open syphax-bouazzouni opened 1 year ago
This PR adds an endpoint for uploading a file containing a set of mappings, bellow is an example of the structure of the file
[ { "classes": ["http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#Image_Algorithm" ,"http://purl.org/incf/ontology/Computational_Neurosciences/cno_alpha.owl#cno_0000202"], "name": 'This is the mappings produced to test the bulk load', "source": 'https://w3id.org/semapv/LexicalMatching', "comment": 'mock data', "relation": [ 'http://www.w3.org/2002/07/owl#subClassOf' ], "subject_source_id": 'http://bioontology.org/ontologies/BiomedicalResources.owl', "object_source_id": 'http://purl.org/incf/ontology/Computational_Neurosciences/cno_alpha.owl', "source_name": 'https://w3id.org/sssom/mapping/tests/data/basic.tsv', "source_contact_info": 'orcid:1234,orcid:5678', "date": '2020-05-30' } ]
post '/load'
request_has_file?
file_from_request
test_mappings_file_load
Prerequisite
What
This PR adds an endpoint for uploading a file containing a set of mappings, bellow is an example of the structure of the file
Why
Changes
post '/load'
to the mappings_controller.rbrequest_has_file?
andfile_from_request
from ontology_helpers.rb to application_helpers.rbtest_mappings_file_load
to the test_mappings_controller.rb