-
Notifications
You must be signed in to change notification settings - Fork 15
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
updated clone cmd to cp #137
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.
You only deleted the old clone
command and not renamed it. Please add back the old clone_cmd.py and test_clone_cmd.py, rename them to cp_cmd.py and test_cp_cmd.py respectively. In the implementation please change all the clone occurrences to cp.
Also please don't forget to update the documentation: both the comments and the command description in the docs directory.
@rabroldan , could you elaborate on the faulty test cases? How did you run your tests? |
hi @janosmurai I realized I didnt have the right file uploaded. I uploaded the correct one. with clone being renamed to cp and properly implemented across the project including test files. I apologize for the mistake I ran the tests with the correct file and now evertyhing passes except for a warning cause by export_cmd which was recently implemented I assume
|
No problem, the new status looks much better now! Could you tell me which Python version you use? Thanks! |
hi @janosmurai I used Python 3.11.5 since it required us to use only version 3.10+ |
dem/cli/command/cp_cmd.py
Outdated
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.
Please also update the content of this file. It's misleading to use the term clone because from now on it means something different.
A simple replace all for all clone
text instances should be sufficient. However please check that the modification makes sense or not, and that all the tests are still succeeding.
dem/cli/main.py
Outdated
def cp(dev_env_name: str = typer.Argument(...,help="Name of the Development Environment to clone."), | ||
new_dev_env_name: str = typer.Argument(...,help="Name of the New Development Environment.")) -> None: | ||
""" | ||
Clone existing Development Environment locally. |
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.
Please also change the clone word to cp in the texts too!
tests/cli/test_cp_cmd.py
Outdated
@patch("dem.cli.command.cp_cmd.DevEnvLocalSetup") | ||
@patch("dem.cli.command.cp_cmd.get_dev_env_to_clone") | ||
@patch("dem.cli.command.cp_cmd.check_new_dev_env_name_taken") | ||
@patch("dem.cli.command.cp_cmd.clone_given_dev_env") | ||
def test_clone(mock_clone_given_dev_env, mock_check_new_dev_env_name_taken, |
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.
This should be test_cp
now.
You can use that version, but I haven't tested the DEM with a version so high as that. I'll make a new issue for it, nice finding! |
Alright, let me know if I missed anything as well. thank you |
@rabroldan , Now LGTM! Thank you for contributing! |
Checklist:
Related Issue
Closing:
#130
DEM-189
Type Of Change
changed clone command to cp no logic changes required . Error was observed during testing
Description
during testing cp_cmd had worked since it had no changes in logic required but showed two errors during testing
Screenshots (if appropriate):
Additional context
Kindly please review thanks