-
Notifications
You must be signed in to change notification settings - Fork 27
Add venue profile validation for invite assignment #2572
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
base: master
Are you sure you want to change the base?
Conversation
@@ -27,6 +28,53 @@ async function process(client, edge, invitation) { | |||
const profiles = await client.tools.getProfiles([edge.tail], true) | |||
const userProfile = profiles[0] | |||
|
|||
// Check for complete profile, if no profile then go to pending sign up | |||
if (profileReqs && !userProfile.id.includes('@')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can move this code to the tools.py so it can be used from the preprocess and the cron job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok! I can move it. To allow this JS preprocess to use it, should it get added here?: https://github.com/openreview/openreview-js/blob/8c7cd7f370459391a9cb4cc416223a386c287c6b/packages/client/src/tools.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you check by profile id instead of email address like userProfile.id.startswith("~")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move this to the tools.py so the process function is not so large.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this is a JS preprocess so it would need to go in the JS version. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, let's do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been moved to tools.js: openreview/openreview-js#72
|
||
// If checking publications, filter notes for pdate | ||
if (pathItems[pathItems.length - 1] === 'publications') { | ||
actualValue = actualValue.filter(pub => pub.hasOwnProperty('pdate')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to check if the publications are public too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, like the expertise does. When we compute conflicts do/should we only look at public published publications? I was thinking we add a filter based on what info we use for conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked with Melisa - decided to remove filter on publications and rely on client permissions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds and enforces a new setting (invited_reviewer_profile_minimum_requirements) to validate reviewer profiles before invitation assignment, ensuring that only profiles meeting venue‐specific minimum criteria are accepted.
- Updated tests in test_cvpr_conference_v2.py to verify profile validation logic in invite assignments.
- Modified openreview/venue/venue.py and openreview/venue/process/invite_assignment_pre_process.js to incorporate profile completeness checks and send notifications accordingly.
- Propagated the new setting into group and conference helper files to support its configuration and use.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tests/test_cvpr_conference_v2.py | Added new test for invite assignment profile requirements and validations. |
openreview/venue/venue.py | Updated check_new_profiles to validate profiles based on new requirements and send notifications. |
openreview/venue/process/invite_assignment_pre_process.js | Integrated profile completeness check in invite assignment preprocess. |
openreview/venue/group.py | Propagated the new invited_reviewer_profile_minimum_requirements setting into group content. |
openreview/conference/helpers.py | Updated venue configuration to load the new profile requirements setting. |
Comments suppressed due to low confidence (1)
tests/test_cvpr_conference_v2.py:1524
- Consider replacing the use of time.sleep(5) with a more robust waiting mechanism (e.g., using helpers.await_queue_edit) to reliably wait for asynchronous updates and reduce test flakiness.
time.sleep(5)
is_incomplete = True | ||
break | ||
else: | ||
print(f'Invalid path: {profile_path}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of simply printing 'Invalid path', consider using a logging framework or raising a controlled warning so that unexpected data types in the profile requirements are properly tracked and can be handled or debugged more systematically.
Copilot uses AI. Check for mistakes.
@@ -27,6 +28,11 @@ async function process(client, edge, invitation) { | |||
const profiles = await client.tools.getProfiles([edge.tail], true) | |||
const userProfile = profiles[0] | |||
|
|||
// Check for complete profile, if no profile then go to pending sign up | |||
if (!client.tools.isProfileComplete(userProfile, profileReqs)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if profileReqs is empty?
@@ -1474,29 +1488,35 @@ def mark_as_accepted(venue_group, edge, submission, user_profile, invite_assignm | |||
active_venues = client.get_group('active_venues').members | |||
|
|||
for venue_id in active_venues: | |||
# Create new client for each venue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool!
venue_client.post_edge(invitation_edge) | ||
|
||
## Check venue profile requirements | ||
min_requirements = venue_group.content.get('invited_reviewer_profile_minimum_requirements', {}).get('value') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move this code to tools.py?
This PR adds a new setting for the venue group content (
invited_reviewer_profile_minimum_requirements
) that allows venues to define profile requirements when inviting reviewers. Validation is added to the check_new_profiles cron job and to the invite assignment preprocess. Example of setting:The keys in the value should be the path to the field in the profile. So if it's
content.relations
we'll look atprofile.content.relations
and if it'sactive
we'll look atprofile.active
.Currently we only expect the values to be an integer (to check for number of entries in history, relations, publications etc.) or a boolean (check if certain links exist in the profile).
If a user was invited, is in Pending Sign Up, and still has an incomplete profile, that user will stay in Pending Sign Up and receive email reminders each day until they complete their profile.