-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix: Commitments: improve regex and preprocess #2138
Conversation
@@ -119,7 +119,7 @@ def test_create_conference(self, client, openreview_client, helpers): | |||
'value': { | |||
'param': { | |||
'type': 'string', | |||
'regex': '(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)', | |||
'regex': 'https:\/\/openreview\.net\/forum\?id=.*', |
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.
could you add a test trying to post a note using the urls:
https://openreview.net/pdf?id=1234
https://openreview.net/forum?id=1234&referrer=[Author Console](/group?id=ICML.cc/2024/Conference/Authors)
https://openreview.net/forum?id=1234&replyto=4567
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.
@celestemartinez could you add these tests cases?
@celestemartinez what is the status of this PR? |
@celestemartinez could you also fix this issue that is related to this one? |
@melisabok This should be ready for review. I added another check if submission.id != submission.forum |
Thanks Celeste, can you add the same validation to the ARR venues? or it is the same code? |
@celestemartinez please try to update this PR so we can merge it soon, thanks. |
What do you mean enable it for ARR venues? |
The ARR cycles have a field called "previous_url" where the validation is the same for ARR commitment venues. There is an open issue here: #2104 Could you make the same fix you are doing here for the ARR commitment venues for ARR class too? Also please add these test cases: #2138 (comment) |
@melisabok @haroldrubio sorry! I didn't realize this was also an ARR-specific issue. I have made the fix for ARR and added the tests. Let me know if I missed something! |
Thanks for the changes Celeste, there is one more case that I would like to test:
when 1234 is a valid ARR note, I think in this case the validation will pass but it will be very difficult to parse this value when migrating data so I would like the users to enter the url like https://openreview.net/forum?id=1234 with no other parameters. Is it possible to describe this in the regex? I think instead of using .* we can see any character with the exception of the &, could you try that? |
If they enter this URL, the preprocess should fail with I had previously tried having a more specific regex but I couldn't get it to work. I can try again. |
ohhh I see, because you are splitting by Got it, I wonder if we should say in the message the url must not have extra parameters |
I added another check, if the paper link contains '&' then we show a more descriptive error. |
|
||
if arr_submission_v1 and 'aclweb.org/ACL/ARR' in arr_submission_v1.invitation and not arr_submission_v1.invitation.endswith('Blind_Submission'): | ||
raise openreview.OpenReviewException('Provided paper link does not point to a blind submission') |
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 think the authors will know what a blind submission is, do you think we should add instructions on how to get the right link?
But it might be too much for an error message
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.
Fixed.
Fixes #2136
I tried multiple regexes to make sure authors don't add
¬eId=xxx
after the forum id, but none seemed to work. Instead, I take care of this in the preprocess.