Skip to content

Commit 956fee9

Browse files
authored
Merge branch 'develop' into gradeloader
2 parents 6e45a1d + 713a855 commit 956fee9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1166
-181
lines changed

.env.template

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ LOGIN_ASTRA_USERNAME=
55
LOGIN_ASTRA_PASSWORD=
66
#Login to https://east.mymazevo.com/main-home then go to https://east.mymazevo.com/api/tenantsettings/GetApiKey
77
MAZEVO_API_KEY=
8+
#Academic Calendars
9+
GOOGLE_GENAI_USE_VERTEXAI=
10+
GOOGLE_CLOUD_PROJECT=
11+
GOOGLE_APPLICATION_CREDENTIALS=
12+
GEMINI_SERVICE_ACCOUNT=
13+
NEBULA_API_URL=
14+
NEBULA_API_STORAGE_BUCKET=
15+
NEBULA_API_KEY=
16+
NEBULA_API_STORAGE_KEY=
817

918
# Uploader
1019
MONGODB_URI=

.github/workflows/deploy.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@ jobs:
5555
job: 'daily-prod'
5656
image: 'us-central1-docker.pkg.dev/api-tools-451421/runners/runner'
5757
region: us-central1
58+
59+
- name: Upload to weekly dev job
60+
uses: google-github-actions/deploy-cloudrun@v2
61+
with:
62+
job: 'weekly-dev'
63+
image: 'us-central1-docker.pkg.dev/api-tools-451421/runners/runner'
64+
region: us-central1
65+
66+
- name: Upload to weekly prod job
67+
uses: google-github-actions/deploy-cloudrun@v2
68+
with:
69+
job: 'weekly-prod'
70+
image: 'us-central1-docker.pkg.dev/api-tools-451421/runners/runner'
71+
region: us-central1
5872

5973
- name: Upload to monthly dev job
6074
uses: google-github-actions/deploy-cloudrun@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ yarn-error.log*
3030
*.env.development.local
3131
*.env.test.local
3232
*.env
33+
*service-account.json
3334

3435
# vercel
3536
.vercel

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ RUN apt-get update && apt-get install -y chromium
2323
ENV CHROMIUM_BIN=/usr/bin/chromium
2424
ENV GOOGLE_CHROME_BIN=/usr/bin/chromium
2525

26+
# Install poppler-utils for pdftotext for academic calendar parsing
27+
RUN apt-get install -y poppler-utils
28+
2629
# Copy build file from builder
2730
COPY --from=builder /app/api-tools /app/api-tools
2831

@@ -32,5 +35,5 @@ RUN chmod +x /app/runners/setup.sh
3235
ENTRYPOINT ["/app/runners/setup.sh"]
3336

3437
# Optional .env copy for development
35-
FROM base AS dev
38+
FROM base AS local
3639
COPY .env /app/.env

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Run the tool by changing directory using `cd` to the `api-tools` directory and r
7575
| Command | Description |
7676
|---------|-------------|
7777
| `./api-tools -parse -astra` | Parses Astra data. |
78+
| `./api-tools -parse -calendar` | Parses calendar data. |
7879
| `./api-tools -parse -csv [directory]` | Outputs grade data CSVs (default: `./grade-data`). |
7980
| `./api-tools -parse -map` | Parses UTD Map data. |
8081
| `./api-tools -parse -mazevo` | Parses Mazevo data. |
@@ -97,8 +98,8 @@ Docker is used for automated running on Google Cloud Platform. More info [here](
9798

9899
To build the container for local testing first make sure all scripts in the `runners` folder have LF line endings then run:
99100
```
100-
docker build --target dev -t my-runner:local .
101-
docker run --rm -e ENVIRONMENT=dev -e RUNNER_SCRIPT_NAME=daily.sh my-runner:local
101+
docker build --target local -t my-runner:local .
102+
docker run --rm -e ENVIRONMENT=local -e RUNNER_SCRIPT_NAME=daily.sh my-runner:local
102103
```
103104

104105
## Questions?

go.mod

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
module github.com/UTDNebula/api-tools
22

3-
go 1.24
3+
go 1.24.0
44

55
require (
66
github.com/PuerkitoBio/goquery v1.8.1
7-
github.com/UTDNebula/nebula-api/api v0.0.0-20250509234134-d7ea14f304f8
7+
github.com/UTDNebula/nebula-api/api v0.0.0-20251018005009-dd2dbf5b78dc
88
github.com/chromedp/cdproto v0.0.0-20250120090109-d38428e4d9c8
99
github.com/chromedp/chromedp v0.12.1
1010
github.com/google/go-cmp v0.7.0
1111
github.com/joho/godotenv v1.5.1
1212
github.com/valyala/fastjson v1.6.4
1313
go.mongodb.org/mongo-driver v1.17.3
14-
golang.org/x/net v0.36.0
14+
golang.org/x/net v0.43.0
15+
google.golang.org/genai v1.32.0
1516
)
1617

1718
require (
@@ -27,23 +28,24 @@ require (
2728
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0 // indirect
2829
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0 // indirect
2930
github.com/andybalholm/cascadia v1.3.1 // indirect
30-
github.com/bytedance/sonic v1.12.9 // indirect
31-
github.com/bytedance/sonic/loader v0.2.3 // indirect
31+
github.com/bytedance/gopkg v0.1.3 // indirect
32+
github.com/bytedance/sonic v1.14.1 // indirect
33+
github.com/bytedance/sonic/loader v0.3.0 // indirect
3234
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3335
github.com/chromedp/sysutil v1.1.0 // indirect
34-
github.com/cloudwego/base64x v0.1.5 // indirect
36+
github.com/cloudwego/base64x v0.1.6 // indirect
3537
github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 // indirect
3638
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
3739
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
3840
github.com/felixge/httpsnoop v1.0.4 // indirect
39-
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
40-
github.com/gin-contrib/sse v1.0.0 // indirect
41-
github.com/gin-gonic/gin v1.10.0 // indirect
41+
github.com/gabriel-vasile/mimetype v1.4.10 // indirect
42+
github.com/gin-contrib/sse v1.1.0 // indirect
43+
github.com/gin-gonic/gin v1.10.1 // indirect
4244
github.com/go-logr/logr v1.4.2 // indirect
4345
github.com/go-logr/stdr v1.2.2 // indirect
4446
github.com/go-playground/locales v0.14.1 // indirect
4547
github.com/go-playground/universal-translator v0.18.1 // indirect
46-
github.com/go-playground/validator/v10 v10.25.0 // indirect
48+
github.com/go-playground/validator/v10 v10.27.0 // indirect
4749
github.com/gobwas/httphead v0.1.0 // indirect
4850
github.com/gobwas/pool v0.2.1 // indirect
4951
github.com/gobwas/ws v1.4.0 // indirect
@@ -53,20 +55,22 @@ require (
5355
github.com/google/uuid v1.6.0 // indirect
5456
github.com/googleapis/enterprise-certificate-proxy v0.3.5 // indirect
5557
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
58+
github.com/gorilla/websocket v1.5.3 // indirect
5659
github.com/josharian/intern v1.0.0 // indirect
5760
github.com/json-iterator/go v1.1.12 // indirect
5861
github.com/klauspost/compress v1.17.8 // indirect
59-
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
62+
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
6063
github.com/leodido/go-urn v1.4.0 // indirect
6164
github.com/mailru/easyjson v0.9.0 // indirect
6265
github.com/mattn/go-isatty v0.0.20 // indirect
6366
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6467
github.com/modern-go/reflect2 v1.0.2 // indirect
6568
github.com/montanaflynn/stats v0.7.1 // indirect
66-
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
69+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
6770
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
71+
github.com/stretchr/testify v1.11.1 // indirect
6872
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
69-
github.com/ugorji/go/codec v1.2.12 // indirect
73+
github.com/ugorji/go/codec v1.3.0 // indirect
7074
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
7175
github.com/xdg-go/scram v1.1.2 // indirect
7276
github.com/xdg-go/stringprep v1.0.4 // indirect
@@ -80,18 +84,18 @@ require (
8084
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
8185
go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect
8286
go.opentelemetry.io/otel/trace v1.34.0 // indirect
83-
golang.org/x/arch v0.14.0 // indirect
84-
golang.org/x/crypto v0.35.0 // indirect
87+
golang.org/x/arch v0.21.0 // indirect
88+
golang.org/x/crypto v0.42.0 // indirect
8589
golang.org/x/oauth2 v0.28.0 // indirect
86-
golang.org/x/sync v0.12.0 // indirect
87-
golang.org/x/sys v0.30.0 // indirect
88-
golang.org/x/text v0.22.0 // indirect
90+
golang.org/x/sync v0.17.0 // indirect
91+
golang.org/x/sys v0.36.0 // indirect
92+
golang.org/x/text v0.29.0 // indirect
8993
golang.org/x/time v0.10.0 // indirect
9094
google.golang.org/api v0.224.0 // indirect
9195
google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect
9296
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
9397
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
9498
google.golang.org/grpc v1.71.0 // indirect
95-
google.golang.org/protobuf v1.36.5 // indirect
99+
google.golang.org/protobuf v1.36.8 // indirect
96100
gopkg.in/yaml.v3 v3.0.1 // indirect
97101
)

0 commit comments

Comments
 (0)