Skip to main content

Package Configuration

Every UVM application requires a package.toml file that defines its namespace and version. This configuration is essential for proper app deployment and partition creation.

Package Structure

The package.toml file follows this basic structure:

[package]
id = "ai.asmc.{app_name}"
version = "1.0.0"

Object Type Path Construction

The package ID is used to construct the full object type path when creating partitions. The complete path is built from three components:

  1. Package ID (from package.toml)
  2. Python file name (without .py extension)
  3. Class name

For example, if you have:

  • Package ID: ai.asmc.hello
  • File name: hello.py
  • Class name: Hello

The full object type path would be: ai.asmc.hello.hello.Hello

This path is used when creating partitions via the API:

http POST 'http://localhost:22440/partitions' object_type=ai.asmc.hello.hello.Hello

Version Management

The version field in package.toml follows semantic versioning (MAJOR.MINOR.PATCH):

  • MAJOR: Breaking changes
  • MINOR: New features, backward compatible
  • PATCH: Bug fixes, backward compatible

Best Practices

  1. Keep package IDs consistent with your app's directory structure
  2. Use meaningful app names that reflect the application's purpose
  3. Follow semantic versioning for version numbers
  4. Ensure the package ID matches your app's namespace in the code

Example

Here's a complete example of a simple UVM app structure:

my_app/
├── package.toml
└── my_app.py

package.toml:

[package]
id = "ai.asmc.my_app"
version = "1.0.0"

my_app.py:

class MyApp(Node):
# Your app implementation
pass

The full object type path for this app would be: ai.asmc.my_app.my_app.MyApp