Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use edgee-component toml to build #3

Merged
merged 4 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 23 additions & 24 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
name: Check
on:
push:
branches:
- main
pull_request:
push:
branches:
- main
pull_request:

jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"

- name: Build component
run: |
make setup
make build

- name: Test component
run: |
make test
- name: Build component
run: |
make setup
make build-no-edgee

- name: Test component
run: |
make test
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ edgee_world:

setup: edgee_world ## setup development environment

build: setup ## build component
uv run componentize-py --wit-path wit/ --world data-collection componentize dc_component -o dc_component.wasm
build:
edgee components build

build-no-edgee: setup ## build component
uv run componentize-py --wit-path wit/ --world data-collection componentize dc_component -o dc_component.wasm

clean: ## clean build artifacts
rm -rf dc_component.wasm
rm -rf edgee_world
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This is an example of a Python Edgee Component.

## Setup
Requirements:
- [edgee-cli] (https://github.com/edgee-cloud/edgee)
- Python3
- uv

Expand Down
15 changes: 15 additions & 0 deletions edgee-component.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
manifest_version = 1

[package]
name = "example-py-component"
version = "1.0.0"
category = "data-collection"
subcategory = "analytics"
description = "Example Python component for data collection"
documentation = "https://github.com/edgee-cloud/example-py-component"
repository = "https://github.com/edgee-cloud/example-py-component"
wit-world-version = "0.4.0"

[package.build]
command = "uv sync && uv run componentize-py --wit-path wit/ bindings edgee_world && uv run componentize-py --wit-path wit/ --world data-collection componentize dc_component -o dc_component.wasm"
output_path = "./dc-component.wasm"