From 99123d2d39e40d55069eb2e21e45bb5bac1a0e32 Mon Sep 17 00:00:00 2001 From: Denys SAVCHENKO Date: Thu, 13 Jul 2023 21:41:41 +0200 Subject: [PATCH 1/5] keep dataserver query status messages --- cdci_data_analysis/analysis/queries.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/cdci_data_analysis/analysis/queries.py b/cdci_data_analysis/analysis/queries.py index e42bedea0..d421dc62d 100644 --- a/cdci_data_analysis/analysis/queries.py +++ b/cdci_data_analysis/analysis/queries.py @@ -529,25 +529,24 @@ def get_query_products(self,instrument,job,run_asynch,query_type='Real',logger=N query_out = QueryOutput() #status=0 - message='' - debug_message='' + + messages = {} + messages['message']='' + messages['debug_message']='' msg_str = '--> start get product query',query_type # print(msg_str) logger.info(msg_str) - backend_comment='' - backend_warning='' + messages['comment']='' + messages['warning']='' try: if query_type != 'Dummy': q = self.get_data_server_query(instrument,config) res, data_server_query_out = q.run_query(call_back_url=job.get_call_back_url(), run_asynch=run_asynch, logger=logger) - if 'comment' in data_server_query_out.status_dictionary.keys(): - backend_comment=data_server_query_out.status_dictionary['comment'] - - if 'warning' in data_server_query_out.status_dictionary.keys(): - backend_warning=data_server_query_out.status_dictionary['warning'] - + for field in ['message', 'debug_message', 'comment', 'warning']: + if field in data_server_query_out.status_dictionary.keys(): + messages[field]=data_server_query_out.status_dictionary[field] status = data_server_query_out.get_status() job_status = data_server_query_out.get_job_status() @@ -574,7 +573,7 @@ def get_query_products(self,instrument,job,run_asynch,query_type='Real',logger=N job.set_done() #DONE - query_out.set_done(message=message, debug_message=str(debug_message),job_status=job.status,status=status,comment=backend_comment,warning=backend_warning) + query_out.set_done(message=messages['message'], debug_message=str(messages['debug_message']),job_status=job.status,status=status,comment=messages['comment'],warning=messages['warning']) #print('-->', query_out.status_dictionary) except RequestNotUnderstood as e: logger.error("passing request issue: %s", e) @@ -592,14 +591,14 @@ def get_query_products(self,instrument,job,run_asynch,query_type='Real',logger=N raise e_message = getattr(e, 'message', '') - debug_message = repr(e) + ' : ' + getattr(e, 'debug_message', '') + messages['debug_message'] = repr(e) + ' : ' + getattr(e, 'debug_message', '') query_out.set_failed('get_dataserver_products found job failed', logger=logger, sentry_dsn=sentry_dsn, excep=e, e_message=e_message, - debug_message=debug_message) + debug_message=messages['debug_message']) # TODO to use this approach when we will refactor the handling of exceptions # raise InternalError(e_message) From 9ba38d0699524eb1417b2513ff8309d57a5833f0 Mon Sep 17 00:00:00 2001 From: Denys SAVCHENKO Date: Fri, 14 Jul 2023 12:00:18 +0200 Subject: [PATCH 2/5] rm oda-ontology.ttl --- tests/oda-ontology.ttl | 983 ----------------------------------------- 1 file changed, 983 deletions(-) delete mode 100644 tests/oda-ontology.ttl diff --git a/tests/oda-ontology.ttl b/tests/oda-ontology.ttl deleted file mode 100644 index 8d2fc3ab8..000000000 --- a/tests/oda-ontology.ttl +++ /dev/null @@ -1,983 +0,0 @@ -@prefix : . -@prefix dc: . -@prefix owl: . -@prefix rdf: . -@prefix xml: . -@prefix xsd: . -@prefix foaf: . -@prefix rdfs: . -@prefix unit: . -@prefix vann: . -@base . - - rdf:type owl:Ontology ; - dc:abstract """IVOA kindly provides various data and object types, but very little is availble about workflow types. - It is possible to combine function types (e.g. https://fno.io) with data types. - In this ontology we define supporting types, our own versions of some of the generic types, - and anything else needed to descrie Astrophysical Analysis Workflows. - Please refer to https://odahub.io/docs/guide-ontology/ for instructions on how to contribute.""" ; - dc:creator , - , - , - ; - dc:description """Astrophysical Workflows, and corresponding input-output data types (Data Products, Input Parameters, etc) - used in MMODA project (https://www.astro.unige.ch/mmoda/, https://odahub.io/)""" ; - dc:source "https://github.com/volodymyrss/hugo-odahub.git" ; - dc:title "MMODA Astrophysical Workflow Ontology" , - "MMODA Astrophysical Workflows and Data Products" ; - vann:preferredNamespaceUri "http://odahub.io/ontology" ; - owl:versionIRI "0.1.0" ; - foaf:logo . - -################################################################# -# Annotation properties -################################################################# - -### http://odahub.io/ontology#allowed_value -:allowed_value rdf:type owl:AnnotationProperty . - - -### http://odahub.io/ontology#format -:format rdf:type owl:AnnotationProperty . - - -### http://odahub.io/ontology#lower_limit -:lower_limit rdf:type owl:AnnotationProperty . - - -### http://odahub.io/ontology#symbol -:symbol rdf:type owl:AnnotationProperty . - - -### http://odahub.io/ontology#unit -:unit rdf:type owl:AnnotationProperty . - - -### http://odahub.io/ontology#upper_limit -:upper_limit rdf:type owl:AnnotationProperty . - - -### http://purl.org/dc/elements/1.1/abstract -dc:abstract rdf:type owl:AnnotationProperty . - - -### http://purl.org/dc/elements/1.1/creator -dc:creator rdf:type owl:AnnotationProperty . - - -### http://purl.org/dc/elements/1.1/description -dc:description rdf:type owl:AnnotationProperty . - - -### http://purl.org/dc/elements/1.1/source -dc:source rdf:type owl:AnnotationProperty . - - -### http://purl.org/dc/elements/1.1/title -dc:title rdf:type owl:AnnotationProperty . - - -### http://purl.org/vocab/vann/preferredNamespaceUri -vann:preferredNamespaceUri rdf:type owl:AnnotationProperty . - - -### http://www.w3.org/2002/07/owl#versionIRI -owl:versionIRI rdf:type owl:AnnotationProperty . - - -### http://xmlns.com/foaf/0.1/logo -foaf:logo rdf:type owl:AnnotationProperty . - - -################################################################# -# Object Properties -################################################################# - -### http://odahub.io/ontology#hasCoordinates -:hasCoordinates rdf:type owl:ObjectProperty ; - rdfs:subPropertyOf owl:topObjectProperty ; - rdfs:domain :AstrophysicalObject ; - rdfs:range :SkyCoordinates ; - rdfs:label "hasCoordinates" . - - -### http://odahub.io/ontology#hasDec -:hasDec rdf:type owl:ObjectProperty ; - rdfs:subPropertyOf owl:topObjectProperty ; - rdfs:domain :SkyCoordinates ; - rdfs:range :Declination ; - rdfs:label "hasDec" . - - -### http://odahub.io/ontology#hasRA -:hasRA rdf:type owl:ObjectProperty ; - rdfs:subPropertyOf owl:topObjectProperty ; - rdfs:domain :SkyCoordinates ; - rdfs:range :RightAscension ; - rdfs:label "hasRA" . - - -### http://odahub.io/ontology#has_format -:has_format rdf:type owl:ObjectProperty ; - rdfs:subPropertyOf owl:topObjectProperty ; - rdf:type owl:FunctionalProperty ; - rdfs:domain :WorkflowParameter ; - rdfs:range :ParameterFormat . - - -### http://odahub.io/ontology#has_unit -:has_unit rdf:type owl:ObjectProperty ; - rdfs:subPropertyOf owl:topObjectProperty ; - rdf:type owl:FunctionalProperty ; - rdfs:domain :WorkflowParameter ; - rdfs:range unit:Unit . - - -### http://odahub.io/ontology#isRequesting -:isRequesting rdf:type owl:ObjectProperty ; - rdfs:subPropertyOf owl:topObjectProperty ; - rdfs:domain :Workflow ; - rdfs:range :AstrophysicalObject , - :SkyCoordinates . - - -### http://odahub.io/ontology#isRequestingAstroObject -:isRequestingAstroObject rdf:type owl:ObjectProperty ; - rdfs:subPropertyOf :isRequesting ; - rdfs:domain :Workflow ; - rdfs:range :AstrophysicalObject ; - rdfs:comment "This properties indicates that the :Workflow is making internally a call to another :Workflow, which derives some data about an :AstrophysicalObject" . - - -### http://odahub.io/ontology#isRequestingParameter -:isRequestingParameter rdf:type owl:ObjectProperty ; - rdfs:subPropertyOf :isRequesting . - - -### http://odahub.io/ontology#isUsing -:isUsing rdf:type owl:ObjectProperty ; - rdfs:subPropertyOf :isRequesting ; - rdfs:domain :Workflow ; - rdfs:range :Workflow . - - -################################################################# -# Data properties -################################################################# - -### http://odahub.io/ontology#value -:value rdf:type owl:DatatypeProperty ; - rdfs:subPropertyOf owl:topDataProperty ; - rdf:type owl:FunctionalProperty ; - rdfs:domain :WorkflowParameter . - - -################################################################# -# Classes -################################################################# - -### http://odahub.io/ontology#Angle -:Angle rdf:type owl:Class ; - rdfs:subClassOf :Float , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:someValuesFrom unit:AngleUnit - ] . - - -### http://odahub.io/ontology#AngleDegrees -:AngleDegrees rdf:type owl:Class ; - rdfs:subClassOf :Angle , - :degree . - - -### http://odahub.io/ontology#AngleMinutes -:AngleMinutes rdf:type owl:Class ; - rdfs:subClassOf :Angle , - :arcmin . - - -### http://odahub.io/ontology#AngleSeconds -:AngleSeconds rdf:type owl:Class ; - rdfs:subClassOf :Angle , - :arcsec . - - -### http://odahub.io/ontology#AstrophysicalObject -:AstrophysicalObject rdf:type owl:Class ; - rdfs:comment "Any Astrophysical object, possibly contained in space and/or time: Galaxy, Gamma-Ray Burst, Universe. Note that an object can be spatially or temporarily contained within another: e.g. a BlazarFlare is an episode of Blazar life, and a SunSpot is on the Sun." ; - rdfs:label "AstrophysicalObject" . - - -### http://odahub.io/ontology#AstrophysicalObjectOfInterest -:AstrophysicalObjectOfInterest rdf:type owl:Class ; - rdfs:subClassOf :AstrophysicalObject ; - rdfs:label "AstrophysicalObjectOfInterest" . - - -### http://odahub.io/ontology#AstroqueryModule -:AstroqueryModule rdf:type owl:Class ; - rdfs:subClassOf owl:Thing ; - rdfs:comment "An astroquery module is used internally by workflows to access data (observations, catalogs, etc)." ; - rdfs:label "AstroqueryModule" . - - -### http://odahub.io/ontology#Boolean -:Boolean rdf:type owl:Class ; - rdfs:subClassOf :WorkflowParameter , - [ rdf:type owl:Restriction ; - owl:onProperty :value ; - owl:allValuesFrom xsd:boolean - ] . - - -### http://odahub.io/ontology#DataProduct -:DataProduct rdf:type owl:Class ; - rdfs:subClassOf owl:Thing ; - rdfs:label "DataProduct" . - - -### http://odahub.io/ontology#Declination -:Declination rdf:type owl:Class ; - rdfs:subClassOf :Angle , - :Quantity , - :WorkflowParameter ; - rdfs:label "Declination" . - - -### http://odahub.io/ontology#DeclinationDegrees -:DeclinationDegrees rdf:type owl:Class ; - rdfs:subClassOf :AngleDegrees , - :Declination ; - rdfs:label "DeclinationDegrees" . - - -### http://odahub.io/ontology#DiscoveryWorkflow -:DiscoveryWorkflow rdf:type owl:Class ; - rdfs:subClassOf :Workflow ; - dc:description "workflow which takes some dataset (crucially, unavailable at the time of the Workflow publishing) and produces some Evidence or a Decision" ; - rdfs:label "DiscoveryWorkflow" . - - -### http://odahub.io/ontology#EndTime -:EndTime rdf:type owl:Class ; - rdfs:subClassOf :TimeInstant , - :WorkflowParameter ; - rdfs:label "EndTime" . - - -### http://odahub.io/ontology#EndTimeISOT -:EndTimeISOT rdf:type owl:Class ; - rdfs:subClassOf :EndTime , - :TimeInstantISOT ; - rdfs:label "EndTimeISOT" . - - -### http://odahub.io/ontology#EndTimeMJD -:EndTimeMJD rdf:type owl:Class ; - rdfs:subClassOf :EndTime , - :TimeInstantMJD . - - -### http://odahub.io/ontology#Energy -:Energy rdf:type owl:Class ; - rdfs:subClassOf :Float , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:someValuesFrom unit:EnergyUnit - ] . - - -### http://odahub.io/ontology#Energy_GeV -:Energy_GeV rdf:type owl:Class ; - rdfs:subClassOf :Energy , - :GeV . - - -### http://odahub.io/ontology#Energy_MeV -:Energy_MeV rdf:type owl:Class ; - rdfs:subClassOf :Energy , - :MeV . - - -### http://odahub.io/ontology#Energy_TeV -:Energy_TeV rdf:type owl:Class ; - rdfs:subClassOf :Energy , - :TeV . - - -### http://odahub.io/ontology#Energy_eV -:Energy_eV rdf:type owl:Class ; - rdfs:subClassOf :Energy , - :eV . - - -### http://odahub.io/ontology#Energy_keV -:Energy_keV rdf:type owl:Class ; - rdfs:subClassOf :Energy , - :keV . - - -### http://odahub.io/ontology#ExpressedInUnit -:ExpressedInUnit rdf:type owl:Class ; - rdfs:subClassOf :NumericParameter . - - -### http://odahub.io/ontology#Float -:Float rdf:type owl:Class ; - rdfs:subClassOf :NumericParameter , - [ rdf:type owl:Restriction ; - owl:onProperty :value ; - owl:allValuesFrom xsd:float - ] . - - -### http://odahub.io/ontology#Frequency -:Frequency rdf:type owl:Class ; - rdfs:subClassOf :Float , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:someValuesFrom unit:EnergyUnit - ] . - - -### http://odahub.io/ontology#FrequencyGHz -:FrequencyGHz rdf:type owl:Class ; - rdfs:subClassOf :Frequency , - :GHz . - - -### http://odahub.io/ontology#FrequencyHz -:FrequencyHz rdf:type owl:Class ; - rdfs:subClassOf :Frequency , - :Hz . - - -### http://odahub.io/ontology#FrequencyMHz -:FrequencyMHz rdf:type owl:Class ; - rdfs:subClassOf :Frequency , - :MHz . - - -### http://odahub.io/ontology#GHz -:GHz rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:GHz - ] . - - -### http://odahub.io/ontology#Gaia -:Gaia rdf:type owl:Class ; - rdfs:subClassOf :Instrument ; - rdfs:label "Gaia" . - - -### http://odahub.io/ontology#GaiaFilter -:GaiaFilter rdf:type owl:Class ; - rdfs:subClassOf owl:Thing ; - rdfs:label "GaiaFilter" . - - -### http://odahub.io/ontology#GeV -:GeV rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:GeV - ] . - - -### http://odahub.io/ontology#Hz -:Hz rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:Hz - ] . - - -### http://odahub.io/ontology#ISGRIEnergy -:ISGRIEnergy rdf:type owl:Class ; - rdfs:subClassOf :Energy_keV , - [ rdf:type owl:Restriction ; - owl:onProperty :value ; - owl:allValuesFrom [ rdf:type rdfs:Datatype ; - owl:onDatatype xsd:float ; - owl:withRestrictions ( [ xsd:minInclusive "15.0"^^xsd:float - ] - [ xsd:maxInclusive "800.0"^^xsd:float - ] - ) - ] - ] . - - -### http://odahub.io/ontology#Image -:Image rdf:type owl:Class ; - rdfs:subClassOf :DataProduct . - - -### http://odahub.io/ontology#Instrument -:Instrument rdf:type owl:Class ; - rdfs:subClassOf owl:Thing ; - rdfs:label "Instrument" . - - -### http://odahub.io/ontology#Integer -:Integer rdf:type owl:Class ; - rdfs:subClassOf :NumericParameter , - [ rdf:type owl:Restriction ; - owl:onProperty :value ; - owl:allValuesFrom xsd:integer - ] . - - -### http://odahub.io/ontology#JEMXEnergy -:JEMXEnergy rdf:type owl:Class ; - rdfs:subClassOf :Energy_keV , - [ rdf:type owl:Restriction ; - owl:onProperty :value ; - owl:allValuesFrom [ rdf:type rdfs:Datatype ; - owl:onDatatype xsd:float ; - owl:withRestrictions ( [ xsd:minInclusive "3.0"^^xsd:float - ] - [ xsd:maxInclusive "35.0"^^xsd:float - ] - ) - ] - ] . - - -### http://odahub.io/ontology#LightCurve -:LightCurve rdf:type owl:Class ; - rdfs:subClassOf :DataProduct , - ; - rdfs:label "LightCurve" . - - -### http://odahub.io/ontology#MHz -:MHz rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:MHz - ] . - - -### http://odahub.io/ontology#MeV -:MeV rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:MeV - ] . - - -### http://odahub.io/ontology#NumericParameter -:NumericParameter rdf:type owl:Class ; - rdfs:subClassOf :WorkflowParameter . - - -### http://odahub.io/ontology#ODAAstropyTable -:ODAAstropyTable rdf:type owl:Class ; - rdfs:subClassOf :DataProduct . - - -### http://odahub.io/ontology#ODABinaryProduct -:ODABinaryProduct rdf:type owl:Class ; - rdfs:subClassOf :DataProduct . - - -### http://odahub.io/ontology#ODAPictureProduct -:ODAPictureProduct rdf:type owl:Class ; - rdfs:subClassOf :DataProduct . - - -### http://odahub.io/ontology#ODATextProduct -:ODATextProduct rdf:type owl:Class ; - rdfs:subClassOf :DataProduct . - - -### http://odahub.io/ontology#ParameterFormat -:ParameterFormat rdf:type owl:Class ; - rdfs:subClassOf owl:Thing . - - -### http://odahub.io/ontology#Percentage -:Percentage rdf:type owl:Class ; - rdfs:subClassOf :Float , - [ rdf:type owl:Restriction ; - owl:onProperty :value ; - owl:allValuesFrom [ rdf:type rdfs:Datatype ; - owl:onDatatype xsd:float ; - owl:withRestrictions ( [ xsd:minInclusive "0.0"^^xsd:float - ] - [ xsd:maxInclusive "100.0"^^xsd:float - ] - ) - ] - ] . - - -### http://odahub.io/ontology#PhotometricBand -:PhotometricBand rdf:type owl:Class ; - rdfs:subClassOf :String , - [ rdf:type owl:Restriction ; - owl:onProperty :value ; - owl:allValuesFrom [ rdf:type rdfs:Datatype ; - owl:oneOf [ rdf:type rdf:List ; - rdf:first "H" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "J" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "K" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "L" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "M" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "N" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "Q" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "b" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "g" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "i" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "r" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "u" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "v" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "y" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "z" ; - rdf:rest rdf:nil - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] . - - -### http://odahub.io/ontology#PointOfInterest -:PointOfInterest rdf:type owl:Class ; - rdfs:subClassOf :SkyCoordinates ; - rdfs:label "PointOfInterest" . - - -### http://odahub.io/ontology#PointOfInterestDEC -:PointOfInterestDEC rdf:type owl:Class ; - rdfs:subClassOf :DeclinationDegrees , - :WorkflowParameter ; - rdfs:label "PointOfInterestDEC" . - - -### http://odahub.io/ontology#PointOfInterestRA -:PointOfInterestRA rdf:type owl:Class ; - rdfs:subClassOf :RightAscensionDegrees , - :WorkflowParameter ; - rdfs:label "PointOfInterestRA" . - - -### http://odahub.io/ontology#Quantity -:Quantity rdf:type owl:Class ; - rdfs:subClassOf owl:Thing ; - rdfs:label "Quantity" . - - -### http://odahub.io/ontology#RightAscension -:RightAscension rdf:type owl:Class ; - rdfs:subClassOf :Angle , - :Quantity , - :WorkflowParameter ; - rdfs:label "RightAscension" . - - -### http://odahub.io/ontology#RightAscensionDegrees -:RightAscensionDegrees rdf:type owl:Class ; - rdfs:subClassOf :AngleDegrees , - :RightAscension ; - rdfs:label "RightAscensionDegrees" . - - -### http://odahub.io/ontology#SkyCoordinates -:SkyCoordinates rdf:type owl:Class ; - rdfs:subClassOf :Quantity , - :WorkflowParameter ; - rdfs:comment """Sky coordinates. Typically represented as a string as known to https://docs.astropy.org/en/stable/api/astropy.coordinates.SkyCoord.html . -Subclasses may have other ways to express the content.""" ; - rdfs:label "SkyCoordinates" . - - -### http://odahub.io/ontology#Spectrum -:Spectrum rdf:type owl:Class ; - rdfs:subClassOf :DataProduct . - - -### http://odahub.io/ontology#StartTime -:StartTime rdf:type owl:Class ; - rdfs:subClassOf :TimeInstant , - :WorkflowParameter ; - rdfs:label "StartTime" . - - -### http://odahub.io/ontology#StartTimeISOT -:StartTimeISOT rdf:type owl:Class ; - rdfs:subClassOf :StartTime , - :TimeInstantISOT ; - rdfs:label "StartTimeISOT" . - - -### http://odahub.io/ontology#StartTimeMJD -:StartTimeMJD rdf:type owl:Class ; - rdfs:subClassOf :StartTime , - :TimeInstantMJD . - - -### http://odahub.io/ontology#String -:String rdf:type owl:Class ; - rdfs:subClassOf :WorkflowParameter . - - -### http://odahub.io/ontology#TeV -:TeV rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:TeV - ] . - - -### http://odahub.io/ontology#TimeFormat -:TimeFormat rdf:type owl:Class ; - rdfs:subClassOf :ParameterFormat . - - -### http://odahub.io/ontology#TimeInstant -:TimeInstant rdf:type owl:Class ; - rdfs:subClassOf :Quantity , - :WorkflowParameter ; - rdfs:label "TimeInstant" . - - -### http://odahub.io/ontology#TimeInstantISOT -:TimeInstantISOT rdf:type owl:Class ; - rdfs:subClassOf :TimeInstant , - [ rdf:type owl:Restriction ; - owl:onProperty :has_format ; - owl:hasValue :ISOT - ] . - - -### http://odahub.io/ontology#TimeInstantMJD -:TimeInstantMJD rdf:type owl:Class ; - rdfs:subClassOf :TimeInstant , - [ rdf:type owl:Restriction ; - owl:onProperty :has_format ; - owl:hasValue :MJD - ] . - - -### http://odahub.io/ontology#TimeInterval -:TimeInterval rdf:type owl:Class ; - rdfs:subClassOf :Float , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:someValuesFrom unit:TimeUnit - ] . - - -### http://odahub.io/ontology#TimeIntervalDays -:TimeIntervalDays rdf:type owl:Class ; - rdfs:subClassOf :TimeInterval , - :day . - - -### http://odahub.io/ontology#TimeIntervalSeconds -:TimeIntervalSeconds rdf:type owl:Class ; - rdfs:subClassOf :TimeInterval , - :second . - - -### http://odahub.io/ontology#VisibleBand -:VisibleBand rdf:type owl:Class ; - rdfs:subClassOf :PhotometricBand , - [ rdf:type owl:Restriction ; - owl:onProperty :value ; - owl:allValuesFrom [ rdf:type rdfs:Datatype ; - owl:oneOf [ rdf:type rdf:List ; - rdf:first "b" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "g" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "r" ; - rdf:rest [ rdf:type rdf:List ; - rdf:first "v" ; - rdf:rest rdf:nil - ] - ] - ] - ] - ] - ] ; - :allowed_value "b" , - "g" , - "r" , - "v" . - - -### http://odahub.io/ontology#Workflow -:Workflow rdf:type owl:Class ; - rdfs:subClassOf owl:Thing ; - rdfs:label "Workflow" . - - -### http://odahub.io/ontology#WorkflowParameter -:WorkflowParameter rdf:type owl:Class ; - rdfs:label "WorkflowParameter" . - - -### http://odahub.io/ontology#arcmin -:arcmin rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:arcmin - ] . - - -### http://odahub.io/ontology#arcsec -:arcsec rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:arcsec - ] . - - -### http://odahub.io/ontology#day -:day rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:Day - ] . - - -### http://odahub.io/ontology#degree -:degree rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:Degree - ] . - - -### http://odahub.io/ontology#eV -:eV rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:eV - ] . - - -### http://odahub.io/ontology#keV -:keV rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:keV - ] . - - -### http://odahub.io/ontology#second -:second rdf:type owl:Class ; - rdfs:subClassOf :ExpressedInUnit , - [ rdf:type owl:Restriction ; - owl:onProperty :has_unit ; - owl:hasValue unit:Second - ] . - - -### http://odahub.io/ontology/unit#AngleUnit -unit:AngleUnit rdf:type owl:Class ; - rdfs:subClassOf unit:Unit . - - -### http://odahub.io/ontology/unit#EnergyUnit -unit:EnergyUnit rdf:type owl:Class ; - rdfs:subClassOf unit:Unit . - - -### http://odahub.io/ontology/unit#TimeUnit -unit:TimeUnit rdf:type owl:Class ; - rdfs:subClassOf unit:Unit . - - -### http://odahub.io/ontology/unit#Unit -unit:Unit rdf:type owl:Class ; - rdfs:subClassOf owl:Thing ; - rdfs:label "Unit" . - - -### http://www.ivoa.net/rdf/product-type#timeseries - rdf:type owl:Class . - - -################################################################# -# Individuals -################################################################# - -### http://odahub.io/ontology#ISOT -:ISOT rdf:type owl:NamedIndividual , - :TimeFormat ; - :symbol "isot"^^xsd:string . - - -### http://odahub.io/ontology#MJD -:MJD rdf:type owl:NamedIndividual , - :TimeFormat ; - :symbol "mjd"^^xsd:string . - - -### http://odahub.io/ontology/unit#Day -unit:Day rdf:type owl:NamedIndividual , - unit:TimeUnit ; - :symbol "day"^^xsd:string . - - -### http://odahub.io/ontology/unit#Degree -unit:Degree rdf:type owl:NamedIndividual , - unit:AngleUnit ; - :symbol "deg"^^xsd:string . - - -### http://odahub.io/ontology/unit#GHz -unit:GHz rdf:type owl:NamedIndividual , - unit:EnergyUnit ; - :symbol "GHz"^^xsd:string . - - -### http://odahub.io/ontology/unit#GeV -unit:GeV rdf:type owl:NamedIndividual , - unit:EnergyUnit ; - :symbol "GeV"^^xsd:string . - - -### http://odahub.io/ontology/unit#Hour -unit:Hour rdf:type owl:NamedIndividual , - unit:TimeUnit ; - :symbol "hour"^^xsd:string . - - -### http://odahub.io/ontology/unit#Hz -unit:Hz rdf:type owl:NamedIndividual , - unit:EnergyUnit ; - :symbol "Hz"^^xsd:string . - - -### http://odahub.io/ontology/unit#MHz -unit:MHz rdf:type owl:NamedIndividual , - unit:EnergyUnit ; - :symbol "MHz"^^xsd:string . - - -### http://odahub.io/ontology/unit#MeV -unit:MeV rdf:type owl:NamedIndividual , - unit:EnergyUnit ; - :symbol "MeV"^^xsd:string . - - -### http://odahub.io/ontology/unit#Minute -unit:Minute rdf:type owl:NamedIndividual , - unit:TimeUnit ; - :symbol "m"^^xsd:string . - - -### http://odahub.io/ontology/unit#Radian -unit:Radian rdf:type owl:NamedIndividual , - unit:AngleUnit ; - :symbol "rad"^^xsd:string . - - -### http://odahub.io/ontology/unit#Second -unit:Second rdf:type owl:NamedIndividual , - unit:TimeUnit ; - :symbol "s"^^xsd:string . - - -### http://odahub.io/ontology/unit#TeV -unit:TeV rdf:type owl:NamedIndividual , - unit:EnergyUnit ; - :symbol "TeV"^^xsd:string . - - -### http://odahub.io/ontology/unit#arcmin -unit:arcmin rdf:type owl:NamedIndividual , - unit:AngleUnit ; - :symbol "arcmin"^^xsd:string . - - -### http://odahub.io/ontology/unit#arcsec -unit:arcsec rdf:type owl:NamedIndividual , - unit:AngleUnit ; - :symbol "arcsec"^^xsd:string . - - -### http://odahub.io/ontology/unit#eV -unit:eV rdf:type owl:NamedIndividual , - unit:EnergyUnit ; - :symbol "eV"^^xsd:string . - - -### http://odahub.io/ontology/unit#hourangle_Hour -unit:hourangle_Hour rdf:type owl:NamedIndividual , - unit:AngleUnit ; - :symbol "h"^^xsd:string . - - -### http://odahub.io/ontology/unit#hourangle_Minute -unit:hourangle_Minute rdf:type owl:NamedIndividual , - unit:AngleUnit ; - :symbol "m"^^xsd:string . - - -### http://odahub.io/ontology/unit#hourangle_Second -unit:hourangle_Second rdf:type owl:NamedIndividual , - unit:AngleUnit ; - :symbol "s"^^xsd:string . - - -### http://odahub.io/ontology/unit#keV -unit:keV rdf:type owl:NamedIndividual , - unit:EnergyUnit ; - :symbol "keV"^^xsd:string . - - -################################################################# -# Annotations -################################################################# - -: dc:title "MMODA Astrophysical Workflows and Data Products" . - - -### Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z) https://github.com/owlcs/owlapi From 25dc3a1af8ba58155e8c02529ca7eee09d4aa95c Mon Sep 17 00:00:00 2001 From: Denys SAVCHENKO Date: Fri, 14 Jul 2023 12:09:06 +0200 Subject: [PATCH 3/5] download ontology for tests --- .github/workflows/python-app.yml | 2 ++ .github/workflows/python-plugins.yml | 2 ++ .gitignore | 1 + 3 files changed, 5 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index eb24d67ba..1ed2ea2c1 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -36,6 +36,8 @@ jobs: pip install flake8 pytest mypy pylint pytest-cov pytest-xdist wheel if [ -f requirements.txt ]; then pip install -r requirements.txt; fi pip install -e .[test,ontology] + curl -o tests/oda-ontology.ttl https://raw.githubusercontent.com/oda-hub/ontology/ecdf2a61f87aac13ae7a96c0f3dad960312adae4/ontology.ttl + - name: Lint with flake8 if: ${{ env.TEST_ONLY_FAST != 'true' }} diff --git a/.github/workflows/python-plugins.yml b/.github/workflows/python-plugins.yml index 498945a2f..2dac27ee6 100644 --- a/.github/workflows/python-plugins.yml +++ b/.github/workflows/python-plugins.yml @@ -72,10 +72,12 @@ jobs: pip install -r plugin-test-req.txt; fi pip install -e ./plugin[test] + curl -o tests/oda-ontology.ttl https://raw.githubusercontent.com/oda-hub/ontology/ecdf2a61f87aac13ae7a96c0f3dad960312adae4/ontology.ttl - name: Test ${{ matrix.plugin-name }} plugin with pytest env: ODA_ONTOLOGY_PATH: ../tests/oda-ontology.ttl run: | + curl -o $ODA_ONTOLOGY_PATH https://raw.githubusercontent.com/oda-hub/ontology/ecdf2a61f87aac13ae7a96c0f3dad960312adae4/ontology.ttl cd plugin && DISPATCHER_MOCK_KB=yes python -m pytest tests -sv --full-trace --log-cli-level=DEBUG diff --git a/.gitignore b/.gitignore index 498c1f6c9..da97f3d27 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,4 @@ data/dummy_prods** .venv js9.fits test-dispatcher-conf-with-gallery.yaml +tests/oda-ontology.ttl \ No newline at end of file From dc5a6fb9e613eb21338c50b7b612e9d38954f5a2 Mon Sep 17 00:00:00 2001 From: Denys SAVCHENKO Date: Fri, 14 Jul 2023 12:17:55 +0200 Subject: [PATCH 4/5] fix plugins workflow --- .github/workflows/python-plugins.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-plugins.yml b/.github/workflows/python-plugins.yml index 2dac27ee6..2d0410343 100644 --- a/.github/workflows/python-plugins.yml +++ b/.github/workflows/python-plugins.yml @@ -78,6 +78,5 @@ jobs: env: ODA_ONTOLOGY_PATH: ../tests/oda-ontology.ttl run: | - curl -o $ODA_ONTOLOGY_PATH https://raw.githubusercontent.com/oda-hub/ontology/ecdf2a61f87aac13ae7a96c0f3dad960312adae4/ontology.ttl cd plugin && DISPATCHER_MOCK_KB=yes python -m pytest tests -sv --full-trace --log-cli-level=DEBUG From 54638d8490930985cd6d9e105e239cd69b576b44 Mon Sep 17 00:00:00 2001 From: Denys SAVCHENKO Date: Fri, 14 Jul 2023 13:31:46 +0200 Subject: [PATCH 5/5] run_asynch in non_parameter_args --- cdci_data_analysis/analysis/instrument.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cdci_data_analysis/analysis/instrument.py b/cdci_data_analysis/analysis/instrument.py index 5217f1a34..c7cb575be 100644 --- a/cdci_data_analysis/analysis/instrument.py +++ b/cdci_data_analysis/analysis/instrument.py @@ -75,7 +75,8 @@ 'job_id', 'async_dispatcher', 'allow_unknown_args', - 'catalog_selected_objects'] + 'catalog_selected_objects', + 'run_asynch'] # NOTE: arguments are passed in the request to the dispatcher # some arguments are used to set the values of the analysis parameters # the parameter is a subclass of Parameter and may use several arguments to set it's value