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

RHOAIENG-11216: Add script to automate the creation of a new Python-based image from an existing one #672

Merged
merged 12 commits into from
Aug 15, 2024

Conversation

caponetto
Copy link
Contributor

https://issues.redhat.com/browse/RHOAIENG-11216

Description

Adding a Python script that generates a new folder structure for a Python-based project by copying an existing one and updating Python version references. It performs the following steps:

  1. Copy Folder: Duplicates the specified folder structure.
  2. Update Python Versions: Replaces occurrences of the source Python version with the target version throughout the folder.
  3. Update Lock Files: Executes pipenv lock to regenerate lock files based on the new Python version.

If pipenv lock encounters errors, manual intervention is required to resolve compatibility issues between dependencies. Review the errors reported by pipenv and adjust the dependencies as needed.

See the README file for examples.

How Has This Been Tested?

Manual executions, comparing the results with #659.

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@openshift-ci openshift-ci bot requested review from harshad16 and jstourac August 13, 2024 18:41
Copy link
Member

@jstourac jstourac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put some comments, but LGTM in general!

@caponetto
Copy link
Contributor Author

@jiridanek Please let me know when you finish with the review.

Copy link
Member

@jiridanek jiridanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess I'm done. My main complaint is probably that there's huge amount of comments even for things that are fairly obvious. Hopefully if you switch to using python type annotations, you'd feel less need to comment every parameter of a 3 line function, where it's equally easy to read the implementation body as to read the comment.

I would not be offended if you decide to keep the comments, but please remove the comment from main(), that's way too much ;P

@caponetto caponetto added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 14, 2024
Copy link
Member

@jiridanek jiridanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments about two aspects of type hints

  • List, tuple, dict are parametric types, you can specify "list of what"
  • When a function does not return anything, give it -> None: type annotation

@jstourac
Copy link
Member

/lgtm

Thank you @caponetto, no more comments from my side 🙂

@jiridanek
Copy link
Member

/lgtm

me too

@caponetto
Copy link
Contributor Author

Thanks for the review guys!
/approve

Copy link
Contributor

openshift-ci bot commented Aug 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caponetto

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@caponetto
Copy link
Contributor Author

/override ci/prow/rocm-notebooks-e2e-tests
/override ci/prow/images

Copy link
Contributor

openshift-ci bot commented Aug 15, 2024

@caponetto: Overrode contexts on behalf of caponetto: ci/prow/images, ci/prow/rocm-notebooks-e2e-tests

In response to this:

/override ci/prow/rocm-notebooks-e2e-tests
/override ci/prow/images

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit c8c942b into opendatahub-io:main Aug 15, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants