Commit ed662127e020bacd1879903ed02d836a45b929cc
1 parent
03ef88b0
Exists in
master
Revert "merge"
This reverts commit 03ef88b030c0f9cd542b7841749ff0afcf70ecf2.
Showing
10 changed files
with
76 additions
and
204 deletions
Show diff stats
doc/uml/activities/scheduler/Scheduling.png deleted
109 KB
doc/uml/activities/scheduler/compute_schedule_act.png deleted
50.1 KB
doc/uml/activities/scheduler/copy_from_previous_schedule_act.png deleted
30.8 KB
doc/uml/activities/scheduler/make_schedule_act.png deleted
45.3 KB
doc/uml/activities/scheduler/see_schedules_act.png deleted
14.4 KB
install.json deleted
@@ -1,31 +0,0 @@ | @@ -1,31 +0,0 @@ | ||
1 | -{ | ||
2 | - "Configuration": { | ||
3 | - "env": "ttest_env", | ||
4 | - "name": "default", | ||
5 | - "path": "/home/portos/IRAP/pyros/", | ||
6 | - "requirements": "REQUIREMENTS.txt" | ||
7 | - }, | ||
8 | - "install": { | ||
9 | - "env_bin": [], | ||
10 | - "env_pip": [], | ||
11 | - "link": [ | ||
12 | - "update" | ||
13 | - ], | ||
14 | - "normal": [], | ||
15 | - "special": [ | ||
16 | - "create" | ||
17 | - ] | ||
18 | - }, | ||
19 | - "update": { | ||
20 | - "env_bin": [], | ||
21 | - "env_pip": [ | ||
22 | - "install --upgrade pip", | ||
23 | - "install --upgrade wheel", | ||
24 | - "" | ||
25 | - ], | ||
26 | - "normal": [], | ||
27 | - "special": [ | ||
28 | - "requirements" | ||
29 | - ] | ||
30 | - } | ||
31 | -} | ||
32 | \ No newline at end of file | 0 | \ No newline at end of file |
@@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
1 | +File Logs are organized by module | ||
2 | + | ||
3 | +every file is reseted at pyros launch except pyros.log | ||
4 | +You must clean this directory before pushing. | ||
5 | +You can use the pyrosrun.sh clear_logs command. | ||
6 | + | ||
7 | +For example, logs for the module MONITORING must be in the file : | ||
8 | + | ||
9 | +> monitoring.logs | ||
10 | + | ||
11 | +The logs are formated like this : | ||
12 | + | ||
13 | +> '%(filename)s : %(lineno)s -> %(message)s' | ||
14 | +> "filename : line -> message". | ||
15 | + | ||
16 | +To use the logger you must import logger.config | ||
17 | + | ||
18 | +> import logger.config as l | ||
19 | +> log = l.setupLogger("name", "file_name") | ||
20 | + | ||
21 | +Basic log : | ||
22 | + | ||
23 | +> log.info('Your message') | ||
24 | + | ||
25 | +if you want to log in the file pyros.log you must use logging | ||
26 | + | ||
27 | +> import logger.config as l | ||
28 | +> l.logging.info('Your message') |
misc/templates/base.html deleted
@@ -1,125 +0,0 @@ | @@ -1,125 +0,0 @@ | ||
1 | -<!DOCTYPE html> | ||
2 | -<html lang="en"> | ||
3 | -<head> | ||
4 | - | ||
5 | - {% load staticfiles %} | ||
6 | - | ||
7 | - <meta charset="utf-8"> | ||
8 | - <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
9 | - <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
10 | - <meta name="description" content="Control center for the SVOM French GFT"> | ||
11 | - <meta name="author" content="CNRS-IRAP"> | ||
12 | - | ||
13 | - | ||
14 | - <title>SVOM French GFT Control Center</title> | ||
15 | - | ||
16 | - <!-- Bootstrap core CSS --> | ||
17 | - <link href={% static "bootstrap/css/bootstrap.css" %} rel="stylesheet"> | ||
18 | - | ||
19 | - <link href={% static "bootstrap/css/sb-admin.css" %} rel="stylesheet"> | ||
20 | - <link rel="stylesheet" href={% static "bootstrap/font-awesome/css/font-awesome.min.css" %}> | ||
21 | - | ||
22 | - <!-- Page Specific CSS --> | ||
23 | - <link rel="stylesheet" href="http://cdn.oesmith.co.uk/morris-0.4.3.min.css"> | ||
24 | - | ||
25 | - <!-- JsTree --> | ||
26 | - <link rel="stylesheet" href={% static "bootstrap/dist/themes/default/style.min.css" %} /> | ||
27 | - | ||
28 | - {% block head %} | ||
29 | - | ||
30 | - {% endblock %} | ||
31 | - | ||
32 | -</head> | ||
33 | - | ||
34 | -<body> | ||
35 | - | ||
36 | -<div id="wrapper"> | ||
37 | - | ||
38 | - <!-- Sidebar --> | ||
39 | - <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> | ||
40 | - <!-- Brand and toggle get grouped for better mobile display --> | ||
41 | - <div class="navbar-header"> | ||
42 | - <a class="navbar-brand" href="">SVOM French GFT Control Center</a> | ||
43 | - </div> | ||
44 | - | ||
45 | - | ||
46 | - <!-- Collect the nav links, forms, and other content for toggling --> | ||
47 | - <div class="collapse navbar-collapse navbar-ex1-collapse"> | ||
48 | - | ||
49 | - <ul class="nav navbar-nav side-nav"> | ||
50 | - <li><a href="{% url "current_schedule" %}">Schedule</a></li> | ||
51 | - <li><a href="{% url "system" %}">System</a></li> | ||
52 | - <li><a href="{% url "alerts_list" %}">Alerts</a></li> | ||
53 | - <li><a href="{% url "requests_list" %}">Routines</a></li> | ||
54 | - <li><a href="{% url "weather" %}">Weather</a></li> | ||
55 | - <li><a href="{% url "site" %}">Site</a></li> | ||
56 | - <li><a href="{% url "devices" %}">Devices</a></li> | ||
57 | - <li><a href="{% url "users" %}">Users</a></li> | ||
58 | - </ul> | ||
59 | - | ||
60 | - <ul class="nav navbar-nav navbar-right navbar-user"> | ||
61 | - | ||
62 | - <li class="dropdown alerts-dropdown"> | ||
63 | - <a href="{% url "profile" %}"><i class="fa fa-user"></i> {{ user.first_name }} <b class="caret"></b></a> | ||
64 | - </li> | ||
65 | - <li class="dropdown user-dropdown"> | ||
66 | - <a href="{% url "user_logout" %}"><i class="fa fa-power-off"></i> Log Out</a> | ||
67 | - </li> | ||
68 | - </ul> | ||
69 | - | ||
70 | - </div><!-- /.navbar-collapse --> | ||
71 | - | ||
72 | - | ||
73 | - </nav> | ||
74 | - | ||
75 | - <div id="page-wrapper"> | ||
76 | - | ||
77 | - | ||
78 | - <div class="row"> | ||
79 | - <center><h2>{% block title %} {% endblock %}</h2></center> | ||
80 | - </div> | ||
81 | - | ||
82 | - <center> | ||
83 | - <div class="row"> | ||
84 | - {% if error %} | ||
85 | - <div class="alert alert-dismissable alert-danger"> | ||
86 | - {% endif %} | ||
87 | - {% if success %} | ||
88 | - <div class="alert alert-dismissable alert-success"> | ||
89 | - {% endif %} | ||
90 | - {{ message|safe }} | ||
91 | - </div> | ||
92 | - </center> | ||
93 | - {% block content %} | ||
94 | - | ||
95 | - | ||
96 | - {% endblock %} | ||
97 | - | ||
98 | - | ||
99 | - </div><!-- /#page-wrapper --> | ||
100 | - | ||
101 | - </div><!-- /#wrapper --> | ||
102 | - | ||
103 | - | ||
104 | - | ||
105 | - <!-- Bootstrap core JavaScript | ||
106 | - ================================================== --> | ||
107 | - <!-- Placed at the end of the document so the pages load faster --> | ||
108 | - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | ||
109 | - | ||
110 | - <script src={% static "bootstrap/js/bootstrap.min.js" %}></script> | ||
111 | - | ||
112 | - <!-- JavaScript --> | ||
113 | -{# <script src={% static "bootstrap/js/jquery-1.10.2.js" %}></script>#} | ||
114 | -{# <script src={% static "bootstrap/js/bootstrap.js" %}></script>#} | ||
115 | - <script src={% static "bootstrap/js/jquery.formset.js" %}></script> | ||
116 | - | ||
117 | - <!-- Page Specific Plugins --> | ||
118 | - <script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script> | ||
119 | - <script src="http://cdn.oesmith.co.uk/morris-0.4.3.min.js"></script> | ||
120 | - <script src={% static "bootstrap/js/morris/chart-data-morris.js" %}></script> | ||
121 | - <script src={% static "bootstrap/js/tablesorter/jquery.tablesorter.js" %}></script> | ||
122 | - <script src={% static "bootstrap/js/tablesorter/tables.js" %}></script> | ||
123 | - | ||
124 | -</body> | ||
125 | -</html> | ||
126 | \ No newline at end of file | 0 | \ No newline at end of file |
src/alert_manager/tests.py
@@ -57,51 +57,51 @@ class TestStrategyChange(TestCase): | @@ -57,51 +57,51 @@ class TestStrategyChange(TestCase): | ||
57 | new_alert = Alert.objects.exclude(id=self.alert.id)[0] | 57 | new_alert = Alert.objects.exclude(id=self.alert.id)[0] |
58 | self.assertEqual(new_alert.strategyobs.id, self.strat2.id, "The new alert should have the 'strat2' strategy") | 58 | self.assertEqual(new_alert.strategyobs.id, self.strat2.id, "The new alert should have the 'strat2' strategy") |
59 | 59 | ||
60 | - | ||
61 | -# class AlertListenerTestsCelery(TestCase): | ||
62 | -# ''' | ||
63 | -# IMPORTANT : As soon as you do a DB request in a test, the test DB will no longer be synchronized with the DB used by celery | ||
64 | -# I have no idea why (Paul), but any call to the DB must be done in setup or after all celery actions are finished | ||
65 | -# ''' | ||
66 | -# | ||
67 | -# def test_alert_reception(self): | ||
68 | -# ''' | ||
69 | -# Must be launched with scripts/celery_test.sh | ||
70 | -# Copy a VOEvent file in the events_received directory to start the workflow | ||
71 | -# Tests if the alert and children are well created | ||
72 | -# ''' | ||
73 | -# | ||
74 | -# | ||
75 | -# if os.path.isfile(TEST_FILE_PATH): | ||
76 | -# os.remove(TEST_FILE_PATH) | ||
77 | -# print("================== DELETE FILE ==================") | ||
78 | -# time.sleep(3) | ||
79 | -# | ||
80 | -# print("================== COPY FILE ==================") | ||
81 | -# shutil.copyfile(os.path.join(VOEVENTS_TO_SEND_PATH, TEST_FILE), | ||
82 | -# TEST_FILE_PATH) | ||
83 | -# time.sleep(4) | ||
84 | -# | ||
85 | -# self.assertEqual(Alert.objects.count(), 1) | ||
86 | -# alert = Alert.objects.all()[0] | ||
87 | -# self.assertEqual(alert.author, "ivo://nasa.gsfc.tan/gcn") | ||
88 | -# self.assertEqual(alert.burst_ra, 74.7412) | ||
89 | -# self.assertEqual(alert.burst_dec, 25.3137) | ||
90 | -# self.assertEqual(alert.trig_id, 532871) | ||
91 | -# self.assertEqual(alert.editor, "61") | ||
92 | -# self.assertEqual(alert.pkt_ser_num, 1) | ||
93 | -# | ||
94 | -# self.assertEqual(Request.objects.count(), 1) | ||
95 | -# self.assertEqual(Sequence.objects.count(), 2) | ||
96 | -# self.assertEqual(Album.objects.count(), 3) | ||
97 | -# self.assertEqual(Plan.objects.count(), 6) | ||
98 | -# | ||
99 | -# | ||
100 | -# | ||
101 | -# def test_basic(self): | ||
102 | -# ''' | ||
103 | -# Used to test scripts/celery_test.sh | ||
104 | -# Only work if the initial_fixture is on the celery test DB (an only it) | ||
105 | -# ''' | ||
106 | -# Country.objects.create(name="TEEEEST") | ||
107 | -# self.assertEqual(Country.objects.count(), 2, "should be 2 countries") | 60 | +# OBSOLETE |
61 | +class AlertListenerTestsCelery(TestCase): | ||
62 | + ''' | ||
63 | + IMPORTANT : As soon as you do a DB request in a test, the test DB will no longer be synchronized with the DB used by celery | ||
64 | + I have no idea why (Paul), but any call to the DB must be done in setup or after all celery actions are finished | ||
65 | + ''' | ||
66 | + | ||
67 | + def test_alert_reception(self): | ||
68 | + ''' | ||
69 | + Must be launched with scripts/celery_test.sh | ||
70 | + Copy a VOEvent file in the events_received directory to start the workflow | ||
71 | + Tests if the alert and children are well created | ||
72 | + ''' | ||
73 | + | ||
74 | + | ||
75 | + if os.path.isfile(TEST_FILE_PATH): | ||
76 | + os.remove(TEST_FILE_PATH) | ||
77 | + print("================== DELETE FILE ==================") | ||
78 | + time.sleep(3) | ||
79 | + | ||
80 | + print("================== COPY FILE ==================") | ||
81 | + shutil.copyfile(os.path.join(VOEVENTS_TO_SEND_PATH, TEST_FILE), | ||
82 | + TEST_FILE_PATH) | ||
83 | + time.sleep(4) | ||
84 | + | ||
85 | + self.assertEqual(Alert.objects.count(), 1) | ||
86 | + alert = Alert.objects.all()[0] | ||
87 | + self.assertEqual(alert.author, "ivo://nasa.gsfc.tan/gcn") | ||
88 | + self.assertEqual(alert.burst_ra, 74.7412) | ||
89 | + self.assertEqual(alert.burst_dec, 25.3137) | ||
90 | + self.assertEqual(alert.trig_id, 532871) | ||
91 | + self.assertEqual(alert.editor, "61") | ||
92 | + self.assertEqual(alert.pkt_ser_num, 1) | ||
93 | + | ||
94 | + self.assertEqual(Request.objects.count(), 1) | ||
95 | + self.assertEqual(Sequence.objects.count(), 2) | ||
96 | + self.assertEqual(Album.objects.count(), 3) | ||
97 | + self.assertEqual(Plan.objects.count(), 6) | ||
98 | + | ||
99 | + | ||
100 | + | ||
101 | + def test_basic(self): | ||
102 | + ''' | ||
103 | + Used to test scripts/celery_test.sh | ||
104 | + Only work if the initial_fixture is on the celery test DB (an only it) | ||
105 | + ''' | ||
106 | + Country.objects.create(name="TEEEEST") | ||
107 | + self.assertEqual(Country.objects.count(), 2, "should be 2 countries") |
No preview for this file type