Skip to content

Download dataset

Download dataset #531

Workflow file for this run

name: Download dataset
on:
schedule:
- cron: "0 10 * * *"
jobs:
process:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --system --dev
- name: Download dataset from Reddit
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
PASSWORD: ${{ secrets.PASSWORD }}
run: python download_threads.py
- name: Upload dataset to Kaggle
env:
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
KAGGLE_USERNAME: ioexception
run: python upload.py
- name: Commit changes
run: |
msg="Updated: `date +'%Y-%m-%d %H:%M'`"
git config --global user.email "antonio.feregrino@gmail.com"
git config --global user.name "Antonio Feregrino"
git add data/
git diff --quiet && git diff --staged --quiet || git commit -m "$msg"
git push