Repository navigation
94 lines (74 loc) · 2.37 KB
/
Copy pathload_data.yaml
File metadata and controls
94 lines (74 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Load Data Monthly
on:
push:
branches:
- main
#schedule:
# - cron: '0 0 1 * *' # 1st of each month at midnight
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Set up environment variables
run: echo "MLFLOW_TRACKING_URI=${{ secrets.MLFLOW_TRACKING_URI }}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v1
- name: Set up Python
run: uv python install 3.11
- name: Install the dependencies
run: |
uv sync --all-extras
- name: Run pre-commit checks
run: |
uv run pre-commit run --all-files
- name: Run pytest
run: |
uv run pytest
load_new_month_data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v1
- name: Set up Python
run: uv python install 3.11
- name: Install the dependencies
run: |
uv sync --all-extras
- name: Authenticate with GCP
env:
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
run: |
echo "$GCP_SERVICE_ACCOUNT_KEY" > gcp-key.json
gcloud auth activate-service-account --key-file=gcp-key.json
export GOOGLE_APPLICATION_CREDENTIALS=gcp-key.json
- name: Load New Month Data
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/gcp-key.json
run: |
uv run python scripts/1_load_monthly_data.py
update_train_test_sets:
runs-on: ubuntu-latest
needs: load_new_month_data
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v1
- name: Set up Python
run: uv python install 3.11
- name: Install the dependencies
run: |
uv sync --all-extras
- name: Authenticate with GCP
env:
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
run: |
echo "$GCP_SERVICE_ACCOUNT_KEY" > gcp-key.json
gcloud auth activate-service-account --key-file=gcp-key.json
export GOOGLE_APPLICATION_CREDENTIALS=gcp-key.json
- name: Update Train Test Sets
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/gcp-key.json
run: |
uv run python scripts/2_process_data.py