2.4 Source Code
You can have all your files in a
/sourcefolder or have onePython, MATLAB, C++,etc. file.
In the case where the source code is in one file, it makes less sense to put the file in a /source directory. However, when the source code is spread across multiple files and directories, using a /source directory will make life easier and more organized.
Example. Composite Strength Module
Let’s take a look at the structure of the Composite Strength module. In this example, we only have one Python file that contains all of our source code, predict_strength.py.
TwoPhasePrediction/
├── Dockerfile
├── PythonScriptWrapper
├── PythonScriptWrapper.py
├── TwoPhasePrediction.xml
├── predict_strength.py # <----- Source file
├── public
│ ├── help.html
│ ├── marat_workflow.png
│ ├── thumbnail.png
│ ├── webapp.css
│ └── webapp.js
├── runtime-module.cfg
└── setup.py