Euclid software development notes
This page contains my personal notes on Euclid software development. I am putting concise summaries of the Wiki content and links to longer documents here, since the Euclid Redmine website is currently a bit of a rat’s nest.
Primary Links:
- Euclid Redmine (the Euclid collaboration web site)
- ESA’s COSMOS Portal (Official Documents)
- The Euclid Wiki
- Euclid’s SVN (legacy source code repository)
- Euclid’s GitLab (Git-based version control)
- Mission Database (MDB) viewer
Particularly useful links within Redmine:
- Euclid SGS Software Development Wiki
- Euclid Software Engineering Guide
- EDEN (the Euclid Development ENvironment) is the set of rules, standards, libraries, and tools used when developing software for Euclid (release notes).
- LODEEN (the LOcal DEvelopment ENvironment) is a virtual machine image containing the libraries and many of the tools specified in EDEN (tools that are not useful for local development are not included). It is a ready-to-use environment for Euclid software development.
- Elements (The Euclid build system)
- Elements Manual, manual2
- Additional Elements info
- CODEEN (the COmmon DEvelopment ENvironment) is a central Jenkins-based automation system, which enables continuous integration and continuous deployment of Euclid software.
- LODEEN + CODEEN + Elements tutorial (very useful!)
- Introduction to coding standards
- Coding standards common to Python and C++
- Python-specific coding standards
- C++-specific coding standards
- Standards and guidelines for writing tests
- Euclid Image API documentation
- Mission database and data model bindings
- About the mission database (MDB) reference1, reference2
- MDB viewer
- MDB Tools
- Euclid data model bindings
- Pipeline Runner (also look here)
- About the NIR pipeline
- Pipeline Interfaces
The EuclidRun Tool
The utility, EuclidRun
(equivalently, E-Run
and ERun
) sets up environment variables and then runs a specified command. The basic syntax is:
ERun [options] [name=value] ProjectName Version [command [arguments for command]]
For example, to set up the environment for EuclidImgUtils version 0.5, and then launch IPython:
ERun EuclidImgUtils 0.5 ipython
Assuming that EuclidImgUtils
, version 0.5 is installed, you can then import EuclidImageBinding
(the python bindings for EuclidImageUtils
). Note: running the following command enables autocompletion when the program is called as ERun
:
ERun_autocompletion.sh
so that ERun [TAB]
lists the available projects.
Creating and expanding a new project with Elements
Main reference. Assuming that we are using Elements 4.0, to create a new project named testproject with a version number of 0.1, we do this:
$ ERun Elements 4.0 CreateElementsProject testproject 0.1
To create a module, cd into a project directory and use the AddElementsModule
sub-command / helper script, like this:
$ cd /home/user/Work/Projects/testmodule/0.1
$ ERun Elements 4.0 AddElementsModule Module_Name
To create a C++ class, cd into a module and then use the AddCppClass
sub-command / helper script:
$ cd Module_Name
$ ERun Elements 4.0 AddCppClass TestClass
This will create several template files in the src/
, test/
, and Module_Name/
subdirectories of the main module directory. To create a C++ program, make sure that you are in the desired module directory and then use the AddCppProgram sub-command:
$ pwd
# output should be: /home/user/Work/Projects/tstproject/0.1/Module_Name
$ ERun Elements 4.0 AddCppProgram Program_Name
This creates a template of the program’s main function in the src/program/
subdirectory. To create a Python module, use the AddPythonModule sub-command:
$ ERun Elements 4.0 AddPythonModule Python_Module_Name
This creates a new python/ subdirectory, a tests/python/
directory, and template files. To create a Python program, use the AddPythonProgram
sub-command:
$ ERun Elements 4.0 AddPythonProgram Python_Program_Name
This creates a template file in python/Module_Name/
. For more information about the required command line parameters for Python programs: go here. To build and install your project:
$ cd /home/user/Work/Projects/tstproject/0.1/
$ make all
$ make install
Then you can run the Python program like this:
$ ERun Module_Name 0.1 Python_Program_Name
The default parameters will already be filled in, using the contents of the corresponding .conf file at /home/user/Work/Projects/tstproject/0.1/Module_Name/conf/ To run quality check on the code: Navigate into the project’s directory (/home/user/Work/Projects/testmodule/0.1/
) and run checkQuality -e
to make sure that the environment is set up right, then do checkQuality -L c++
or checkQuality -L python
:
$ cd /home/user/Work/Projects/tstproject/0.1/
$ checkQuality -e
$ checkQuality -L c++ # check C++ quality
$ checkQuality -L python #check Python quality
$ checkQuality # check quality of all code
Once the code anlysis is complete, a summary is printed and a hyperlink to the SonarQube output is provided.
Git
- Atlassian’s (very nice) Git tutorial:
- Interactive Web Tutorial: Learn Git Branching
- Euclid Redmine pages regarding Git