TODO

Version 58 (Jeremy Barneron, 09/30/2016 11:34 am) → Version 59/113 (Jeremy Barneron, 09/30/2016 03:38 pm)

h1. TODO

List of tasks by application, and general tasks (organization, tools, ...)

*ATTENTION, IL FAUT EFFACER LES ITEMS DE CETTE TODOLIST AU FUR ET A MESURE QU'ILS SONT MIS DANS LES DEMANDES REDMINE*

{{>toc}}

---

h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}General tasks (notes Etienne Pallier)%

* -Observation_manager/Tasks : créer une classe mère héritant de Task, dont les classes filles (plan_vis et plan_ir) vont hériter-

* -Architecture projet (organisation dossiers):-

* -src/ : laisser seulement les applications, et mettre tous les autres dossiers (fixtures/, images/, ...) dans un dossier MISC/)-

* RUN :

* -S'assurer que tous les prérequis sont présents et démarrés avant de lancer Pyros (sinon, générer un message d'erreur expliquant le problème):-

* -RabbitMQ-
* -Mysql (sauf si on a choisi sqlite)-

* TESTS (intégration continue):

* -Même remarque que pour le "RUN" ci-dessous concernant le check des prérequis-
* -Inclure "trial comet" dans les tests pour s'assurer que Comet est bien installé (+ "rm -r _trial_temp/" ensuite pour faire le ménage après le test)-
* -Mettre en place une exécution systématique des tests à chaque commit (unitaires + fonctionnels)-
-(pour faire plus simple, on peut imaginer que le serveur de test linux fasse un "git pull" toutes les 30mn, puis une exécution des tests, et l'envoi d'un email en cas de problème)-

* Installation script:

