fix(ci): declare entrypoints + fix testing release (#1642)
This commit is contained in:
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@@ -19,6 +19,11 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- 'v*.*.*' # Trigger on tags like v0.1.0, v1.0.0
|
- '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:
|
jobs:
|
||||||
# This job builds the Python package and publishes it to PyPI
|
# This job builds the Python package and publishes it to PyPI
|
||||||
build-and-publish:
|
build-and-publish:
|
||||||
@@ -120,10 +125,10 @@ jobs:
|
|||||||
version: ${{ env.UV_VERSION }}
|
version: ${{ env.UV_VERSION }}
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
- name: Install lerobot release
|
- 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
|
- 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
|
- name: Run end-to-end tests
|
||||||
run: uv run make test-end-to-end
|
run: uv run make test-end-to-end
|
||||||
|
|||||||
@@ -82,5 +82,9 @@ def calibrate(cfg: CalibrateConfig):
|
|||||||
device.disconnect()
|
device.disconnect()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
calibrate()
|
calibrate()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ def save_images_from_all_cameras(
|
|||||||
print(f"Image capture finished. Images saved to {output_dir}")
|
print(f"Image capture finished. Images saved to {output_dir}")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Unified camera utility script for listing cameras and capturing images."
|
description="Unified camera utility script for listing cameras and capturing images."
|
||||||
)
|
)
|
||||||
@@ -313,3 +313,7 @@ if __name__ == "__main__":
|
|||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
save_images_from_all_cameras(**vars(args))
|
save_images_from_all_cameras(**vars(args))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -61,5 +61,9 @@ def find_port():
|
|||||||
raise OSError(f"Could not detect the port. More than one port was found ({ports_diff}).")
|
raise OSError(f"Could not detect the port. More than one port was found ({ports_diff}).")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
find_port()
|
find_port()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -393,5 +393,9 @@ def record(cfg: RecordConfig) -> LeRobotDataset:
|
|||||||
return dataset
|
return dataset
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
record()
|
record()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -112,5 +112,9 @@ def replay(cfg: ReplayConfig):
|
|||||||
robot.disconnect()
|
robot.disconnect()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
replay()
|
replay()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -501,6 +501,10 @@ def eval_main(cfg: EvalPipelineConfig):
|
|||||||
logging.info("End of eval")
|
logging.info("End of eval")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
init_logging()
|
init_logging()
|
||||||
eval_main()
|
eval_main()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -286,6 +286,10 @@ def train(cfg: TrainPipelineConfig):
|
|||||||
policy.push_model_to_hub(cfg)
|
policy.push_model_to_hub(cfg)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
init_logging()
|
init_logging()
|
||||||
train()
|
train()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -80,5 +80,9 @@ def setup_motors(cfg: SetupConfig):
|
|||||||
device.setup_motors()
|
device.setup_motors()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
setup_motors()
|
setup_motors()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -153,5 +153,9 @@ def teleoperate(cfg: TeleoperateConfig):
|
|||||||
robot.disconnect()
|
robot.disconnect()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
teleoperate()
|
teleoperate()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user