Draft: [Feat] Add symlinks copies for export
Context
It is sometimes tedious to debug on exports as it requires to go through all these steps :
- Generate a standalone export;
- Compile and run the code;
- Finding then solving the bug (testing to verify it has been solved);
- Then copy the files changes into the export module (often forgetting half of them in the process).
This last step is the one we seek to automate with this MR, as now, the copy_files() and the new copy_folder() function can generate symbolic links instead of actually copying the files.
The ExportNode class now holds a static_folders variable acting as the existing static_files variable but for whole folders.
This MR also adds a function to convert numpy types into c types.
Modified files 🗄️ 🐙
- export_utils/init.py : Add the
copy_folder()function access and the data conversion functions; - code_generation.py : Add the
copy_folder()function implementation and the symlink argument; - export_registry.py : Add the
static_foldervariable in theExportNodeclass; - scheduler_export.py : Now export static files and folders and generate symlinks according to the
test_modeargument. Iftest_modeis set toTrue, symbolic links will be generated to ease the debug process. - data_conversion.py : Add the numpy2c converter.
Edited by Axel Farrugia