From 82137f12320a49aef903d8cbc1c4c07cfa7397a7 Mon Sep 17 00:00:00 2001 From: yuecideng Date: Sat, 17 Jan 2026 22:14:19 +0800 Subject: [PATCH 1/2] wip --- CONTRIBUTING.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..662a1d8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,47 @@ +# Contributing to EmbodiChain + +Thank you for your interest in contributing to EmbodiChain! We welcome contributions from the community to help make this project better. + +## Bug report and feature requests + +### Bug Report + +If you encounter a bug, please use the **Bug Report** template to submit an issue. +* Check if the issue has already been reported. +* Use the [Bug Report Template](.github/ISSUE_TEMPLATE/bug.md) when creating a new issue. +* Provide a clear and concise description of the bug. +* Include steps to reproduce the bug, along with error messages and stack traces if applicable. + +### Feature Requests + +If you have an idea for a new feature or improvement, please use the **Proposal** template. +* Use the [Proposal Template](.github/ISSUE_TEMPLATE/proposal.md). +* Describe the feature and its core capabilities. +* Explain the motivation behind the proposal and the problem it solves. + +## Pull requests + +We welcome pull requests for bug fixes, new features, and documentation improvements. + +1. **Fork the repository** and create a new branch for your changes. +2. **Make your changes**. Please ensure your code is clean and readable. +3. **Run formatters**. We use `black` for code formatting. Please run it before submitting your PR. + ```bash + black . + ``` + > Currently, we use black==24.3.0 for formatting. Make sure to use the same version to avoid inconsistencies. +4. **Submit a Pull Request**. + * Use the [Pull Request Template](.github/PULL_REQUEST_TEMPLATE.md). + * Keep PRs small and focused. + * Include a summary of the changes and link to any relevant issues (e.g., `Fixes #123`). + * Ensure all checks pass. + +## Contribute specific robots + +TODO: Add instructions for contributing new robot models and its configurations. + +## Contribute specific environments + +To contribute a new environment: + +TODO: Add instructions for contributing new environments. \ No newline at end of file From 441778b68d710c93c6fb2bca62dd75445d290e65 Mon Sep 17 00:00:00 2001 From: yuecideng Date: Sat, 17 Jan 2026 22:38:27 +0800 Subject: [PATCH 2/2] wip --- tests/sim/solvers/test_differential_solver.py | 11 +++-------- tests/sim/solvers/test_opw_solver.py | 11 +++-------- tests/sim/solvers/test_pink_solver.py | 11 +++-------- tests/sim/solvers/test_pinocchio_solver.py | 11 +++-------- tests/sim/solvers/test_pytorch_solver.py | 11 +++-------- tests/sim/solvers/test_srs_solver.py | 11 +++-------- tests/sim/utility/test_workspace_analyze.py | 11 +++-------- 7 files changed, 21 insertions(+), 56 deletions(-) diff --git a/tests/sim/solvers/test_differential_solver.py b/tests/sim/solvers/test_differential_solver.py index 3ce4b73..fc96220 100644 --- a/tests/sim/solvers/test_differential_solver.py +++ b/tests/sim/solvers/test_differential_solver.py @@ -119,14 +119,9 @@ def test_differential_solver(self, arm_name: str): assert res[0] == False assert ik_qpos.shape == (1, dof) - @classmethod - def teardown_class(cls): - if cls.sim is not None: - try: - cls.sim.destroy() - print("sim destroyed successfully") - except Exception as e: - print(f"Error during sim.destroy(): {e}") + def teardown_method(self): + """Clean up resources after each test method.""" + self.sim.destroy() class TestDifferentialSolver(BaseSolverTest): diff --git a/tests/sim/solvers/test_opw_solver.py b/tests/sim/solvers/test_opw_solver.py index bf6a7c4..2174389 100644 --- a/tests/sim/solvers/test_opw_solver.py +++ b/tests/sim/solvers/test_opw_solver.py @@ -117,14 +117,9 @@ def test_ik(self, arm_name: str): assert res[0] == False assert ik_qpos.shape == (1, dof) - @classmethod - def teardown_class(cls): - if cls.sim is not None: - try: - cls.sim.destroy() - print("sim destroyed successfully") - except Exception as e: - print(f"Error during sim.destroy(): {e}") + def teardown_method(self): + """Clean up resources after each test method.""" + self.sim.destroy() class TestOPWSolver(BaseSolverTest): diff --git a/tests/sim/solvers/test_pink_solver.py b/tests/sim/solvers/test_pink_solver.py index 537374a..43af9fe 100644 --- a/tests/sim/solvers/test_pink_solver.py +++ b/tests/sim/solvers/test_pink_solver.py @@ -123,14 +123,9 @@ def test_differential_solver(self): assert res[0] == False assert ik_qpos.shape == (1, dof) - @classmethod - def teardown_class(cls): - if cls.sim is not None: - try: - cls.sim.destroy() - print("sim destroyed successfully") - except Exception as e: - print(f"Error during sim.destroy(): {e}") + def teardown_method(self): + """Clean up resources after each test method.""" + self.sim.destroy() @pytest.mark.skip(reason="Skipping Pink tests temporarily") diff --git a/tests/sim/solvers/test_pinocchio_solver.py b/tests/sim/solvers/test_pinocchio_solver.py index 3650a85..fdd33d5 100644 --- a/tests/sim/solvers/test_pinocchio_solver.py +++ b/tests/sim/solvers/test_pinocchio_solver.py @@ -104,14 +104,9 @@ def test_ik(self, arm_name: str): assert res[0] == False assert ik_qpos.shape == (1, dof) - @classmethod - def teardown_class(cls): - if cls.sim is not None: - try: - cls.sim.destroy() - print("sim destroyed successfully") - except Exception as e: - print(f"Error during sim.destroy(): {e}") + def teardown_method(self): + """Clean up resources after each test method.""" + self.sim.destroy() class TestPinocchioSolver(BaseSolverTest): diff --git a/tests/sim/solvers/test_pytorch_solver.py b/tests/sim/solvers/test_pytorch_solver.py index 7551770..50382f6 100644 --- a/tests/sim/solvers/test_pytorch_solver.py +++ b/tests/sim/solvers/test_pytorch_solver.py @@ -107,14 +107,9 @@ def test_ik(self, arm_name: str): assert res[0] == False assert ik_qpos.shape == (1, dof) - @classmethod - def teardown_class(cls): - if cls.sim is not None: - try: - cls.sim.destroy() - print("sim destroyed successfully") - except Exception as e: - print(f"Error during sim.destroy(): {e}") + def teardown_method(self): + """Clean up resources after each test method.""" + self.sim.destroy() class TestPytorchSolver(BaseSolverTest): diff --git a/tests/sim/solvers/test_srs_solver.py b/tests/sim/solvers/test_srs_solver.py index 96a644b..b4925c8 100644 --- a/tests/sim/solvers/test_srs_solver.py +++ b/tests/sim/solvers/test_srs_solver.py @@ -269,14 +269,9 @@ def test_robot_ik(self, arm_name: str): assert res[0] == False assert ik_qpos.shape == (1, dof) - @classmethod - def teardown_class(cls): - if cls.sim is not None: - try: - cls.sim.destroy() - print("sim destroyed successfully") - except Exception as e: - print(f"Error during sim.destroy(): {e}") + def teardown_method(self): + """Clean up resources after each test method.""" + self.sim.destroy() class TestSRSCPUSolver(BaseSolverTest): diff --git a/tests/sim/utility/test_workspace_analyze.py b/tests/sim/utility/test_workspace_analyze.py index 2226057..72b839b 100644 --- a/tests/sim/utility/test_workspace_analyze.py +++ b/tests/sim/utility/test_workspace_analyze.py @@ -76,14 +76,9 @@ def setup_simulation(self): self.robot: Robot = self.sim.add_robot(cfg=CobotMagicCfg.from_dict(cfg_dict)) - @classmethod - def teardown_class(cls): - if cls.sim is not None: - try: - cls.sim.destroy() - print("sim destroyed successfully") - except Exception as e: - print(f"Error during sim.destroy(): {e}") + def teardown_method(self): + """Clean up resources after each test method.""" + self.sim.destroy() class TestJointWorkspaceAnalyzeTest(BaseWorkspaceAnalyzeTest):