Skip to content

Commit

Permalink
Merge pull request #268 from 0dm/poetry
Browse files Browse the repository at this point in the history
Use Poetry for dependencies
  • Loading branch information
abrichr authored Jun 16, 2023
2 parents f837d62 + 5a75be9 commit bde3816
Show file tree
Hide file tree
Showing 5 changed files with 5,669 additions and 3 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,19 @@ The direction is adjacent to [Adept.ai](https://adept.ai/), with some key differ

## Install

Recommended: Install with [Poetry](https://python-poetry.org/):
```
git clone https://github.com/MLDSAI/OpenAdapt.git
cd OpenAdapt
pip install poetry
poetry install
poetry shell
alembic upgrade head
pytest
```

Manual:
```
python3.10 -m venv .venv
source .venv/bin/activate
pip install wheel
Expand Down
5 changes: 5 additions & 0 deletions openadapt/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,5 +642,10 @@ def record(
logger.info(f"saved {recording_timestamp=}")


# entry point
def start():
fire.Fire(record)


if __name__ == "__main__":
fire.Fire(record)
9 changes: 6 additions & 3 deletions openadapt/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ def replay(
if not name.lower().endswith("mixin")
]
available_strategies = ", ".join(strategy_names)
raise ValueError(
f"Invalid {strategy_name=}; {available_strategies=}"
)
raise ValueError(f"Invalid {strategy_name=}; {available_strategies=}")

strategy_class = strategy_class_by_name[strategy_name]
logger.info(f"{strategy_class=}")
Expand All @@ -47,5 +45,10 @@ def replay(
strategy.run()


# entry point
def start():
fire.Fire(replay)


if __name__ == "__main__":
fire.Fire(replay)
Loading

0 comments on commit bde3816

Please sign in to comment.