-
James Smith authored
# Description This PR introduces a context manager wrapper to `SimulationContext` that can be reused by any future simulation scripts that require a similar set up and tear down functionality. This enables using the `with` keyword like: ``` for i in range(10): with build_sim_context(sim_cfg) as sim: # Do something with sim context # State will be cleaned up at the end of this with block ``` Fixes #130 ## Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./orbit.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have run all the tests with `./orbit.sh --test` and they pass - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by:
jsmith-bdai <142246516+jsmith-bdai@users.noreply.github.com>
Signed-off-by:
James Smith <142246516+jsmith-bdai@users.noreply.github.com>
Co-authored-by:
Mayank Mittal <12863862+Mayankm96@users.noreply.github.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .github | ||
| .vscode | ||
| docker | ||
| docs | ||
| source | ||
| tools | ||
| .dockerignore | ||
| .flake8 | ||
| .gitattributes | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS.md | ||
| LICENSE | ||
| README.md | ||
| VERSION | ||
| orbit.sh | ||
| pyproject.toml |