Render your package¶
Full example (expand for details)
Following is the complete package file for the running example, without any comments, in case you want to try it yourself as a sort of "hello world" example:
MyCustomPackage.pkl | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
Render through pkl
¶
Once your package is defined, you can then "render" it into the files Atlan needs using the pkl
CLI:
pkl eval MyCustomPackage.pkl -m .
This will generate multiple YAML files representing the package, in the folder structure required by Atlan, ready to be submitted in a PR.
Output produced¶
Rendering the package will create various files and subdirectories under the output directory you specify (the location you specify for -m
), depending on the implementationLanguage
you defined in your package:
├── requirements.txt # (1)
├── requirements-dev.txt # (2)
├── version.txt # (3)
├── Dockerfile # (4)
├── {{package_name}}/
│ ├── __init__.py # (5)
│ ├── logging.conf # (6)
│ ├── main.py.example # (7)
│ └── {{package_name}}_cfg.py # (8)
│
└── build/ # (9)
└── package/
└── {{package-name}}/
├── package.json # (10)
├── index.js # (11)
├── configmaps/
│ └── default.yaml # (12)
│
└── templates/
└── default.yaml # (13)
- Minimal dependencies for a Python-based package (you can of course extend this with other dependencies if your package requires them).
- Minimal dependencies for testing a Python-based package (you can of course extend this with other dependencies if your package requires them).
- Version of the Python package.
- Default container image file for a Python package.
- Empty init file for Python.
- Default logging configuration for Python to separate info and debug-level logging.
- Skeletal starting point for a main program using the runtime toolkit.
- A strongly-typed class capturing all the configuration details a user could provide, which we can use with the package's runtime toolkit.
- The
build
subdirectory will contain the artifacts needed by Argo to deploy your package. - The
package.json
contains descriptive metadata about your package, such as its name, description, icon, and documentation links. - The
index.js
is a placeholder file, which should be left as-is. - Your package's UI configuration is bundled into this
configmaps/default.yaml
file. - Your package's orchestration is bundled into this
templates/default.yaml
file.
├── src/
│ └── main/
│ └── kotlin/
│ └── {{PackageName}}Cfg.kt # (1)
│
└── build/ # (2)
└── package/
└── {{package-name}}/
├── package.json # (3)
├── index.js # (4)
├── configmaps/
│ └── default.yaml # (5)
│
└── templates/
└── default.yaml # (6)
- The
src
subdirectory will contain a generated Kotlin class for transferring the UI-based inputs to your code (if the you have configured your package'simplementationLanguage
asKotlin
). - The
build
subdirectory will contain the artifacts needed by Argo to deploy your package. - The
package.json
contains descriptive metadata about your package, such as its name, description, icon, and documentation links. - The
index.js
is a placeholder file, which should be left as-is. - Your package's UI configuration is bundled into this
configmaps/default.yaml
file. - Your package's orchestration is bundled into this
templates/default.yaml
file.
Output produced
For our running example (since the implementationLanguage
is Kotlin
), this would produce:
├── src/
│ └── main/
│ └── kotlin/
│ └── OpenAPISpecLoaderCfg.kt
│
└── build/
└── package/
└── csa-openapi-spec-loader/
├── package.json
├── index.js
├── configmaps/
│ └── default.yaml
│
└── templates/
└── default.yaml