Skip to content

fix(metadata): encode multi-word Scopus queries#5

Open
WilmerGaspar wants to merge 1 commit into
slimeslab:mainfrom
WilmerGaspar:fix/multi-word-keyword-handling
Open

fix(metadata): encode multi-word Scopus queries#5
WilmerGaspar wants to merge 1 commit into
slimeslab:mainfrom
WilmerGaspar:fix/multi-word-keyword-handling

Conversation

@WilmerGaspar

Copy link
Copy Markdown

This PR improves Scopus metadata URL construction for multi-word query terms.

Changes:

  • Encodes query and special_query using urllib.parse.quote.
  • Converts spaces into AND before URL encoding to make multi-word searches more explicit.
  • Keeps the change focused on the metadata query-construction path.

Testing:

  • Not run locally. This change was prepared through the GitHub web editor.

Related issue:

Encode main and special Scopus query terms after converting spaces to AND for multi-word keyword handling.
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@aritraroy24

Copy link
Copy Markdown
Member

Hi @WilmerGaspar, thanks for working on the issue!

I recommend a modification to ensure multi-word main_keyword handling throughout the entire workflow, not just in the Scopus query. As we discussed in #4, except for the less accurate Scopus search, nothing will break. However, replacing the space with _ right after receiving the keyword gives us a uniform approach for file/table naming, which is cleaner from a scripting perspective. We can then replace _ back with a space wherever the original form is needed:

  • Scopus search
  • article collection regex matching
  • data extraction query

Could you extend the PR to cover these cases too, so the fix handles the entire space handling, not just the Scopus search?

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.

3 participants