Screenipy Data - After-Market Data Gen #833
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
# Project : Screenipy | |
# Author : Pranjal Joshi | |
# Created : 24/01/2022 | |
# Description : Workflow for downloading pickled stock data to cloud [Use this when yfinance causing an issue] | |
name: Screenipy Data - After-Market Data Gen | |
on: | |
workflow_dispatch: | |
inputs: | |
name: | |
description: 'Run Details' | |
required: false | |
default: 'Screenipy - Data Download' | |
schedule: | |
- cron: '02 10 * * 1-5' | |
jobs: | |
Download_Stock_Data: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: actions-data-download | |
fetch-depth: 0 | |
- name: Set up Python 3.11.6 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.6 | |
- name: Install Python Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Download Stock Data | |
run: | | |
rm -rf actions-data-download | |
mkdir -p actions-data-download | |
python src/screenipy.py -d | |
mv stock_data_*.pkl actions-data-download/ | |
- name: Push Pickle Data | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git checkout actions-data-download | |
git add --all | |
git diff --cached --quiet || git commit -m "GitHub Action Workflow - Market Data Download (Default Config)" | |
git push | |
- name: Squash Commits (Python) | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git fetch | |
git checkout actions-data-download | |
python .github/workflows/squash.py |