@@ -70,7 +70,7 @@ class CadcClass(BaseQuery):
70
70
CADCLOGIN_SERVICE_URI = conf .CADCLOGIN_SERVICE_URI
71
71
TIMEOUT = conf .TIMEOUT
72
72
73
- def __init__ (self , url = None , auth_session = None ):
73
+ def __init__ (self , * , url = None , auth_session = None ):
74
74
"""
75
75
Initialize Cadc object
76
76
@@ -123,10 +123,10 @@ def data_link_url(self):
123
123
if not hasattr (self , '_data_link_url' ):
124
124
self ._data_link_url = get_access_url (
125
125
self .CADCDATALINK_SERVICE_URI ,
126
- "ivo://ivoa.net/std/DataLink#links-1.0" )
126
+ capability = "ivo://ivoa.net/std/DataLink#links-1.0" )
127
127
return self ._data_link_url
128
128
129
- def login (self , user = None , password = None , certificate_file = None ):
129
+ def login (self , * , user = None , password = None , certificate_file = None ):
130
130
"""
131
131
login allows user to authenticate to the service. Both user/password
132
132
and https client certificates are supported.
@@ -167,7 +167,7 @@ def login(self, user=None, password=None, certificate_file=None):
167
167
self .cadctap ._session .cert = certificate_file
168
168
if user and password :
169
169
login_url = get_access_url (self .CADCLOGIN_SERVICE_URI ,
170
- 'ivo://ivoa.net/std/UMS#login-0.1' )
170
+ capability = 'ivo://ivoa.net/std/UMS#login-0.1' )
171
171
if login_url is None :
172
172
raise RuntimeError ("No login URL" )
173
173
# need to login and get a cookie
@@ -223,7 +223,7 @@ def logout(self):
223
223
'Do not know how to log out from custom session' )
224
224
225
225
@class_or_instance
226
- def query_region_async (self , coordinates , radius = 0.016666666666667 * u .deg ,
226
+ def query_region_async (self , coordinates , * , radius = 0.016666666666667 * u .deg ,
227
227
collection = None ,
228
228
get_query_payload = False ):
229
229
"""
@@ -311,7 +311,7 @@ def get_collections(self):
311
311
return collections
312
312
313
313
@class_or_instance
314
- def get_images (self , coordinates , radius ,
314
+ def get_images (self , coordinates , radius , * ,
315
315
collection = None ,
316
316
get_url_list = False ,
317
317
show_progress = False ):
@@ -340,8 +340,8 @@ def get_images(self, coordinates, radius,
340
340
str if returning urls).
341
341
"""
342
342
343
- filenames = self .get_images_async (coordinates , radius , collection ,
344
- get_url_list , show_progress )
343
+ filenames = self .get_images_async (coordinates , radius , collection = collection ,
344
+ get_url_list = get_url_list , show_progress = show_progress )
345
345
346
346
if get_url_list :
347
347
return filenames
@@ -360,7 +360,7 @@ def get_images(self, coordinates, radius,
360
360
361
361
return images
362
362
363
- def get_images_async (self , coordinates , radius , collection = None ,
363
+ def get_images_async (self , coordinates , radius , * , collection = None ,
364
364
get_url_list = False , show_progress = False ):
365
365
"""
366
366
A coordinate-based query function that returns a list of
@@ -471,7 +471,7 @@ def get_image_list(self, query_result, coordinates, radius):
471
471
return result
472
472
473
473
@class_or_instance
474
- def get_data_urls (self , query_result , include_auxiliaries = False ):
474
+ def get_data_urls (self , query_result , * , include_auxiliaries = False ):
475
475
"""
476
476
Function to map the results of a CADC query into URLs to
477
477
corresponding data that can be later downloaded.
@@ -538,7 +538,7 @@ def get_data_urls(self, query_result, include_auxiliaries=False):
538
538
result .append (service_def .access_url )
539
539
return result
540
540
541
- def get_tables (self , only_names = False ):
541
+ def get_tables (self , * , only_names = False ):
542
542
"""
543
543
Gets all public tables
544
544
@@ -575,7 +575,7 @@ def get_table(self, table):
575
575
if table == t .name :
576
576
return t
577
577
578
- def exec_sync (self , query , maxrec = None , uploads = None , output_file = None ,
578
+ def exec_sync (self , query , * , maxrec = None , uploads = None , output_file = None ,
579
579
output_format = 'votable' ):
580
580
"""
581
581
Run a query and return the results or save them in an output_file
@@ -619,7 +619,7 @@ def exec_sync(self, query, maxrec=None, uploads=None, output_file=None,
619
619
result .write (fname , format = output_format , overwrite = True )
620
620
return result
621
621
622
- def create_async (self , query , maxrec = None , uploads = None ):
622
+ def create_async (self , query , * , maxrec = None , uploads = None ):
623
623
"""
624
624
Creates a TAP job to execute and returns it to the caller. The
625
625
caller then can start the execution and monitor the job.
@@ -674,7 +674,7 @@ def load_async_job(self, jobid):
674
674
return pyvo .dal .AsyncTAPJob ('{}/async/{}' .format (
675
675
self .cadctap .baseurl , jobid ), session = self ._auth_session )
676
676
677
- def list_async_jobs (self , phases = None , after = None , last = None ,
677
+ def list_async_jobs (self , * , phases = None , after = None , last = None ,
678
678
short_description = True ):
679
679
"""
680
680
Returns all the asynchronous jobs
@@ -701,7 +701,7 @@ def list_async_jobs(self, phases=None, after=None, last=None,
701
701
return self .cadctap .get_job_list (phases = phases , after = after , last = last ,
702
702
short_description = short_description )
703
703
704
- def _parse_result (self , result , verbose = None ):
704
+ def _parse_result (self , result , * , verbose = None ):
705
705
return result
706
706
707
707
def _args_to_payload (self , * args , ** kwargs ):
@@ -736,7 +736,7 @@ def decorate(func):
736
736
737
737
738
738
@static_vars (caps = {})
739
- def get_access_url (service , capability = None ):
739
+ def get_access_url (service , * , capability = None ):
740
740
"""
741
741
Returns the URL corresponding to a service by doing a lookup in the cadc
742
742
registry. It returns the access URL corresponding to cookie authentication.
0 commit comments