p2api 1.0.10__tar.gz → 1.0.11__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.
- {p2api-1.0.10 → p2api-1.0.11}/PKG-INFO +2 -2
- p2api-1.0.11/p2api/__about__.py +1 -0
- {p2api-1.0.10 → p2api-1.0.11}/p2api/p2api.py +1 -1
- {p2api-1.0.10 → p2api-1.0.11}/p2api/utils/generate_finding_charts.py +5 -2
- {p2api-1.0.10 → p2api-1.0.11}/p2api/utils/p2api_utils.py +4 -3
- {p2api-1.0.10 → p2api-1.0.11}/pyproject.toml +0 -3
- p2api-1.0.10/p2api/__about__.py +0 -1
- {p2api-1.0.10 → p2api-1.0.11}/.gitignore +0 -0
- {p2api-1.0.10 → p2api-1.0.11}/LICENSE +0 -0
- {p2api-1.0.10 → p2api-1.0.11}/README.md +0 -0
- {p2api-1.0.10 → p2api-1.0.11}/p2api/__init__.py +0 -0
- {p2api-1.0.10 → p2api-1.0.11}/p2api/utils/__init__.py +0 -0
- {p2api-1.0.10 → p2api-1.0.11}/p2api/utils/eso_period.py +0 -0
- {p2api-1.0.10 → p2api-1.0.11}/setup.cfg +0 -0
- {p2api-1.0.10 → p2api-1.0.11}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: p2api
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.11
|
|
4
4
|
Summary: Binding for the ESO phase 2 programmatic API
|
|
5
5
|
Project-URL: Homepage, https://www.eso.org/copdemo/apidoc/index.html
|
|
6
6
|
Author-email: Thomas Bierwirth <thomas.bierwirth@eso.org>, John Pritchard <john.pritchard@eso.org>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.11"
|
|
@@ -170,7 +170,7 @@ class ApiConnection(object):
|
|
|
170
170
|
raise P2Error(500, 'POST', kwargs['url'], 'Invalid URL')
|
|
171
171
|
self.apiUrl = API_URL[environment]
|
|
172
172
|
self.loginUrl = LOGIN_URL[environment]
|
|
173
|
-
self.p2fc_url = P2FC_URL[
|
|
173
|
+
self.p2fc_url = P2FC_URL[environment]
|
|
174
174
|
self.access_token = kwargs['access_token']
|
|
175
175
|
self.session = self.requests_retry_session()
|
|
176
176
|
else :
|
|
@@ -211,10 +211,13 @@ def oneOB( api, obId ) :
|
|
|
211
211
|
c_GAIA_im_noise=options.c_GAIA_im_noise,
|
|
212
212
|
)
|
|
213
213
|
oneOB_edt=datetime.datetime.now()
|
|
214
|
-
logging.info(
|
|
214
|
+
logging.info(
|
|
215
|
+
"Finding chart for OBid = %d, OBname = '%s' @ %s done in %s."
|
|
216
|
+
% (obId, OB['name'], OB['instrument'], str(oneOB_edt-oneOB_sdt))
|
|
217
|
+
)
|
|
215
218
|
if data is not None :
|
|
216
219
|
try :
|
|
217
|
-
jwarn=json.loads(
|
|
220
|
+
jwarn=json.loads(data.content.decode('utf-8'))
|
|
218
221
|
if 'warnings' in jwarn.keys() :
|
|
219
222
|
logging.warning(jwarn['warnings'])
|
|
220
223
|
except :
|
|
@@ -8,7 +8,7 @@ import getpass
|
|
|
8
8
|
import keyring
|
|
9
9
|
import re
|
|
10
10
|
|
|
11
|
-
from p2api.utils.eso_period import *
|
|
11
|
+
#from p2api.utils.eso_period import *
|
|
12
12
|
|
|
13
13
|
try:
|
|
14
14
|
import astropy.units as u
|
|
@@ -78,7 +78,6 @@ def ESO_period_start_end_datetimes(P):
|
|
|
78
78
|
y2=1967+(P+2)//2
|
|
79
79
|
md2=ESO_period_first_last_dates[P%2][1]
|
|
80
80
|
return ["{}{}".format(y1,md1),"{y2}{md2}.format(y2,md2)"]
|
|
81
|
-
'''
|
|
82
81
|
# ---------------------------------------------------------------------------------------
|
|
83
82
|
def ESO_period_start_end_dates(P):
|
|
84
83
|
return [
|
|
@@ -92,6 +91,7 @@ def ESO_period_start_end_datetimes(P):
|
|
|
92
91
|
ESO_period_datetime_end(P),
|
|
93
92
|
]
|
|
94
93
|
# ---------------------------------------------------------------------------------------
|
|
94
|
+
'''
|
|
95
95
|
def get_attrs(klass):
|
|
96
96
|
return [k for k in klass.__dict__.keys()
|
|
97
97
|
if not k.startswith('__')
|
|
@@ -106,7 +106,8 @@ source: https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.python/bfb
|
|
|
106
106
|
usage: parser = OptionParser(description=help_text, formatter=IndentedHelpFormatterWithNL())
|
|
107
107
|
'''
|
|
108
108
|
|
|
109
|
-
from optparse import
|
|
109
|
+
from optparse import IndentedHelpFormatter
|
|
110
|
+
import textwrap
|
|
110
111
|
|
|
111
112
|
class IndentedHelpFormatterWithNL(IndentedHelpFormatter):
|
|
112
113
|
def format_description(self, description):
|
|
@@ -36,14 +36,11 @@ classifiers = [
|
|
|
36
36
|
"Programming Language :: Python :: 3.12",
|
|
37
37
|
]
|
|
38
38
|
dependencies = [
|
|
39
|
-
#"astroplan",
|
|
40
|
-
#"astropy",
|
|
41
39
|
"keyring",
|
|
42
40
|
"requests",
|
|
43
41
|
]
|
|
44
42
|
|
|
45
43
|
[project.scripts]
|
|
46
|
-
#p2api_add_absolute_time_intervals = "p2api.utils.add_absolute_time_intervals:main"
|
|
47
44
|
p2api_generate_finding_charts = "p2api.utils.generate_finding_charts:main"
|
|
48
45
|
|
|
49
46
|
[project.urls]
|
p2api-1.0.10/p2api/__about__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.0.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|