The 5 templates and 3 utilities
___What you need: Python 3.7 and PyCharm___
1. Your Python program (sample API code, OSS, or your original Python code)
2. Template 1: requirements.txt → define referenced resources
3. Template 2: at __init__.py → design your parameter input
4. Template 3: at __init__.py → design the main program body
5. Template 4: test_me.py → run unit test at the Python level
6. Template 5: setup.yaml → set attributes for search on STU
7. Utility 1: alabs.icon → design the plugin icon from any graphics
8. Utility 2: build.bat → prepare upload-able package (.whl)
9. Utility 3: Preconfigured Test Repository
13 useful rules to keep in mind
___to avoid errors that we see frequently___
Related to the Python package name
- Always start with “argoslabs” like argoslabs.anyname1.anyname2.
- Package name must have three levels like argoslabs.anyname1.anyname2.
- You can only use lowercase of a ~ z and underscore (_) for the package name.
- Package name must be unique (Don’t worry – there is a checking mechanism when packaging).
- Display name must be unique (Don’t worry – there is a checking mechanism when packaging).
Related to configuring setup.yaml file
- You must declare platforms like [‘windows’, ‘darwin’, ‘linux’].
- Set proper keywords.
- Set proper platform.
- Set version like 220.127.116.11 (Do not start the section with 0, i.e., 1.505.0935 is not allowed.
- Do not forget to enter the proper package name at package_data.
Related to plugin coding
- Design input and output to be user friendly.
- Print out to STDOUT with a good result. The Return Value can be used as String, CSV or File at STU.
- Design with good exception handling and Return Code. The Return Code can be handled at STU.