-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package-downloads: Store version-aggregated counts
- Loading branch information
Showing
7 changed files
with
72 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,43 +22,40 @@ jobs: | |
export PYTHONPATH="$( pwd )/src" | ||
python -m package_downloads.ntp_time | ||
)" | ||
git fetch --depth=1 origin data:data | ||
last_commit_message="$( git --no-pager log -1 --pretty=%s data )" | ||
set -x | ||
case "${last_commit_message}" in | ||
*"${time}" ) | ||
if git ls-remote --exit-code --quiet --tags -- origin "${time}" ; then | ||
echo "skip=1" >> "${GITHUB_OUTPUT}" | ||
;; | ||
* ) | ||
else | ||
echo "skip=0" >> "${GITHUB_OUTPUT}" | ||
esac | ||
fi | ||
- if: ${{ github.ref != 'refs/heads/main' || steps.check.outputs.skip == '0' }} | ||
name: Fetch | ||
id: fetch | ||
run: | | ||
set -x | ||
ref="$( git show-ref --head --hash HEAD )" | ||
pip install \ | ||
ntplib \ | ||
aiohttp requests urllib3 \ | ||
pandas | ||
git fetch --depth=1 origin data:data | ||
git checkout --quiet data | ||
git checkout --quiet "${ref}" -- ./src | ||
time="$( | ||
export PYTHONPATH="$( pwd )/src" | ||
mkdir tmp | ||
cd tmp | ||
python -m package_downloads.stats_from_anaconda_org | ||
)" | ||
echo "time=${time}" >> "${GITHUB_OUTPUT}" | ||
- if: ${{ github.ref != 'refs/heads/main' || steps.check.outputs.skip == '0' }} | ||
name: Add changes, commit | ||
run: | | ||
set -x | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git checkout data | ||
rm -rf package-downloads | ||
mv tmp/package-downloads ./ | ||
rmdir tmp | ||
git add -A ./package-downloads | ||
git rm -rf ./src | ||
git status --short | grep -o ^. | sort | uniq -c | ||
git commit -qm 'Update package download stats, ${{ steps.fetch.outputs.time }}' | ||
git tag '${{ steps.fetch.outputs.time }}' | ||
|
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-162 Bytes
src/package_downloads/_vendor/conda/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file removed
BIN
-199 Bytes
src/package_downloads/_vendor/conda/__pycache__/exceptions.cpython-311.pyc
Binary file not shown.
Binary file removed
BIN
-169 Bytes
src/package_downloads/_vendor/conda/models/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file removed
BIN
-32.9 KB
src/package_downloads/_vendor/conda/models/__pycache__/version.cpython-311.pyc
Binary file not shown.
Oops, something went wrong.