fix(ci): declare entrypoints + fix testing release (#1642)

This commit is contained in:
Steven Palma
2025-08-01 12:04:34 +02:00
committed by GitHub
parent 945e1ff266
commit 91ed6097bc
10 changed files with 52 additions and 11 deletions

View File

@@ -19,6 +19,11 @@ on:
tags:
- 'v*.*.*' # Trigger on tags like v0.1.0, v1.0.0
# Sets up the environment variables
env:
UV_VERSION: "0.8.0"
PYTHON_VERSION: "3.10"
jobs:
# This job builds the Python package and publishes it to PyPI
build-and-publish:
@@ -120,10 +125,10 @@ jobs:
version: ${{ env.UV_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
- name: Install lerobot release
run: uv run pip install lerobot==${{ needs.build-and-publish.outputs.version }} # zizmor: ignore[template-injection]
run: uv run pip install "lerobot[all]==${{ needs.build-and-publish.outputs.version }}" # zizmor: ignore[template-injection]
- name: Check lerobot version
run: uv run lerobot --version
run: uv run python -c "import lerobot; print(lerobot.__version__)"
- name: Run end-to-end tests
run: uv run make test-end-to-end

View File

@@ -82,5 +82,9 @@ def calibrate(cfg: CalibrateConfig):
device.disconnect()
if __name__ == "__main__":
def main():
calibrate()
if __name__ == "__main__":
main()

View File

@@ -286,7 +286,7 @@ def save_images_from_all_cameras(
print(f"Image capture finished. Images saved to {output_dir}")
if __name__ == "__main__":
def main():
parser = argparse.ArgumentParser(
description="Unified camera utility script for listing cameras and capturing images."
)
@@ -313,3 +313,7 @@ if __name__ == "__main__":
)
args = parser.parse_args()
save_images_from_all_cameras(**vars(args))
if __name__ == "__main__":
main()

View File

@@ -61,5 +61,9 @@ def find_port():
raise OSError(f"Could not detect the port. More than one port was found ({ports_diff}).")
if __name__ == "__main__":
def main():
find_port()
if __name__ == "__main__":
main()

View File

@@ -393,5 +393,9 @@ def record(cfg: RecordConfig) -> LeRobotDataset:
return dataset
if __name__ == "__main__":
def main():
record()
if __name__ == "__main__":
main()

View File

@@ -112,5 +112,9 @@ def replay(cfg: ReplayConfig):
robot.disconnect()
if __name__ == "__main__":
def main():
replay()
if __name__ == "__main__":
main()

View File

@@ -501,6 +501,10 @@ def eval_main(cfg: EvalPipelineConfig):
logging.info("End of eval")
if __name__ == "__main__":
def main():
init_logging()
eval_main()
if __name__ == "__main__":
main()

View File

@@ -286,6 +286,10 @@ def train(cfg: TrainPipelineConfig):
policy.push_model_to_hub(cfg)
if __name__ == "__main__":
def main():
init_logging()
train()
if __name__ == "__main__":
main()

View File

@@ -80,5 +80,9 @@ def setup_motors(cfg: SetupConfig):
device.setup_motors()
if __name__ == "__main__":
def main():
setup_motors()
if __name__ == "__main__":
main()

View File

@@ -153,5 +153,9 @@ def teleoperate(cfg: TeleoperateConfig):
robot.disconnect()
if __name__ == "__main__":
def main():
teleoperate()
if __name__ == "__main__":
main()