pyxetabase 3.1.0.dev21__tar.gz → 3.1.0.dev23__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyxetabase might be problematic. Click here for more details.

Files changed (40) hide show
  1. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/PKG-INFO +1 -1
  2. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/opencga_config.py +29 -0
  3. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/admin_client.py +1 -2
  4. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/file_client.py +1 -1
  5. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/meta_client.py +4 -3
  6. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/study_client.py +28 -0
  7. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase.egg-info/PKG-INFO +1 -1
  8. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/setup.py +1 -1
  9. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/LICENSE +0 -0
  10. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/README.rst +0 -0
  11. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/__init__.py +0 -0
  12. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/commons.py +0 -0
  13. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/exceptions.py +0 -0
  14. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/opencga_client.py +0 -0
  15. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/__init__.py +0 -0
  16. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/_parent_rest_clients.py +0 -0
  17. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/alignment_client.py +0 -0
  18. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/clinical_analysis_client.py +0 -0
  19. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/cohort_client.py +0 -0
  20. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/cvdb_client.py +0 -0
  21. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/disease_panel_client.py +0 -0
  22. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/family_client.py +0 -0
  23. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/federation_client.py +0 -0
  24. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/ga4gh_client.py +0 -0
  25. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/individual_client.py +0 -0
  26. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/job_client.py +0 -0
  27. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/organization_client.py +0 -0
  28. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/project_client.py +0 -0
  29. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/sample_client.py +0 -0
  30. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/user_client.py +0 -0
  31. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/variant_client.py +0 -0
  32. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/variant_operation_client.py +0 -0
  33. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_clients/workflow_client.py +0 -0
  34. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/rest_response.py +0 -0
  35. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase/retry.py +0 -0
  36. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase.egg-info/SOURCES.txt +0 -0
  37. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase.egg-info/dependency_links.txt +0 -0
  38. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase.egg-info/requires.txt +0 -0
  39. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/pyxetabase.egg-info/top_level.txt +0 -0
  40. {pyxetabase-3.1.0.dev21 → pyxetabase-3.1.0.dev23}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyxetabase
3
- Version: 3.1.0.dev21
3
+ Version: 3.1.0.dev23
4
4
  Summary: A REST client for OpenCGA enterprise REST web services
5
5
  Author: Daniel Perez-Gil
6
6
  Author-email: daniel.perez@zettagenomics.com
@@ -76,6 +76,35 @@ class ClientConfiguration(object):
76
76
  except requests.ConnectionError:
77
77
  raise Exception('Unreachable host "{}"'.format(self.host))
78
78
 
79
+ @property
80
+ def host(self):
81
+ return self._config['rest']['host']
82
+
83
+ @host.setter
84
+ def host(self, new_host):
85
+ self._config['rest']['host'] = new_host
86
+
87
+ @property
88
+ def tlsAllowInvalidCertificates(self):
89
+ if ('tlsAllowInvalidCertificates' in self._config['rest']
90
+ and self._config['rest']['tlsAllowInvalidCertificates'] is not None):
91
+ return self._config['rest']['tlsAllowInvalidCertificates']
92
+ else:
93
+ return False
94
+
95
+ @property
96
+ def version(self):
97
+ return self._config['version'] if 'version' in self._config else 'v2'
98
+
99
+ @property
100
+ def cookies(self):
101
+ if 'cookies' in self._config and self._config['cookies']:
102
+ python_session_fhand = open(os.path.expanduser("~/.opencga/python_session.json"), 'r')
103
+ session_info = json.loads(python_session_fhand.read())
104
+ return session_info['cookies']
105
+ else:
106
+ return None
107
+
79
108
  @property
80
109
  def configuration(self):
81
110
  return self._config
@@ -147,8 +147,7 @@ class Admin(_ParentRestClient):
147
147
 
148
148
  def sync_users(self, data=None, **options):
149
149
  """
150
- Synchronise a group of users from an authentication origin with a
151
- group in a study from catalog.
150
+ [DEPRECATED] Moved to /users/sync.
152
151
  PATH: /{apiVersion}/admin/users/sync
153
152
 
154
153
  :param dict data: JSON containing the parameters. (REQUIRED)
@@ -420,7 +420,7 @@ class File(_ParentRestClient):
420
420
  MICROARRAY_EXPRESSION_TWOCHANNELS_GENEPIX DATAMATRIX_EXPRESSION
421
421
  IDLIST IDLIST_RANKED ANNOTATION_GENEVSANNOTATION OTHER_NEWICK
422
422
  OTHER_BLAST OTHER_INTERACTION OTHER_GENOTYPE OTHER_PLINK OTHER_VCF
423
- OTHER_PED VCF4 CVDB VARIANT ALIGNMENT COVERAGE SEQUENCE PEDIGREE
423
+ OTHER_PED VCF4 VARIANT ALIGNMENT COVERAGE SEQUENCE PEDIGREE
424
424
  REFERENCE_GENOME NONE UNKNOWN']
425
425
  :param str checksum: Expected MD5 file checksum.
426
426
  :param bool resource: Boolean field indicating whether the file is a
@@ -55,15 +55,16 @@ class Meta(_ParentRestClient):
55
55
 
56
56
  return self._get(category='meta', resource='model', **options)
57
57
 
58
- def openapi(self, **options):
58
+ def openapi(self, url, **options):
59
59
  """
60
60
  Opencga openapi json.
61
61
  PATH: /{apiVersion}/meta/openapi
62
62
 
63
- :param str environment: Environment of the app.
64
- :param str host: Opencga host without environment.
63
+ :param str url: Opencga host with environment. (REQUIRED)
64
+ :param str study: Opencga study to be default in queries.
65
65
  """
66
66
 
67
+ options['url'] = url
67
68
  return self._get(category='meta', resource='openapi', **options)
68
69
 
69
70
  def ping(self, **options):
@@ -166,6 +166,19 @@ class Study(_ParentRestClient):
166
166
 
167
167
  return self._get(category='studies', resource='groups', query_id=study, **options)
168
168
 
169
+ def sync_groups(self, study, data=None, **options):
170
+ """
171
+ Associate a remote group from an authentication origin with a local
172
+ group in a study.
173
+ PATH: /{apiVersion}/studies/{study}/groups/sync
174
+
175
+ :param dict data: JSON containing the parameters. (REQUIRED)
176
+ :param str study: Study [[organization@]project:]study where study and
177
+ project can be either the ID or UUID. (REQUIRED)
178
+ """
179
+
180
+ return self._post(category='studies', resource='sync', query_id=study, subcategory='groups', data=data, **options)
181
+
169
182
  def update_groups(self, study, data=None, **options):
170
183
  """
171
184
  Add or remove a group.
@@ -386,6 +399,21 @@ class Study(_ParentRestClient):
386
399
 
387
400
  return self._post(category='studies', resource='update', query_id=study, data=data, **options)
388
401
 
402
+ def sync_users(self, study, authentication_origin_id, **options):
403
+ """
404
+ Synchronize all users from the remote groups of a given authentication
405
+ origin.
406
+ PATH: /{apiVersion}/studies/{study}/users/sync
407
+
408
+ :param str authentication_origin_id: Authentication origin ID.
409
+ (REQUIRED)
410
+ :param str study: Study [[organization@]project:]study where study and
411
+ project can be either the ID or UUID. (REQUIRED)
412
+ """
413
+
414
+ options['authenticationOriginId'] = authentication_origin_id
415
+ return self._post(category='studies', resource='sync', query_id=study, subcategory='users', **options)
416
+
389
417
  def variable_sets(self, study, **options):
390
418
  """
391
419
  Fetch variableSets from a study.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyxetabase
3
- Version: 3.1.0.dev21
3
+ Version: 3.1.0.dev23
4
4
  Summary: A REST client for OpenCGA enterprise REST web services
5
5
  Author: Daniel Perez-Gil
6
6
  Author-email: daniel.perez@zettagenomics.com
@@ -14,7 +14,7 @@ with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
14
14
 
15
15
  setup(
16
16
  name='pyxetabase',
17
- version='3.1.0.dev21',
17
+ version='3.1.0.dev23',
18
18
  description='A REST client for OpenCGA enterprise REST web services',
19
19
  long_description=long_description,
20
20
  long_description_content_type='text/x-rst',