Skip to content
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

Merged
merged 8 commits into from
Oct 10, 2023
Merged

updated clone cmd to cp #137

merged 8 commits into from
Oct 10, 2023

Conversation

rabroldan
Copy link
Contributor

@rabroldan rabroldan commented Oct 9, 2023

Checklist:

  • I have read and followed the contribution guideline.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change
  • I have tested these changes and added tests that prove my fix is effective or that my feature works
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes
  • 100% unit test coverage achieved

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):

image

Additional context
Kindly please review thanks

@rabroldan rabroldan requested a review from a team as a code owner October 9, 2023 20:26
Copy link
Contributor

@janosmurai janosmurai left a 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.

@janosmurai
Copy link
Contributor

@rabroldan , could you elaborate on the faulty test cases? How did you run your tests?

@rabroldan
Copy link
Contributor Author

rabroldan commented Oct 10, 2023

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

dem\dem\cli\command\export_cmd.py:17: DeprecationWarning: invalid escape sequence '\^'

@janosmurai
Copy link
Contributor

No problem, the new status looks much better now!

Could you tell me which Python version you use? Thanks!

@rabroldan
Copy link
Contributor Author

hi @janosmurai I used Python 3.11.5 since it required us to use only version 3.10+

Copy link
Contributor

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
Comment on lines 53 to 56
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.
Copy link
Contributor

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!

@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,
Copy link
Contributor

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.

@janosmurai
Copy link
Contributor

hi @janosmurai I used Python 3.11.5 since it required us to use only version 3.10+

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!

@rabroldan
Copy link
Contributor Author

Alright, let me know if I missed anything as well.

thank you

@janosmurai janosmurai added the hacktoberfest-accepted Accepted during hacktoberfest label Oct 10, 2023
@janosmurai janosmurai merged commit 7268e22 into axem-solutions:main Oct 10, 2023
1 check passed
@janosmurai
Copy link
Contributor

@rabroldan , Now LGTM! Thank you for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Accepted during hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants