Skip to content

feat: add route to validate email if australian institute#255

Merged
amandazhuyilan merged 6 commits into
mainfrom
AAI-814-add-australian-institute-route
Apr 29, 2026
Merged

feat: add route to validate email if australian institute#255
amandazhuyilan merged 6 commits into
mainfrom
AAI-814-add-australian-institute-route

Conversation

@amandazhuyilan

@amandazhuyilan amandazhuyilan commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Description

AAI-814: Add route to check if email is an Australian institute, using the list maintained by Galaxy Australia.

Changes

  • Added GET /utils/register/check-australian-research-institution?email=<email> endpoint returning { "is_australian_research_institution": true/false }
  • Added services/institutions.py — delegates validation to Galaxy Australia's existing institution/validate API rather than maintaining a local domain list; returns false gracefully on any upstream error or timeout
  • Added tests in test_utils.py using respx to mock the Galaxy AU API: valid, invalid, upstream 500, upstream timeout, and missing query param

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have added unit / integration tests that prove my fix is effective or that my feature works
  • I have run all tests locally and they pass
  • I have updated the documentation (if applicable)
  • For any new secrets, I have updated the shared spreadsheet and the GitHub Secrets.

How to Test Manually (if necessary)

uv run pytest

@minh-biocommons minh-biocommons left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, just 1 small change requested

Comment thread routers/utils.py

@marius-mather marius-mather left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

good to go

@amandazhuyilan amandazhuyilan dismissed minh-biocommons’s stale review April 29, 2026 02:46

Seems like we are sticking with the register in the route to bypass with

@amandazhuyilan amandazhuyilan merged commit 3f0ad99 into main Apr 29, 2026
5 checks passed
@amandazhuyilan amandazhuyilan deleted the AAI-814-add-australian-institute-route branch April 29, 2026 02:46
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.

3 participants