Skip to content

Study abroad schema - #211

Open
NathanP9000 wants to merge 5 commits into
developfrom
study-abroad-schema
Open

NathanP9000 wants to merge 5 commits into
developfrom
study-abroad-schema

Conversation

@NathanP9000

Copy link
Copy Markdown

Description

Adds a study abroad (Terradotta) scraper and parser. Depends on UTDNebula/nebula-api#405 for the Program schema.

The scraper (-scrape -studyAbroad) gets every active program from the discovery search and saves each program's raw brochure. The parser (-parse -studyAbroad) turns the brochures into schema.Program, adds the name, summary, terms and locations from the discovery records, and writes studyAbroad.json.

Also moves all imports from nebula-api/api/schema to nebula-api/rest/schema, since nebula-api moved api/ to rest/, and adds an optional CHROME_PATH to .env.template.

Testing

Ran the full pipeline locally: ./api-tools -scrape -studyAbroad -headless, then ./api-tools -parse -studyAbroad. All 147 active programs scraped and parsed.
Note: 69 of the 147 programs have no nextAppCycleCostSheet. That's how Terradotta returns them, not a parser bug.

AI Disclosure

I used AI to come up with the code, and I am working on review the code. I made this MR, so others can see and give feedback.

Checklist

  • Create this PR
  • Perform final self-review

@NathanP9000
NathanP9000 requested review from a team as code owners October 21, 2026 02:33
Comment thread scrapers/schema.go

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think schema.go is a good name for this scraper. Rename it to studyAbroad.go or something intuitive.

@KBui4

KBui4 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Also, please remove the binary file for schema.

Comment thread utils/methods.go
chromedpCtx, cancelFnc = chromedp.NewContext(allocCtx)

// Detect browser path
chromePath := os.Getenv("CHROME_PATH")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this feature. chromedp already searches for chrome automatically.

Comment thread scrapers/schema.go
// records that describe them, to {outDir}/studyAbroad for the parser to combine.
// Set PROGRAM_IDS to a comma-separated list to scrape specific programs instead of discovering them all.
func ScrapeStudyAbroad(outDir string) {
programIDs, err := programIDsFromEnv(os.Getenv("PROGRAM_IDS"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of being an environment variable, make it an option to specify program IDs when running the scraper.

NathanP9000 and others added 3 commits October 25, 2026 22:48
nebula-api moved api/ to rest/ and the module is now github.com/UTDNebula/nebula-api.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scraper saves raw discovery records and brochures; parser merges them into schema.Program. Adds -studyAbroad for scrape and parse, and CHROME_PATH support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants