Is your feature request related to a problem? Please describe
The current process of updating the Kaggle Wheel that is used for the Public Leaderboard, requires one of the member to manually create the custom wheel each time an update is released. This is takes quite a bit of time and we might miss it from time to time as new updates come out.
Describe the solution you'd like
Creating a GitHub Actions that goes through and creates the custom wheel and setup a PR for it similar to Dependabot.
For all this to work, we will make use of the pypi.org api to pull the latest release
-
Collect the filename and releaseURL
filename=$(curl -s https://pypi.org/simple/kaggle/ | sed -n 's/.*<a[^>]*>\(.*\)<\/a>.*/\1/p' | tail -n 1)
releaseURL=$(curl -s https://pypi.org/simple/kaggle/ | grep -oP '(?<=<a href=").*?(?=" >)' | tail -n 1)
-
Check if $(basename $filename .tar.gz)-py3-none-any.whl exists in wheels
- If file exists, then send a message stating:
Latest Version Exists and STOP
- If file does not exist, STEP 3
-
Download and unzip the latest release
curl -L $releaseURL > release.tar.gz
tar -xvzf release.tar.gz
-
Check if a specific line of code exists at a specific line number in kaggle/api/kaggle_api_extended.py
sed -n "1837p" "$(basename $filename .tar.gz)/kaggle/api/kaggle_api_extended.py" | grep -Fxq " remote_date = datetime.strptime(response.headers['Last-Modified']," && echo "Found" || echo "Not found"
- We are trying to verify if the line causing the bug has been resolved or not.
- If it does not exist then send a message stating:
Verify new changes in this release and STOP
- If it does exist, then STEP 5
-
Make the line change
sed -i "1837s/.*/ remote_date = datetime.strptime(response.headers['Date'],/" "$(basename $filename .tar.gz)/kaggle/api/kaggle_api_extended.py"
-
Build the Python Wheel
-
Create a new branch that includes the new wheel file
Additional context
Is your feature request related to a problem? Please describe
The current process of updating the Kaggle Wheel that is used for the Public Leaderboard, requires one of the member to manually create the custom wheel each time an update is released. This is takes quite a bit of time and we might miss it from time to time as new updates come out.
Describe the solution you'd like
Creating a GitHub Actions that goes through and creates the custom wheel and setup a PR for it similar to Dependabot.
For all this to work, we will make use of the pypi.org api to pull the latest release
Collect the
filenameandreleaseURLCheck if
$(basename $filename .tar.gz)-py3-none-any.whlexists inwheelsLatest Version Existsand STOPDownload and unzip the latest release
Check if a specific line of code exists at a specific line number in
kaggle/api/kaggle_api_extended.pyVerify new changes in this releaseand STOPMake the line change
Build the Python Wheel
Create a new branch that includes the new wheel file
Additional context