Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic PI identification #112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Automatic PI identification #112

wants to merge 1 commit into from

Conversation

cc-a
Copy link
Collaborator

@cc-a cc-a commented Jan 23, 2025

Description

A port of the PI identification logic from the old portal. At the moment this is a single function in the policy module (and tests) that will be used in later PRs.

Fixes #65

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. python -m sphinx -b html docs docs/build)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

Copy link
Contributor

@jamesturner246 jamesturner246 left a comment

Choose a reason for hiding this comment

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

Are these categories, and the others in here, relatively constant, or does any of it rely on manual entry? Seems a little on the fragile side if so. A shame they can't just all be precomputed as extra graph API parameters, but 'spose that is what's been given..

"Estates Division",
]
PI_ALLOWED_TITLES = ["Fellow", "Lecturer", "Chair", "Professor", "Reader", "Director"]
PI_DISALLOWED_TITLE_QUALIFIERS = ["Visiting", "Emeritus", "Honorary"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Visiting profs can't be PIs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only if they ask nicely.

@cc-a
Copy link
Collaborator Author

cc-a commented Jan 29, 2025

Are these categories, and the others in here, relatively constant, or does any of it rely on manual entry? Seems a little on the fragile side if so. A shame they can't just all be precomputed as extra graph API parameters, but 'spose that is what's been given..

All the data ultimately comes from Imperial's source of truth on identity data. We ultimately have to trust that that data is accurate. Reports from the platforms team are that this logic has been sufficiently robust for them so far.

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.

Implement PI Identification Logic
2 participants