-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI Layout and Create RayCluster function #227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really minor change otherwise looks good. Tested the CLI and define function as well. All seems to work as expected
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off to a good start! Just one thing I noticed initially:
- Running
codeflare create raycluster
for me causesFileNotFoundError: [Errno 2] No such file or directory: '/Users/meyceoz/Documents/codeflare-sdk/src/codeflare_sdk/cli/commands/create.py'
. I realized after that the command was changed todefine
but the CLI should be able to handle erroneous input. For example, if i writecodeflare pizza
, right now it will tell meFileNotFoundError: [Errno 2] No such file or directory: '/Users/meyceoz/Documents/codeflare-sdk/src/codeflare_sdk/cli/commands/pizza.py'
. Basically, just make sure you are checking that commands are valid too, not just options, and if not just tell the user it is invalid and to check--help
for more details. I thinkclick
may have something for this as well.
@carsonmh looks good. Thanks for the changes. However, your commit history looks like you merged previous commits instead of re-baseing. Can you update this PR so that it only includes your commits? Thanks |
@MichaelClifford it should be fixed now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only one unit-test suggestion, then good to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@MichaelClifford if it looks good to you, feel free to merge |
* Create: base and file layout for CLI * Add: Create raycluster command for CLI * Refactor: refactor CLI using pre-commit * Test: unit tests for create raycluster function in the CLI * Update: update egg-info with more paths * Change: change Framework Cluster to RayCluster * merge: rebase with main * Fix: unit tests * Change: create cluster to define cluster in unit tests * Add: error handling for invalid command * test: change tests so cli cluster definition has its own yaml file
* Create: base and file layout for CLI * Add: Create raycluster command for CLI * Refactor: refactor CLI using pre-commit * Test: unit tests for create raycluster function in the CLI * Update: update egg-info with more paths * Change: change Framework Cluster to RayCluster * merge: rebase with main * Fix: unit tests * Change: create cluster to define cluster in unit tests * Add: error handling for invalid command * test: change tests so cli cluster definition has its own yaml file
closes #218
Creates layout, configuration, build configuration, and create raycluster command for the CLI. After building, get started with
codeflare --help
or justcodeflare
How to test
pytest -v tests/unit_test.py
orpython -m pytest tests/unit_test.py
codeflare create raycluster [options]
command. This should create the yaml file with the specified options. Options should be in the format:--name=cluster-name
or--machine_types='["gpu.large"]'