« Previous - Version 16/21 (diff) - Next » - Current version
Paul Carensac, 08/09/2016 11:07 am


Project structure

Schemas and descriptions of the project's architecture.


Pyros Design

Error executing the thumbnail macro (Attachment pyros_design_en.png not found)

Each application is represented here, as well as the external agents.
We can see every interaction between the applications, with the main workflow in red.

All the applications are detailed here.


Folders architecture

Error executing the thumbnail macro (Attachment folders_architecture.png not found)

  • PYROS : Main folder of the project, root of the git repository
    • doc : Contains all the documentation
      • database : Contains the database files (schema, creation sql script)
      • uml : usecases and activities diagrams for the applications
      • diagrams : other useful diagrams
    • install : Everything needed at the installation
      • scripts & requirements : Files making the installation automatic
      • windows libs : Folder containing libraries copied from linux that cannot be found with the good version on windows
    • private : Folder not tracked by git
      • virtual environment : python version & libraries used by the project
      • Any unshared content : private is your own directory, you can add anything you want in it
    • simulators : Simulators for Devices & PLC
      • scripts : They start and stop the simulators
      • code : The python code for the simulators
      • configuration : A file describing the IP & Port for each simulator
    • src : Source folder containing most of the project's content (detailed below)
    • .gitignore, README, run script : A few additional useful files

Here are the details for the src folder :

  • src : Source folder containing most of the project's content
    • apps : Django applications folders (detailed in the next section)
    • fixtures : Contains the initial & test fixtures of the project (see Fixtures)
    • images : Contains the "images" files created by the simulators, and the analysis files (they are to be placed in a better folder)
    • pyros : Django configuration folder
    • saved_requests : Used to store the request files when a user want to export a request (we create the file here, then it can be downloaded)
    • scripts : Folder containing all the scripts for the project (see Scripts)
    • static : Contains all the static files, mostly (or entirely) for the web pages (CSS, JS, images, ...)
    • global templates : Templates that will be used in several application (only the base.html for the moment)
    • manage.py : Django python script to run the Django commands (startapp, makemigrations, migrate, runserver, ...)

Applications architecture

Error executing the thumbnail macro (Attachment applications_architecture.png not found)

Django applications are created with the command :

$ python manage.py startapp AppName

This commands automatically create some files and folders :

  • migrations : A folder containing the DB modifications files (only used in the pyrosapp application)
  • templates : A folder containing the Django HTML templates for this application
  • init.py & apps.py : App configuration files (not used)
  • models.py & admin.py : Files desribing database objects, and their representation in the admin interface (only used in pyrosapp)
  • views.py : File containing the code called for each web page

We added some other files to every application :

  • urls.py : File describing the routing from urls to views. Directly linked to (and called by) the "pyros" folder's urls.py.
  • tasks.py : File containing the Celery tasks for this application.

pyros_design_en.png (109 KB) Paul Carensac, 08/08/2016 04:12 pm

applications_architecture.png (17.7 KB) Paul Carensac, 08/08/2016 04:12 pm

folders_architecture.png (67.4 KB) Paul Carensac, 08/08/2016 05:42 pm