diff --git a/doc/uml/activities/scheduler/Scheduling.png b/doc/uml/activities/scheduler/Scheduling.png deleted file mode 100644 index b303646..0000000 Binary files a/doc/uml/activities/scheduler/Scheduling.png and /dev/null differ diff --git a/doc/uml/activities/scheduler/compute_schedule_act.png b/doc/uml/activities/scheduler/compute_schedule_act.png deleted file mode 100644 index 2c22648..0000000 Binary files a/doc/uml/activities/scheduler/compute_schedule_act.png and /dev/null differ diff --git a/doc/uml/activities/scheduler/copy_from_previous_schedule_act.png b/doc/uml/activities/scheduler/copy_from_previous_schedule_act.png deleted file mode 100644 index 20981fb..0000000 Binary files a/doc/uml/activities/scheduler/copy_from_previous_schedule_act.png and /dev/null differ diff --git a/doc/uml/activities/scheduler/make_schedule_act.png b/doc/uml/activities/scheduler/make_schedule_act.png deleted file mode 100644 index 27f0295..0000000 Binary files a/doc/uml/activities/scheduler/make_schedule_act.png and /dev/null differ diff --git a/doc/uml/activities/scheduler/see_schedules_act.png b/doc/uml/activities/scheduler/see_schedules_act.png deleted file mode 100644 index bb63d29..0000000 Binary files a/doc/uml/activities/scheduler/see_schedules_act.png and /dev/null differ diff --git a/install.json b/install.json deleted file mode 100644 index ac5ba71..0000000 --- a/install.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "Configuration": { - "env": "ttest_env", - "name": "default", - "path": "/home/portos/IRAP/pyros/", - "requirements": "REQUIREMENTS.txt" - }, - "install": { - "env_bin": [], - "env_pip": [], - "link": [ - "update" - ], - "normal": [], - "special": [ - "create" - ] - }, - "update": { - "env_bin": [], - "env_pip": [ - "install --upgrade pip", - "install --upgrade wheel", - "" - ], - "normal": [], - "special": [ - "requirements" - ] - } -} \ No newline at end of file diff --git a/logs/Readme.md b/logs/Readme.md new file mode 100644 index 0000000..2e530c6 --- /dev/null +++ b/logs/Readme.md @@ -0,0 +1,28 @@ +File Logs are organized by module + +every file is reseted at pyros launch except pyros.log +You must clean this directory before pushing. +You can use the pyrosrun.sh clear_logs command. + +For example, logs for the module MONITORING must be in the file : + +> monitoring.logs + +The logs are formated like this : + +> '%(filename)s : %(lineno)s -> %(message)s' +> "filename : line -> message". + +To use the logger you must import logger.config + +> import logger.config as l +> log = l.setupLogger("name", "file_name") + +Basic log : + +> log.info('Your message') + +if you want to log in the file pyros.log you must use logging + +> import logger.config as l +> l.logging.info('Your message') diff --git a/misc/templates/base.html b/misc/templates/base.html deleted file mode 100644 index f05eb77..0000000 --- a/misc/templates/base.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - {% load staticfiles %} - - - - - - - - - SVOM French GFT Control Center - - - - - - - - - - - - - - {% block head %} - - {% endblock %} - - - - - -
- - - - -
- - -
-

{% block title %} {% endblock %}