* -Si l'environnement virtuel existe déjà, demander s'il doit être recréé (par défaut "Non")-
* -(NEW) Renommer le script install_requirements.sh en install.sh-
* -(NEW) Faciliter l'installation du logiciel complet avec CONDA, qui gère toutes les dépendances du logiciel, même les dépendances non Python (mysql, rabbitmq, ...), et c'est du multi-plateforme : (cf -https://jakevdp.github.io/blog/2016/08/25/conda-myths-and-misconceptions)-

* Pyros :

* -Doit pouvoir être démarré indifféremment AVANT (par défaut) les devices, ou APRES (actuellement, le AVANT est TODO)-
* -De manière générale, doit être le plus possible "tolérant aux pannes"-
* -Doit être le plus générique et donc paramétrable possible-

* Django :

* -Upgrade to Django 1.10-
* -Remplacer le serveur web de "dev" (manage runserver, sur port 8000) par un vrai serveur web pour la "prod" (Apache pour les fichiers statiques sur port 80 + serveur d'application Python pour le code Python, par exemple gunicorn)-
-(cf https://projects.irap.omp.eu/projects/pyros/wiki/Project_Development#Serveur-Web)-

* -Comet installation : Include in the install_requirements.sh script (by using stable official version for Python 3 (when available) on Linux (and Mac) and Windows 10-

* -git : Create a "dev" branch (do not write anymore on the "master" branch)-

* Simulators :

* on doit se rendre compte qu'ils sont "vivants" (ils seront progressivement remplacés par les vrais devices, mais resteront toujours utilisables à leur place)

* Le Monitoring doit les interroger régulièrement sur leur statut (check_status, DONE)
* Il doit stocker les statuts dans la BD (TODO)
* Ces statuts doivent être affichés au fur et à mesure sur la page web du "device" correspondant (Devices, Site, Weather) (TODO)

* quels sont les devices bloquants et non bloquants ?

* Bloquants: si indisponibles (en panne ou pas démarrés), Pyros met en pause le sous-système d'observation
Seules 3 fonctions restent toujours actives: alertes, monitoring, et serveur web (pour les routines et la surveillance)

* Telescope
* Camera VIS (???)
* PLC (weather + observation conditions + site)

* Non bloquants: si indisponibles (en panne ou pas démarrés), Pyros se contente d'en prendre note, et continue son fonctionnement normal tout en restant dans l'attente de leur redémarrage pour les réintégrer

* Camera VIS (???)
* Camera NIR

* -Users: gérer les 3 profils (admin, expert, user)-

* Scheduler :

* -Eviter que la vue du Scheduler s'affiche avec une erreur (IndexError) quand il n'y a aucun schedule dans la BD (http://127.0.0.1:8000/scheduler/) => idem pour toutes les autres vues de tous les modules-
* -Affichage d'un schedule : pour chaque ligne (séquence), ajouter une colonne à gauche qui donne le nom (short name) de la Request dont la séquence fait partie (quand on clique sur ce nom, on va vers une vue de la Request qui sera- -soit une AlertRequest soit une RoutineRequest)-
* -(non prioritaire, c'est juste un souhait) le rendre complètement autonome, indépendant du projet, afin qu'on puisse facilement le sortir du projet, et le proposer comme un composant générique utilisable dans n'importe quel autre- -logiciel ; il devra donc gérer ces communications avec les autres modules via des interfaces-

* Doc :

* TEST:

* -Unit tests : test of each module-
* -Functional tests (with Celery and simulators): complete workflow-

* LAUNCH:

* -Start simulators-
* -Start Celery-
* -Start pyros-

* USE:

* -Administration of the database: http://localhost:8000/admin-
* -Interacting with Pyros: http://localhost:8000-

* -Watch the environment: Devices, Site, Weather-
* -Watch the schedule: Schedule-
* -Watch the data processing (workflow): System (Dashboard)-
* -Submit a Routine Request (and get results): Routines-
* -Watch alerts: Alerts-
* -Simulate an Alert: Alerts (TODO: Un user "admin" doit pouvoir déclencher une alerte type depuis la page web Alerts)-
* -Manual operations on the Telescope : Devices/Telescope (TODO)-
* -Manage users : Users-

---

h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}Applications tasks (notes Paul Carensac)%

h3. Dashboard

* -Create Create the backoffice views as the modules are integrated in pyros- pyros
* -Think Think about a system of permissions- permissions

h3. Scheduler

* views

* -Link Link the main page to the current schedule instead of the simulation page- page
* -Show Show user sequences in the schedules (with links)- links)
* -Give Give accces to old schedules (day / days before / all end-night plannings / all plannings)- plannings)
* -Give Give access to the refused sequences of a schedule, and the reasons of rejects- rejects

* scheduler

* -Verification Verification when there are not fields in the scheduler tables (index out of range)- range)
* -Change Change the system to determine night start/end (they must be given in parameter, only if first_schedule is True)- True)
* -Store Store the reasons of rejects (create a new attribute, in shs ?)- ?)
* -What What is the 'flag' attribute ? (@AK)- (@AK)
* -Do Do not create the execute_sequence tasks if it's not the night (- 120 seconds)- seconds)
* -Priority Priority and quota computing- computing
* -Quotas evolution- Quotas evolution
* -Blank Blank space filling- filling
* -At At the end of a scheduling send, it to the IC ?- ?

h3. Alert Manager

* Web :

* -Print Print if there is an alert in progress in the main page- page
* -Link Link the alerts to their status and results- results

* -Connect Connect to a real VOEvent broker- broker

* -Determine Determine the communication with FSC for strategy change- change

* VOEvents :

* -Extract Extract the good fields (see AK Q&A 07/01/2016)- 07/01/2016)
* -Fill Fill the request & alerts objects- objects
* -Use Use strategies to build a request- request
* -Possibility Possibility to change the default strategy- strategy
* -Handle Handle VOEvent updates- updates
* -Be Be careful to not create 2 alerts for a same GRB, seen by 2 different satellites-

satellites

h3. Analyzer

