a2p2 0.7.2__tar.gz → 0.7.3__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.
- {a2p2-0.7.2/a2p2.egg-info → a2p2-0.7.3}/PKG-INFO +4 -1
- {a2p2-0.7.2 → a2p2-0.7.3}/README.rst +3 -0
- a2p2-0.7.3/a2p2/chara/facility.py +83 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/version.py +16 -12
- {a2p2-0.7.2 → a2p2-0.7.3/a2p2.egg-info}/PKG-INFO +4 -1
- a2p2-0.7.2/a2p2/chara/facility.py +0 -68
- {a2p2-0.7.2 → a2p2-0.7.3}/LICENSE +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/MANIFEST.in +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/__init__.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/__main__.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/chara/__init__.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/chara/gui.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/client.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/facility.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/gui.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/instrument.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/jmmc/__init__.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/jmmc/catalogs.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/jmmc/generated_models.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/jmmc/models.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/jmmc/services.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/jmmc/utils.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/jmmc/webservices.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/ob.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/samp.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/utils.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/__init__.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/conf/GRAVITY_ditTable.json +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/conf/GRAVITY_rangeTable.json +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/conf/MATISSE_ditTable.json +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/conf/MATISSE_rangeTable.json +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/conf/PIONIER_ditTable.json +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/conf/PIONIER_rangeTable.json +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/facility.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/gravity.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/gui.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/instrument.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/matisse.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2/vlti/pionier.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2.egg-info/SOURCES.txt +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2.egg-info/dependency_links.txt +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2.egg-info/entry_points.txt +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2.egg-info/requires.txt +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/a2p2.egg-info/top_level.txt +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/setup.cfg +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/setup.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/test/test_jmmc_catalog.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/test/test_jmmc_models.py +0 -0
- {a2p2-0.7.2 → a2p2-0.7.3}/test/test_test.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: a2p2
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.3
|
4
4
|
Summary: UNKNOWN
|
5
5
|
Home-page: http://www.jmmc.fr/a2p2
|
6
6
|
Author: JMMC Tech Group
|
@@ -80,6 +80,9 @@ Each facilities get it's own code directory to manage specific GUI and specific
|
|
80
80
|
|
81
81
|
Please fill an issue_ for any question, remark or enhancement request.
|
82
82
|
|
83
|
+
Release notes
|
84
|
+
-------------
|
85
|
+
`Check file <release-notes.md>`_
|
83
86
|
|
84
87
|
License
|
85
88
|
-------
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
|
3
|
+
__all__ = []
|
4
|
+
|
5
|
+
from a2p2.chara.gui import CharaUI
|
6
|
+
from a2p2.facility import Facility
|
7
|
+
import requests
|
8
|
+
import logging
|
9
|
+
import traceback
|
10
|
+
|
11
|
+
HELPTEXT = "TODO update this HELP message in a2p2/chara/facility.py"
|
12
|
+
|
13
|
+
logger = logging.getLogger(__name__)
|
14
|
+
|
15
|
+
class CharaFacility(Facility):
|
16
|
+
|
17
|
+
def __init__(self, a2p2client):
|
18
|
+
Facility.__init__(self, a2p2client, "CHARA", HELPTEXT)
|
19
|
+
self.charaUI = CharaUI(self)
|
20
|
+
self.connected2OB2 = False
|
21
|
+
self.validQueueServer = None
|
22
|
+
|
23
|
+
def processOB(self, ob):
|
24
|
+
if not ob:
|
25
|
+
return
|
26
|
+
|
27
|
+
self.a2p2client.ui.addToLog(
|
28
|
+
"OB received for '" + self.facilityName + "' interferometer")
|
29
|
+
# show ob dict for debug
|
30
|
+
self.a2p2client.ui.addToLog(str(ob), False)
|
31
|
+
|
32
|
+
# performs operation
|
33
|
+
self.consumeOB(ob)
|
34
|
+
|
35
|
+
# give focus on last updated UI
|
36
|
+
self.a2p2client.ui.showFacilityUI(self.charaUI)
|
37
|
+
|
38
|
+
def checkServer(self):
|
39
|
+
if self.validQueueServer:
|
40
|
+
# recheck ?
|
41
|
+
return True
|
42
|
+
else:
|
43
|
+
# search and test servers from preferences
|
44
|
+
queueServers=self.a2p2client.preferences.getCharaQueueServer()
|
45
|
+
msg=""
|
46
|
+
if queueServers :
|
47
|
+
for queueServer in queueServers:
|
48
|
+
logger.debug(f'Trying to send OB on queuserver : {queueServer}')
|
49
|
+
try:
|
50
|
+
c=requests.get(queueServer, timeout=3)
|
51
|
+
msg+=f"Connection succeeded on OB server : {c.json()}\n"
|
52
|
+
self.validQueueServer = queueServer
|
53
|
+
break
|
54
|
+
except:
|
55
|
+
msg+=f"Connection failed on {queueServer}\n"
|
56
|
+
|
57
|
+
self.a2p2client.ui.addToLog(msg)
|
58
|
+
self.charaUI.display(msg)
|
59
|
+
|
60
|
+
return self.validQueueServer
|
61
|
+
|
62
|
+
def consumeOB(self, ob):
|
63
|
+
if self.checkServer():
|
64
|
+
try:
|
65
|
+
r = requests.post(self.validQueueServer, json=ob.as_dict(), timeout=3)
|
66
|
+
msg = ""
|
67
|
+
msg+=f"OB sent to remote server queue : {r}"
|
68
|
+
self.connected2OB2 = True
|
69
|
+
self.a2p2client.ui.addToLog(msg)
|
70
|
+
self.charaUI.display(msg)
|
71
|
+
except:
|
72
|
+
print(traceback.format_exc())
|
73
|
+
msg=f"Can't send OB to the '{self.validQueueServer}' queue server, please relaunch it or try again for a new one."
|
74
|
+
self.validQueueServer = None
|
75
|
+
self.a2p2client.ui.addToLog(msg)
|
76
|
+
self.charaUI.display(msg)
|
77
|
+
else:
|
78
|
+
msg=f"Can't find any queue server, please launch it, edit your preferences or check your ssh port forwarding"
|
79
|
+
|
80
|
+
# display OB
|
81
|
+
self.charaUI.displayOB(ob)
|
82
|
+
|
83
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "0.7.
|
1
|
+
__version__ = "0.7.3"
|
2
2
|
|
3
3
|
__release_notes__ = {
|
4
4
|
# "0.1.6": {
|
@@ -21,18 +21,9 @@ __release_notes__ = {
|
|
21
21
|
#
|
22
22
|
# ],
|
23
23
|
# },
|
24
|
-
"0.7.
|
25
|
-
"STATUS": [
|
26
|
-
],
|
27
|
-
"A2P2": [
|
28
|
-
"Auto update chara queueserver preference",
|
29
|
-
"a2p2 -r generates release-notes.md (rendered on a2p2 repository)"
|
30
|
-
],
|
31
|
-
"VLTI": [
|
32
|
-
"Bugfix to support missin preference file"
|
33
|
-
],
|
24
|
+
"0.7.3": {
|
34
25
|
"CHARA": [
|
35
|
-
"
|
26
|
+
"Better reuse of last working queueserver"
|
36
27
|
],
|
37
28
|
"TODO-SCIENCE": [
|
38
29
|
"Merge AO or GS in a same code section for every instruments",
|
@@ -46,6 +37,19 @@ __release_notes__ = {
|
|
46
37
|
"Complete test suite with more real p2 submissions",
|
47
38
|
"Try to read OB in P2 and send them back to Aspro2 as a new obs",
|
48
39
|
],
|
40
|
+
},"0.7.2": {
|
41
|
+
"STATUS": [
|
42
|
+
],
|
43
|
+
"A2P2": [
|
44
|
+
"Auto update chara queueserver preference",
|
45
|
+
"a2p2 -r generates release-notes.md (rendered on a2p2 repository)"
|
46
|
+
],
|
47
|
+
"VLTI": [
|
48
|
+
"Bugfix to support missin preference file"
|
49
|
+
],
|
50
|
+
"CHARA": [
|
51
|
+
"Support and try every queueserver's Urls comma separated from the queuserver user preference"
|
52
|
+
],
|
49
53
|
},"0.7.1": {
|
50
54
|
"STATUS": [
|
51
55
|
],
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: a2p2
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.3
|
4
4
|
Summary: UNKNOWN
|
5
5
|
Home-page: http://www.jmmc.fr/a2p2
|
6
6
|
Author: JMMC Tech Group
|
@@ -80,6 +80,9 @@ Each facilities get it's own code directory to manage specific GUI and specific
|
|
80
80
|
|
81
81
|
Please fill an issue_ for any question, remark or enhancement request.
|
82
82
|
|
83
|
+
Release notes
|
84
|
+
-------------
|
85
|
+
`Check file <release-notes.md>`_
|
83
86
|
|
84
87
|
License
|
85
88
|
-------
|
@@ -1,68 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python
|
2
|
-
|
3
|
-
__all__ = []
|
4
|
-
|
5
|
-
from a2p2.chara.gui import CharaUI
|
6
|
-
from a2p2.facility import Facility
|
7
|
-
import requests
|
8
|
-
import logging
|
9
|
-
import traceback
|
10
|
-
|
11
|
-
HELPTEXT = "TODO update this HELP message in a2p2/chara/facility.py"
|
12
|
-
|
13
|
-
logger = logging.getLogger(__name__)
|
14
|
-
|
15
|
-
class CharaFacility(Facility):
|
16
|
-
|
17
|
-
def __init__(self, a2p2client):
|
18
|
-
Facility.__init__(self, a2p2client, "CHARA", HELPTEXT)
|
19
|
-
self.charaUI = CharaUI(self)
|
20
|
-
self.connected2OB2 = False
|
21
|
-
|
22
|
-
def processOB(self, ob):
|
23
|
-
if not ob:
|
24
|
-
return
|
25
|
-
|
26
|
-
self.a2p2client.ui.addToLog(
|
27
|
-
"OB received for '" + self.facilityName + "' interferometer")
|
28
|
-
# show ob dict for debug
|
29
|
-
self.a2p2client.ui.addToLog(str(ob), False)
|
30
|
-
|
31
|
-
# performs operation
|
32
|
-
self.consumeOB(ob)
|
33
|
-
|
34
|
-
# give focus on last updated UI
|
35
|
-
self.a2p2client.ui.showFacilityUI(self.charaUI)
|
36
|
-
|
37
|
-
def consumeOB(self, ob):
|
38
|
-
# forward message if a server is present in the preferences
|
39
|
-
queueServers=self.a2p2client.preferences.getCharaQueueServer()
|
40
|
-
if queueServers :
|
41
|
-
for queueServer in queueServers:
|
42
|
-
logger.debug(f'Trying to send OB on queuserver : {queueServer}')
|
43
|
-
try:
|
44
|
-
if not self.connected2OB2:
|
45
|
-
try:
|
46
|
-
c=requests.get(queueServer, timeout=5)
|
47
|
-
msg += f"Connection succeeded on OB2 server : {c.json()}\n"
|
48
|
-
except:
|
49
|
-
msg += f"Connection succeded on a non identified OB2 server\n"
|
50
|
-
r = requests.post(queueServer, json=ob.as_dict(), timeout=5)
|
51
|
-
msg = ""
|
52
|
-
msg+=f"OB sent to remote server queue : {r}"
|
53
|
-
self.connected2OB2 = True
|
54
|
-
self.a2p2client.ui.addToLog(msg)
|
55
|
-
self.charaUI.display(msg)
|
56
|
-
break # do only send to the first server
|
57
|
-
except:
|
58
|
-
print(traceback.format_exc())
|
59
|
-
msg=f"Can't send OB to the '{queueServer}' queue server, please launch it, edit your preferences or check your ssh port forwarding "
|
60
|
-
self.connected2OB2 = False
|
61
|
-
self.a2p2client.ui.addToLog(msg)
|
62
|
-
self.charaUI.display(msg)
|
63
|
-
|
64
|
-
|
65
|
-
# display OB
|
66
|
-
self.charaUI.displayOB(ob)
|
67
|
-
|
68
|
-
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|