-
- -
-
- {% if error %} -
- {% endif %} - {% if success %} -
- {% endif %} - {{ message|safe }} -
-
- {% block content %} - - - {% endblock %} - - -
- -
- - - - - - - - - - -{# #} -{# #} - - - - - - - - - - - \ No newline at end of file diff --git a/src/alert_manager/tests.py b/src/alert_manager/tests.py index 497ddbd..8491ad6 100644 --- a/src/alert_manager/tests.py +++ b/src/alert_manager/tests.py @@ -57,51 +57,51 @@ class TestStrategyChange(TestCase): new_alert = Alert.objects.exclude(id=self.alert.id)[0] self.assertEqual(new_alert.strategyobs.id, self.strat2.id, "The new alert should have the 'strat2' strategy") - -# class AlertListenerTestsCelery(TestCase): -# ''' -# 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 -# I have no idea why (Paul), but any call to the DB must be done in setup or after all celery actions are finished -# ''' -# -# def test_alert_reception(self): -# ''' -# Must be launched with scripts/celery_test.sh -# Copy a VOEvent file in the events_received directory to start the workflow -# Tests if the alert and children are well created -# ''' -# -# -# if os.path.isfile(TEST_FILE_PATH): -# os.remove(TEST_FILE_PATH) -# print("================== DELETE FILE ==================") -# time.sleep(3) -# -# print("================== COPY FILE ==================") -# shutil.copyfile(os.path.join(VOEVENTS_TO_SEND_PATH, TEST_FILE), -# TEST_FILE_PATH) -# time.sleep(4) -# -# self.assertEqual(Alert.objects.count(), 1) -# alert = Alert.objects.all()[0] -# self.assertEqual(alert.author, "ivo://nasa.gsfc.tan/gcn") -# self.assertEqual(alert.burst_ra, 74.7412) -# self.assertEqual(alert.burst_dec, 25.3137) -# self.assertEqual(alert.trig_id, 532871) -# self.assertEqual(alert.editor, "61") -# self.assertEqual(alert.pkt_ser_num, 1) -# -# self.assertEqual(Request.objects.count(), 1) -# self.assertEqual(Sequence.objects.count(), 2) -# self.assertEqual(Album.objects.count(), 3) -# self.assertEqual(Plan.objects.count(), 6) -# -# -# -# def test_basic(self): -# ''' -# Used to test scripts/celery_test.sh -# Only work if the initial_fixture is on the celery test DB (an only it) -# ''' -# Country.objects.create(name="TEEEEST") -# self.assertEqual(Country.objects.count(), 2, "should be 2 countries") +# OBSOLETE +class AlertListenerTestsCelery(TestCase): + ''' + 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 + I have no idea why (Paul), but any call to the DB must be done in setup or after all celery actions are finished + ''' + + def test_alert_reception(self): + ''' + Must be launched with scripts/celery_test.sh + Copy a VOEvent file in the events_received directory to start the workflow + Tests if the alert and children are well created + ''' + + + if os.path.isfile(TEST_FILE_PATH): + os.remove(TEST_FILE_PATH) + print("================== DELETE FILE ==================") + time.sleep(3) + + print("================== COPY FILE ==================") + shutil.copyfile(os.path.join(VOEVENTS_TO_SEND_PATH, TEST_FILE), + TEST_FILE_PATH) + time.sleep(4) + + self.assertEqual(Alert.objects.count(), 1) + alert = Alert.objects.all()[0] + self.assertEqual(alert.author, "ivo://nasa.gsfc.tan/gcn") + self.assertEqual(alert.burst_ra, 74.7412) + self.assertEqual(alert.burst_dec, 25.3137) + self.assertEqual(alert.trig_id, 532871) + self.assertEqual(alert.editor, "61") + self.assertEqual(alert.pkt_ser_num, 1) + + self.assertEqual(Request.objects.count(), 1) + self.assertEqual(Sequence.objects.count(), 2) + self.assertEqual(Album.objects.count(), 3) + self.assertEqual(Plan.objects.count(), 6) + + + + def test_basic(self): + ''' + Used to test scripts/celery_test.sh + Only work if the initial_fixture is on the celery test DB (an only it) + ''' + Country.objects.create(name="TEEEEST") + self.assertEqual(Country.objects.count(), 2, "should be 2 countries") diff --git a/src/pyros/__init__.pyc b/src/pyros/__init__.pyc new file mode 100644 index 0000000..290dee9 Binary files /dev/null and b/src/pyros/__init__.pyc differ -- libgit2 0.21.2