Skip to content

Commit

Permalink
Update function name and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmosely committed Sep 14, 2024
1 parent 8e07625 commit e9ccd91
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion esp-idf/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "main"
version = "0.0.1"
version = "0.0.2"
dependencies = []

[tool.hatch.envs.dev]
Expand Down
5 changes: 5 additions & 0 deletions esp-idf/src/main/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
"""The ESP-IDF (Espressif IoT Development Framework) is a software development framework for the ESP32 chip series by Espressif.
The idf.py command-line tool provides a front-end to easily manage your project builds, deployment, debugging and more. It manages CMake, Ninja and esptool.py.
"""

from .esp_idf import EspIdf
13 changes: 4 additions & 9 deletions esp-idf/src/main/esp_idf.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
"""The ESP-IDF (Espressif IoT Development Framework) is a software development framework for the ESP32 chip series by Espressif.
The idf.py command-line tool provides a front-end to easily manage your project builds, deployment, debugging and more. It manages CMake, Ninja and the esptool.py.
"""

from typing import Annotated

import dagger
Expand All @@ -12,7 +7,7 @@
@object_type
class EspIdf:
@function
async def build(
async def run(
self,
project_dir: Annotated[
dagger.Directory, Doc("The directory containing the ESP-IDF project")
Expand All @@ -26,14 +21,14 @@ async def build(
) -> str:
"""Execute idf.py from the official Espressif IDF Docker image
Example usage: dagger call build --project_dir . --image_version "v5.2"
Example usage: dagger call run --project_dir . --image_version "v5.2"
"""
build_output = await (
run_output = await (
dag.container()
.from_(f"espressif/idf:{image_version}")
.with_mounted_directory("/project", project_dir)
.with_workdir("/project")
.with_exec(["idf.py", *idf_args], use_entrypoint=True)
.stdout()
)
return build_output
return run_output

0 comments on commit e9ccd91

Please sign in to comment.