Skip to content

Commit 7ceaccb

Browse files
committed
Update README.md - create Continuous integration section with Nabla Python Framework light description (just a piece of information, this README section will be extended over time)
1 parent b167f1f commit 7ceaccb

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,41 @@ If you want to use git (without a submodule) then you can use `ExternalProject_A
344344

345345
I recommend you use `ExternalProject_Add` instead of `add_subdirectory` for **Nabla** as we haven't tested its use by *3rdparty* applications that use *CMake* to build themselves yet.
346346

347+
# Continuous integration
348+
349+
## Nabla Python Framework
350+
351+
### CPU & GPU local tests shipped with the repository
352+
353+
#### Description
354+
355+
***Nabla*** aims to implement full CPU & GPU tests used by our CI in-house infrastructure groovy pipelines in relocatable way allowing users to execute and debug the tests locally on their own devices as well. Each test is a Python module which part of it gets created with the CMake build system configuration. A test is defined and created as a module by
356+
357+
- top json configuration file
358+
- interface Python script
359+
360+
Top json configuration file contains run & build info, array of profiles and json inputs for a Python testing module. The file is processed and validated by CMake to create output profiles bound to the Python module. Single profile contains data used by the module to execute tests with and the implementation of the test is located in interface Python script - the script overrides common abstract interface defined as a integral part of Nabla Python framework module. The description is abstract and doesn't contain specific details, join our discord if you have any questions!
361+
362+
#### Development & Debug
363+
364+
Each valid Python module contains autogenerated .vscode's *launch.json* and *settings.json* to make development easy. You just need to `Open with Code`in the module's directory. Make sure to install [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) there to enable IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), code formatting, refactoring, unit tests, and more.
365+
366+
A target for which Python module is available for testing lists a special Python Framework section located in its solution's project file structure (**Visual Studio only!**) containing Nabla Python Framework sources, target's interface Python script, autogenerated json profiles and autogenerated` __main__.py` module script. Unfortunately pure Visual Studio works so-so with Python (issues with search module paths defined as `searchPath` .pyproj's property, issues with IntelliSense and Debugging) - we encourage to use Visual Studio Code if you need to Debug an interface or develop it.
367+
368+
#### Runtime
369+
370+
##### Command line
371+
372+
To run all tests bound to a module with a command line you just need to execute `python3 -m <module_reference>`. You can also specify special arguments to have more control over the test execution, for more details see [template module script](https://github.com/Devsh-Graphics-Programming/Nabla-Continous-Integration-Python-Framework/blob/4f7a67a3fa9bb418bcb07fa2f7a5853e55b853c4/scripts/__main__.py.cmake)
373+
374+
##### Visual Studio
375+
376+
You need to open a target's solution. To launch all tests bound to a module a module's `__main__.py` file located in Python Framework section must be selected and `Debug -> Execute File in Python interactive` executed.
377+
378+
**Visual Studio Code**
379+
380+
You need to open module's directory as workspace with `Open with Code `, select `Run and Debug` icon, select `__main__.py` file and run it.
381+
347382
# Caveats and Particular Behaviour
348383

349384
## Hardcoded Caps

0 commit comments

Comments
 (0)