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

Add custom decision options #2115

Merged
merged 13 commits into from
May 6, 2024
Merged

Add custom decision options #2115

merged 13 commits into from
May 6, 2024

Conversation

enrubio
Copy link
Member

@enrubio enrubio commented Apr 26, 2024

Allows custom decision options. Tests still need to be added here.

Adds accept_decision_options to request form. If accept_decision_options is empty, we check for the 'Accept' substring in decisions to mark accepted papers. If accept_decision_options is populated, we use those values to mark accepted papers.

@melisabok
Copy link
Member

Thanks for pushing the code, my recommendation is always starting with the test and then the implementation. This is known as TDD (test development driven) and let you build the feature while you are running it.

  1. Start the decision stage for a venue where the decision options don't contain Accept.
  2. Expect accepted papers to be marked as accepted with venueid == venue group.id

From that you start making the changes.

@melisabok melisabok marked this pull request as ready for review May 1, 2024 13:37
if decision:
venue += ' ' + decision.strip()
elif accept_options and decision_option in accept_options:
venue += ' ' + decision.strip()
Copy link
Member

Choose a reason for hiding this comment

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

I think we always should replace Accept right? Some of the accept_options might have the word Accept and we should treat those the same way we used to.

Copy link
Member

Choose a reason for hiding this comment

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

☝️

Copy link
Member

Choose a reason for hiding this comment

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

It looks like with this approach, we are doing a combination of checking for 'Accept' and using accept_decision_options?
For example, if I have an option Accept (Oral) in the decision_options, but not in accept_decision_options, it is still treated as an accept?
Not sure if this approach is right or wrong, but want to double check this is the desired behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, basically we only check for "Accept" if accept_decision_options is empty. This is to make it backwards compatible and not let API 1 tests fail and have to make lots of changes

Copy link
Member

Choose a reason for hiding this comment

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

That's correct and that is what is implemented now.

if accept_decision_options then check if decision is in option then marked as accept
else if 'Accept' is in decision then marked as accept

We need to reflect that in the documentation. Correct me if I'm wrong.

Copy link
Member

Choose a reason for hiding this comment

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

ok! I thought this should be the behavior, but from what I see here we are always checking if the decision has 'Accept', regardless of if we have accept_decision_options or not.

Just to be clear @melisabok: a decision of Accept (Oral) that was not specified in accept_decision_options should not be treated as an accept, assuming accept_decision_options is non-empty, correct?

Copy link
Member

Choose a reason for hiding this comment

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

yes, accept_decision_options overwrites the "Accept" string rule.

you are right, the tools implementation should check the accept_decision_options first and then the string rule like in other parts of the code. Emilia could you change it?

'value-regex': '.*',
'order': 30
},
'make_decisions_public': {'description': 'Should the decisions be made public immediately upon posting? Default is "No, decisions should NOT be revealed publicly when they are posted".',
'accept_decision_options': {
'description': 'What are the accept decision options? If your accept options do not contain "Accept", please specify them here. Provide comma separated values, e.g. "Accept (Best Paper), Invite to Archive".',
Copy link
Member

Choose a reason for hiding this comment

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

I know there is an example, but the wording of

If your accept options do not contain "Accept", please specify them here.

makes it sound like PCs should only specify those accept options that do not contain the word Accept, and it could be confusing.

Maybe something like:

What are the accept decision options? Please specify all decision options that signify acceptance to the venue. Any decision option not specified here will be treated as a rejection.

@@ -360,7 +360,8 @@ def test_publication_chair(self, client, openreview_client, helpers):
content={
'decision_start_date': start_date.strftime('%Y/%m/%d'),
'decision_deadline': due_date.strftime('%Y/%m/%d'),
'decision_options': 'Accept, Reject',
'decision_options': 'Invite to Venue, Reject',
Copy link
Member

Choose a reason for hiding this comment

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

Can you add an option Accept here and as an accept_decision_option? Also, could you add a check for what the venue value should be for every decision option?

Copy link
Member

Choose a reason for hiding this comment

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

Also, it looks like the homepage is not showing the tab 'Invite to Venue' with the accepted papers. I think there is a get_decision_heading_map() function in helpers that you need to edit. Could you also add this to the test? There is an example here:

request_page(selenium, 'http://localhost:3030/group?id=aclweb.org/ACL/ARR/2023/August', None, wait_for_element='header')

@enrubio
Copy link
Member Author

enrubio commented May 2, 2024

I'm unable to get the homepage tab tests working, no idea why. They show up in the browser. I've tried both selenium.find_element(By.CLASS_NAME, 'nav-tabs').find_elements(By.TAG_NAME, 'li') and selenium.find_element(By.CLASS_NAME, 'tabs-container') and neither give the correct tabs.

@melisabok
Copy link
Member

I can take a look, just to confirm is the same test that is failing in circleci? tests.test_workshop_v2.TestWorkshopV2

tests/test_workshop_v2.py Outdated Show resolved Hide resolved
Comment on lines 717 to 721
'decision_options': {
'description': 'What are the decision options (provide comma separated values, e.g. Accept (Best Paper), Accept, Reject)? Leave empty for default options - "Accept (Oral)", "Accept (Poster)", "Reject"',
'description': 'List all decision options. By default, decisions containing "Accept" signify acceptance to the venue. Otherwise, please specify the accept options in "Accept Decision Options". All other decisions will be treated as a rejection. Provide comma separated values, e.g. "Accept (Best Paper), Invite to Archive, Reject". Leave empty for default options - "Accept (Oral)", "Accept (Poster)", "Reject"',
'value-regex': '.*',
'order': 30
},
Copy link
Member Author

Choose a reason for hiding this comment

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

What do you think about changing the description to just:

List all decision options. Provide comma separated values, e.g. "Accept (Best Paper), Invite to Archive, Reject". Leave empty for default options - "Accept (Oral)", "Accept (Poster)", "Reject"

I'm worried it's too confusing and PCs would fill out the fields incorrectly. For example, if "Accept" and "Invite to Archive" are considered accept options, they may just put "Invite to Archive" in accept_decision_options. I think this would cause even "Accept" papers to be rejected since it's not listed as an accept option. We could also add to the accept_decision_options description something like:

Leaving this empty will treat only decisions with "Accept" as accepted.

Copy link
Member

Choose a reason for hiding this comment

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

can we make the field mandatory and have a default value?

Copy link
Member

Choose a reason for hiding this comment

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

We do use ['Accept (Oral)', 'Accept (Poster)', 'Reject'] as the default options in the request form if they leave the field empty. Do you want this value to be added to the request form?

Copy link
Member

Choose a reason for hiding this comment

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

yes, I think it is more clear for the users to know which are the default options how they can edit them.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I think with the simplified description we don't need to make the fields required. I fixed it and added the default value. I think it's much better now.

decision = decision_option.replace('Accept', '')
decision = re.sub(r'[()\W]+', '', decision)
if decision:
decision = re.sub(r'[()\W]+', '', decision_option)
Copy link
Member

Choose a reason for hiding this comment

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

I think this can be inside the if, right?

Copy link
Member

Choose a reason for hiding this comment

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

it seems the condition if (not accept_options and 'Accept' in decision_option) or (accept_options and decision_option in accept_options) is used in several places, can we create a tools function that we use from the venue class, process function and this function too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes that would be great, updated to add the tools function

Copy link
Member

@celestemartinez celestemartinez left a comment

Choose a reason for hiding this comment

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

Looks great!

@melisabok melisabok merged commit 3e3a54f into master May 6, 2024
1 check passed
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.

Venue: decision stage should let the PCs decide which decision options are representing an acceptance
3 participants