-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
chore(tests): Create a test to check whether requirements.txt
was generated with pip-compile
#11495
Comments
@hbelmiro I would like to work on this , Please assign this to me . |
i would like to work on this. /assign |
@hbelmiro shall i keep the test in the test dir in the root? and may i use python/pytest for it? are there requirements for it to be add to the ci? |
@mahdikhashan You can just create a bash script in https://github.com/kubeflow/pipelines/tree/master/.github/resources/scripts and call it from the CI. It can be something like: # Generate a temporary file for comparison
temp_file=$(mktemp)
# Generate requirements.txt using pip-compile
pip-compile --output-file=- requirements.in > "$temp_file"
# Compare the generated file with the existing requirements.txt
if diff -q "$temp_file" requirements.txt >/dev/null; then
echo "Success: requirements.txt matches the output of pip-compile."
rm "$temp_file"
exit 0
else
echo "Error: requirements.txt does not match the output of pip-compile."
echo "Differences:"
diff "$temp_file" requirements.txt
rm "$temp_file"
exit 1
fi Please check all occurrences of find . -name "requirements.in"
./test/sample-test/requirements.in
./test/kfp-functional-test/requirements.in
./backend/metadata_writer/requirements.in
./backend/requirements.in
./backend/src/apiserver/visualization/requirements.in
./sdk/python/requirements.in |
@hbelmiro i need to create a new workflow file for it, right? otherwise, in which workflow shall i add it - probably as a job?
|
Chore description
Create a test to check whether
requirements.txt
was generated withpip-compile
. That can be achieved by runningpip-compile
and comparing the result with the existingrequirements.txt
.This test should be run only when a
requirements.in
or arequirements.txt
file is modified.Labels
/area testing
Love this idea? Give it a 👍.
The text was updated successfully, but these errors were encountered: