cdasws 1.8.11__py3-none-any.whl → 1.8.13__py3-none-any.whl

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.
cdasws/datarequest.py CHANGED
@@ -24,7 +24,7 @@
24
24
  #
25
25
  # NOSA HEADER END
26
26
  #
27
- # Copyright (c) 2019-2024 United States Government as represented by
27
+ # Copyright (c) 2019-2026 United States Government as represented by
28
28
  # the National Aeronautics and Space Administration. No copyright is
29
29
  # claimed in the United States under Title 17, U.S.Code. All Other
30
30
  # Rights Reserved.
@@ -36,7 +36,7 @@ Package defining classes to represent the DataRequestEntity and its
36
36
  sub-classes from
37
37
  <https://cdaweb.gsfc.nasa.gov/WebServices/REST/CDAS.xsd>.<br>
38
38
 
39
- Copyright &copy; 2019-2024 United States Government as represented by the
39
+ Copyright &copy; 2019-2026 United States Government as represented by the
40
40
  National Aeronautics and Space Administration. No copyright is claimed in
41
41
  the United States under Title 17, U.S.Code. All Other Rights Reserved.
42
42
  """
@@ -350,7 +350,6 @@ class DataRequest(metaclass=ABCMeta): # pylint: disable=too-few-public-methods
350
350
  string XML representation of this object.
351
351
  """
352
352
 
353
- #return ET.tostring(self.xml_element(), encoding="utf-8", method='xml', xml_declaration=True)
354
353
  return ET.tostring(self.xml_element(), encoding="utf-8", method='xml')
355
354
 
356
355
 
cdasws/doi.py ADDED
@@ -0,0 +1,127 @@
1
+ #!/usr/bin/env python3
2
+
3
+ #
4
+ # NOSA HEADER START
5
+ #
6
+ # The contents of this file are subject to the terms of the NASA Open
7
+ # Source Agreement (NOSA), Version 1.3 only (the "Agreement"). You may
8
+ # not use this file except in compliance with the Agreement.
9
+ #
10
+ # You can obtain a copy of the agreement at
11
+ # docs/NASA_Open_Source_Agreement_1.3.txt
12
+ # or
13
+ # https://cdaweb.gsfc.nasa.gov/WebServices/NASA_Open_Source_Agreement_1.3.txt.
14
+ #
15
+ # See the Agreement for the specific language governing permissions
16
+ # and limitations under the Agreement.
17
+ #
18
+ # When distributing Covered Code, include this NOSA HEADER in each
19
+ # file and include the Agreement file at
20
+ # docs/NASA_Open_Source_Agreement_1.3.txt. If applicable, add the
21
+ # following below this NOSA HEADER, with the fields enclosed by
22
+ # brackets "[]" replaced with your own identifying information:
23
+ # Portions Copyright [yyyy] [name of copyright owner]
24
+ #
25
+ # NOSA HEADER END
26
+ #
27
+ # Copyright (c) 2025 United States Government as represented by
28
+ # the National Aeronautics and Space Administration. No copyright is
29
+ # claimed in the United States under Title 17, U.S.Code. All Other
30
+ # Rights Reserved.
31
+ #
32
+
33
+
34
+ """
35
+ Module defines utility functions related to Digital Object Identifiers
36
+ (DOI).<br>
37
+
38
+ Copyright &copy; 2025 United States Government as represented by the
39
+ National Aeronautics and Space Administration. No copyright is claimed in
40
+ the United States under Title 17, U.S.Code. All Other Rights Reserved.
41
+ """
42
+
43
+
44
+ def get_canonical_doi(
45
+ doi: str
46
+ ) -> str:
47
+ """
48
+ Returns a canonical representation (no leading https://doi.org/ and
49
+ lower case) Digital Object Identifier (DOI) value.
50
+
51
+ Parameters
52
+ ----------
53
+ doi
54
+ digital object identifier.
55
+ Returns
56
+ -------
57
+ str
58
+ The canonical DOI value.
59
+ """
60
+ return doi.replace('https://doi.org/', '').lower()
61
+
62
+
63
+ def get_doi_landing_page_url(
64
+ doi: str
65
+ ) -> str:
66
+ """
67
+ Returns a URL to the given Digital Object Identifier's landing
68
+ page (metadata for the DOI).
69
+
70
+ Parameters
71
+ ----------
72
+ doi
73
+ digital object identifier.
74
+ Returns
75
+ -------
76
+ str
77
+ A URL to the DOI's landing page.
78
+ """
79
+
80
+ if not doi.startswith('http'):
81
+ return 'https://doi.org/' + doi
82
+ return doi
83
+
84
+
85
+ def get_doi_badge_url(
86
+ doi: str
87
+ ) -> str:
88
+ """
89
+ Returns a URL to the given Digital Object Identifier's badge.
90
+
91
+ Parameters
92
+ ----------
93
+ doi
94
+ digital object identifier.
95
+ Returns
96
+ -------
97
+ str
98
+ A URL to the DOI's badge.
99
+ """
100
+
101
+ canonical_doi = get_canonical_doi(doi)
102
+
103
+ return 'https://img.shields.io/badge/DOI-' + \
104
+ canonical_doi.replace('-', '--') + '-blue'
105
+
106
+
107
+ def get_doi_hdp_url(
108
+ doi: str
109
+ ) -> str:
110
+ """
111
+ Returns a URL to the given Digital Object Identifier's Heliophysics
112
+ Data Portal (HDP) page.
113
+
114
+ Parameters
115
+ ----------
116
+ doi
117
+ digital object identifier.
118
+ Returns
119
+ -------
120
+ str
121
+ A URL to the DOI's HDP page.
122
+ """
123
+
124
+ canonical_doi = get_canonical_doi(doi)
125
+
126
+ return 'https://heliophysicsdata.gsfc.nasa.gov/WS/hdp/1/Spase/' \
127
+ 'NumericalData;DisplayData?DOI=' + canonical_doi
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdasws
3
- Version: 1.8.11
3
+ Version: 1.8.13
4
4
  Summary: NASA's Coordinated Data Analysis System Web Service Client Library
5
5
  Home-page: https://cdaweb.gsfc.nasa.gov/WebServices/REST
6
6
  Author: Bernie Harris
@@ -16,6 +16,7 @@ Classifier: Intended Audience :: System Administrators
16
16
  Classifier: License :: OSI Approved :: NASA Open Source Agreement v1.3 (NASA-1.3)
17
17
  Classifier: Operating System :: OS Independent
18
18
  Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
19
20
  Classifier: Topic :: Scientific/Engineering :: Physics
20
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
22
  Description-Content-Type: text/markdown
@@ -57,6 +58,8 @@ and can return data from any of
57
58
  [pandas.DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html)
58
59
  with all source and
59
60
  [ISTP/SPDF](https://spdf.gsfc.nasa.gov/sp_use_of_cdf.html) metadata.
61
+ Note that this package is included in the [HelioCloud](https://heliocloud.org/)
62
+ base image, so there is no need to install it there.
60
63
  Frequently asked questions concerning this library are at
61
64
  [FAQ](https://cdaweb.gsfc.nasa.gov/WebServices/REST/py/FAQ.html).
62
65
  For more general details about the CDAS web services, see
@@ -0,0 +1,14 @@
1
+ cdasws/__init__.py,sha256=Tnc6W-fWhh19fzk9-_xMTO5xndrQaFzEZ_vX-JZ_UgY,2629
2
+ cdasws/__main__.py,sha256=6XEenCcOcxCM9POH2BiTM9z6cnHqZDQU8gZ4Ia7xqoA,13515
3
+ cdasws/cdasws.py,sha256=KN_n2MwfR8QY0nsUxr6fz-3ZMsoIZEvXTC8Kp_QcyeU,91514
4
+ cdasws/datarepresentation.py,sha256=kKgAKCA4uzGoBQ8r8jbXstBg8SCg_EQtsoGhO8kIpco,2164
5
+ cdasws/datarequest.py,sha256=dlAq9H1Tn8COPOWurv3w5wLGWoFNDQXgGQtROlK6zxg,28978
6
+ cdasws/doi.py,sha256=ph0uQ_dM081V4d_uFN1lNCn7-UxHERIyYbTO3JqyqMQ,3172
7
+ cdasws/timeinterval.py,sha256=UcKB-rFSk2eeaw0a29gOQQq7rNY0ab4Qwfz4iwJFelg,7839
8
+ cdasws-1.8.13.dist-info/licenses/LICENSE,sha256=9VDxMcDDn3_T-sDQTMPxmiPZBDkPIiTO4OzYK5olDmk,12589
9
+ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ tests/test_cdasws.py,sha256=DsKesU19_9zUIO1a7oyWWtywBGN7gjdQHFLMGUZ4X8c,24395
11
+ cdasws-1.8.13.dist-info/METADATA,sha256=FpNoK_LZ1xdPjaGva7CsAQ7SeQBHuMprYZf2U4BEryI,7107
12
+ cdasws-1.8.13.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
13
+ cdasws-1.8.13.dist-info/top_level.txt,sha256=GyIvHk5F6ysnTdDfnQsjZbTBt_EYrKyC0oeiIt9l-AE,7
14
+ cdasws-1.8.13.dist-info/RECORD,,
@@ -17,7 +17,7 @@ Government Agency Original Software Designation: GSC-14730-1
17
17
  Government Agency Original Software Title: "Space Physics Data Facility Web Services"
18
18
  User Registration Requested. Please Visit http://spdf.gsfc.nasa.gov/
19
19
  Government Agency Point of Contact for Original Software:
20
- gsfc-spdf-support@lists.nasa.gov
20
+ NASA-SPDF-Support@nasa.onmicrosoft.com
21
21
 
22
22
 
23
23
  1. DEFINITIONS
@@ -1,13 +0,0 @@
1
- cdasws/__init__.py,sha256=0pB64-kPdpLdMptyZIbyXSZmqADfG6PGwGyIxYmmrv0,92358
2
- cdasws/__main__.py,sha256=d8GJwd6EJK1JBS71q6h_1LYVUUj1IlRLpylQCi1SRGM,13466
3
- cdasws/cdasws.py,sha256=755mLWlMFXknNP3f8g_W9An6niAmksqcb1NdgiAybj0,29552
4
- cdasws/datarepresentation.py,sha256=kKgAKCA4uzGoBQ8r8jbXstBg8SCg_EQtsoGhO8kIpco,2164
5
- cdasws/datarequest.py,sha256=fQVroT8RXYhJLG7_y-HO3ABnJUQJjWGFPeLNrtwbWtk,29080
6
- cdasws/timeinterval.py,sha256=UcKB-rFSk2eeaw0a29gOQQq7rNY0ab4Qwfz4iwJFelg,7839
7
- cdasws-1.8.11.dist-info/licenses/LICENSE,sha256=og42scUY42lPLGBg0wHt6JtrbeInVEr5xojyrguPqrQ,12583
8
- tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- tests/test_cdasws.py,sha256=DsKesU19_9zUIO1a7oyWWtywBGN7gjdQHFLMGUZ4X8c,24395
10
- cdasws-1.8.11.dist-info/METADATA,sha256=UT8MZ4EYgYEdtEvZZPKwgh0P9NFfT8_ka04emp-HdvQ,6926
11
- cdasws-1.8.11.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
12
- cdasws-1.8.11.dist-info/top_level.txt,sha256=GyIvHk5F6ysnTdDfnQsjZbTBt_EYrKyC0oeiIt9l-AE,7
13
- cdasws-1.8.11.dist-info/RECORD,,