Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions openreview/arr/arr.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,31 @@ def get_submissions(self, venueid=None, accepted=False, sort=None, details=None)
def expire_invitation(self, invitation_id):
return self.venue.expire_invitation(invitation_id)

def prune_active_arr_venues(self, keep_count=2):
active_venues = self.client.get_group('active_venues')
arr_venues = []

for venue_id in active_venues.members or []:
if not venue_id.startswith('aclweb.org/ACL/ARR'):
continue

venue_group = tools.get_group(self.client, venue_id)
if venue_group is None:
continue
venue_cdate = venue_group.cdate
arr_venues.append((venue_cdate, venue_id == self.venue_id, venue_id))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the purpose of saving venue_id == self.venue_id?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

to know if that venue is the current cycle?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yes, I thought so, but I guess I don't see it being used anywhere. Maybe I am missing something


if len(arr_venues) <= keep_count:
return

arr_venues.sort(reverse=True)
stale_venue_ids = [venue_id for _, _, venue_id in arr_venues[keep_count:]]
Comment thread
haroldrubio marked this conversation as resolved.
Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@celestemartinez here we should filter out the current cycle.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I can make the change to do it more explicitly

if stale_venue_ids:
self.client.remove_members_from_group(active_venues.id, stale_venue_ids)

def setup(self, program_chair_ids=[], publication_chairs_ids=[]):
setup_value = self.venue.setup(program_chair_ids, publication_chairs_ids)
self.prune_active_arr_venues()

setup_arr_invitations(self.invitation_builder)

Expand Down
28 changes: 28 additions & 0 deletions tests/test_arr_venue_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,21 @@ def test_august_cycle(self, client, openreview_client, helpers, test_client, req

helpers.await_queue()

stale_arr_venues = [
'aclweb.org/ACL/ARR/2022/December',
'aclweb.org/ACL/ARR/2023/April'
]
for venue_id in stale_arr_venues:
client.post_group(openreview.Group(
id=venue_id,
readers=['everyone'],
writers=[venue_id],
signatures=['~Super_User1'],
signatories=[venue_id],
members=[]
))
openreview_client.add_members_to_group('active_venues', venue_id)

# Post a deploy note
august_deploy_edit = client.post_note(openreview.Note(
content={'venue_id': 'aclweb.org/ACL/ARR/2023/August'},
Expand All @@ -238,6 +253,19 @@ def test_august_cycle(self, client, openreview_client, helpers, test_client, req

helpers.await_queue_edit(client, invitation='openreview.net/Support/-/Request{}/Deploy'.format(request_form_note.number))

active_venues = openreview_client.get_group('active_venues')
arr_active_venues = {
venue_id for venue_id in active_venues.members
if venue_id.startswith('aclweb.org/ACL/ARR')
}
assert arr_active_venues == {
'aclweb.org/ACL/ARR/2023/August',
'aclweb.org/ACL/ARR/2023/April'
}
assert 'aclweb.org/ACL/ARR/2023/August' in active_venues.members
assert 'aclweb.org/ACL/ARR/2023/April' in active_venues.members
assert 'aclweb.org/ACL/ARR/2022/December' not in active_venues.members

group = openreview_client.get_group('aclweb.org/ACL/ARR/2023/August')
assert group
assert 'submission_assignment_max_reviewers' not in group.content
Expand Down