Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.7 KB

README.rst

File metadata and controls

53 lines (39 loc) · 1.7 KB

Testing

Unit tests provide an instant feedback on whether the individual components are working as expected. The unit tests can be run with the command "make unittests".

Integration tests provide a more in-depth testing but may require additional setup, especially data sources, and will take much more time. The integration tests can be run with the command "make test".

Python Dependencies

Python dependencies may be tricky to manage when it comes to delivering software. In all cases, the dependencies must be added to the file setup.py.

Dependencies Provided by RedHat/EPEL

The dependency must be added to the SPEC file, eg:

` Requires: curl `

Dependencies Provided by Debian

The Debian helper tools parse the source code to autodetect the dependencies that are already packaged. It uses an hardcoded list of import and packages that is maintained upstream. As a consequence, it should not be necessary to explicit the dependencies.

Dependencies Not Provided by the OS

This section applies to dependencies that are not packaged by RedHat/EPEL, Debian, or none of them.

To ship all those dependencies, the program uses a vendor system. Basically we use the Python module path sys.path to load modules from a custom directory. To do this, first the modules must be added to the package loudml-base (see directory base for details). Then, every program entry point must import the module that updates the import path.

` import loudml.vendor `

Because this instruction has an impact on how the modules are loaded, it should be one of the first modules that are imported.