* -Apply Apply the calibrations in the right function- function
* -Apply Apply the analyses only if it's a GRB- GRB
* -Implement Implement the analyses- analyses
* -Send Send analyses to FSC- FSC

h3. Majordome

* TaskManager

* -When When a sequence is cancelled, give back the quota to the user- user
* -In In case of alert, do not stop the ongoing plan, and make the instruments abort- abort

* execute_sequence

* -Add Add the PLC checks at start (to see if we do the slew)- slew)
* -Use Use the global telescope (instead of creating one here)- here)
* -Give Give first_schedule as false when a scheduling is launched- launched
* -Remove Remove the default countdown (1, for tests)- tests)

* system_pause

* -Abort Abort the instruments- isntruments
* -Stop Stop the execution tasks- tasks

* system_restart

* -Start Start a scheduling- scheduling

* change_obs_conditions

* -Change Change sequences status (if needed)- needed)
* -If If some status changed, re-launch a scheduling- scheduling

h3. Monitoring

* views

* -Move Move the dashboard here- here
* -Print Print the instrument status- status
* -Print Print PLC informations (with the evolution)- evolution)
* -In In the dashboard screens, put scroll on each screen to see the old logs- logs

* Monitoring task

* -Uncomment Uncomment the scheduling at the beginning- beginning
* -Implement Implement night start/end computation- computation
* -Initialize Initialize communication with the instruments- instruments
* -Configure Configure intruments at start- start
* -Send Send software versions to the IC- IC
* -Initialize Initialize connection with PLC- PLC
* -After After the starting actions, loop to wait for the instruments configuration to be finished- finished
* -Ask Ask PLC for status- status
* -Ask Ask filter wheel for status- status
* -Store Store the instruments & PLC status- status
* -Send Send all status to IC- IC
* -Analyse Analyse PLC status (obs conditions, ...)- ...)
* -Create Create tasks of obs condition changes- changes
* -At At the beginning of the loop, ping the DISABLED devices. If they answer, change their status (TBD), and do their initialization (ex: If it's a camera, set its temperature to -150°)- -150°)

h3. Observation Manager

* execute_plan :

* -Uncomment Uncomment the instruments_ready waiting function- function
* -Uncomment Uncomment the observation_ending waiting function- function
* -Try Try to remove code duplication (plan_execution_vis & plan_execution_nir)- plan_execution_nir)
* -Determine Determine what needs to be done at the end of an observation- observation

* create_calibrations :

* -Make Make the calibration images- images
* -Generate Generate super images- images
* -Send Send them to the IC- IC

h3. Routine Manager

* Web

* -Put Put the goods fields (for coordinates etc)- etc)
* -Only Only propose the objects that matches the conditions (ex: scientific programs of the user only)- only)
* -Do Do all the needed checks- checks
* -Add Add automatic computation of JD1/JD2- JD1/JD2
* -Add Add checkbox for JD / GD- GD
* -Add Add options : copy my sequence on x days, and authorise report- report
* -Add Add ETC-IS simulation- simulation
* -Add Add help for new users (and for it the first time an account come on the page)- page)

* Do more checks at unserialization

* views

* -When When saving, do more checks on coordinates, jd1/2 etc- etc
* -Uncomment Uncomment filter for alerts removing- removing
* -When When submitting, use the monitoring to determine sequences status- status
* -When When submitting, modify the first_schedule to False, when scheduling- scheduling
* -When When unsubmitting, uncomment the check for EXED and EXING removing- removing
* -When When unsubmitting, uncomment the scheduling and change the first_schedule to False- False

h3. User Manager

* -Password recovery- Password recovery
* -Profile page- Profile page
* -User User validation by administrator / commission- commission
* -Handle Handle permissions and access- access

h3. Common

* -Change Change the 'first_schedule' to False at the end of RequestBuilder.validate()- RequestBuilder.validate()

h3. Devices

* -When When a socket connection fails (exception thrown), set the device to DISABLED (or that kind of status) in the DB, and create a system_pause task (majordome)- (majordome)