Python Library ComponentΒΆ
Repository Folder Structure for Python library Components
Folder |
File |
Description |
Developer Tips |
/ |
CHANGELOG.md |
Stores a log of changes to the component |
Document changes to the component in this file |
/ |
Makefile |
Makes the solution (see above for details) |
Changes will usually not be required to this file. However, it is a good idea to review the actions being performed on various make rules, especially clobber, prepare, build and dockerpush |
/ |
README.md |
Describes the component |
Write a brief description of the component and the source files required by it in this file |
/ |
VERSION |
Stores the component version number |
Write the component version number here |
/app |
__init__.py |
Dummy source code |
Store all source code for the component in this folder in this folder (with sub-folders as required) |
/app |
app.py |
Dummy source code |
app.py is the default entry point for the component |
/config |
dev.json |
Dummy configuration file (dev environment) |
Store configuration files in this folder. Best practice to have separate configuration files for different environments |
/config |
prod.json |
Dummy configuration file (prod environment) |
Store configuration files in this folder. Best practice to have separate configuration files for different environments |
/config |
stage.json |
Dummy configuration file (stage environment) |
Store configuration files in this folder. Best practice to have separate configuration files for different environments |
/data |
sample_empty_data.txt |
Dummy data file |
Store all the data files required for the component in the /data folder (with sub-folders as required) |
/requirements |
requirements.txt |
Contains list of libraries required to be installed for proper functioning of the component |
Libraries will be installed as part of the build stage of the Jenkins pipeline (see above) |
/scripts |
sample.sh |
Dummy script |
Store any scripts required by the component in this folder (with sub-folders as required) |
/tests |
__init__.py |
Dummy test file |
Store unit test code in this folder (and sub-folders as required). These will be run automatically using pytest as part of the unittest stage of the Jenkins pipeline (see above) |
/tests/app |
init.py |
Dummy test file |
|
/tests/app |
test_app.py |
Dummy test file |
|
/xprbuild |
Jenkinsfile |
Unused |
Library component is not built |
/xprbuild/docker |
Dockerfile |
Unused |
Library component is not built |
/xprbuild/docker |
build.sh |
Unused |
Library component is not built |
/xprbuild/docker |
pre-build.sh |
Unused |
|
/xprbuild/docker |
test.sh |
Unused |
|
/xprbuild/system |
Makefile |
Unused |
|
/xprbuild/system/linux |
build.sh |
Unused |
|
/xprbuild/system/linux |
post-build.sh |
Unused |
|
/xprbuild/system/linux |
pre-build.sh |
Installs any dependencies of the library |
User should implement this if they want to use it. Use make prepare to use it |
/xprbuild/system/linux |
run.sh |
Unused |
Not a runnable component |
/xprbuild/system/linux |
test.sh |
Runs test cases |
User should implement this to perform unit test cases |
/xprbuild/system/windows |
Makefile |
Unused |
May be required in future to support Windows deployment |
/xprbuild/system/windows |
build.bat |
Unused |
May be required in future to support Windows deployment |
/xprbuild/system/windows |
post-build.bat |
Unused |
May be required in future to support Windows deployment |
/xprbuild/system/windows |
pre-build.bat |
Unused |
May be required in future to support Windows deployment |
/xprbuild/system/windows |
run.bat |
Unused |
May be required in future to support Windows deployment |
/xprbuild/system/windows |
test.bat |
Unused |
May be required in future to support Windows deployment |