fix(metadata): encode multi-word Scopus queries#5
Conversation
Encode main and special Scopus query terms after converting spaces to AND for multi-word keyword handling.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Hi @WilmerGaspar, thanks for working on the issue! I recommend a modification to ensure multi-word
Could you extend the PR to cover these cases too, so the fix handles the entire space handling, not just the Scopus search? |
|
Thanks, Aritra. I extended the PR to cover the workflow-wide space handling more consistently. The update now:
I also reviewed the article processor path. From what I saw, Please let me know if you’d prefer any part handled differently. |
|
Hi @WilmerGaspar, sorry for the delay in replying. Got stuck with some other work. Yeah. You were right about the However, the tests are failing due to wrong indentation in the scripts. Maybe due to the GitHub web editor, both scripts now have indentation issues in the following functions:
|
|
No problem at all, Aritra. I completely understand. Thanks for taking the time to review it. It’s a pleasure to help with the project. I corrected the indentation issues in |
|
Hi @WilmerGaspar, The indentation error is still there for the Current code:class ComProScanner:
def __init__(self, main_property_keyword: str = None):
if main_property_keyword is None:
raise ValueErrorHandler(
"Please provide a main property keyword to proceed."
)
self.main_property_keyword = main_property_keyword.replace(" ", "_")
self.main_property_search_keyword = self.main_property_keyword.replace("_", " ")Should be: class ComProScanner:
def __init__(self, main_property_keyword: str = None):
if main_property_keyword is None:
raise ValueErrorHandler(
"Please provide a main property keyword to proceed."
)
self.main_property_keyword = main_property_keyword.replace(" ", "_")
self.main_property_search_keyword = self.main_property_keyword.replace("_", " ") |
|
Thanks again, Aritra. I also corrected the indentation in |
|
Hi @WilmerGaspar, the test is failing again with an Reason: |
This PR improves Scopus metadata URL construction for multi-word query terms.
Changes:
queryandspecial_queryusingurllib.parse.quote.ANDbefore URL encoding to make multi-word searches more explicit.Testing:
Related issue: