WDscholia / scholia

Wikidata-based scholarly profiles
https://scholia.toolforge.org
Other
219 stars 78 forks source link

Add support for DOI to QuickStatements #2453

Closed carlinmack closed 5 months ago

carlinmack commented 6 months ago

Rebased version of #2340

If/when this is merged I will rebase the others :)

Description

Please include a summary of the change, relevant motivation and context. If possible and applicable, include before and after screenshots and a URL where the changes can be seen.

Introduces DOI to QuickStatements (using the Crossref API) resulting in renaming the tool to Identifier to QuickStatements.

image

Note that this does not affect the current /doi/[doi] tool which creates QuickStatements using Citations.js and has different behaviour.

Caveats

Please list anything which has been left out of this PR or which should be considered before this PR is accepted Check any of the following which apply:

If you make changes to the Python code

Testing

Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce. Please also list any relevant details for your test configuration.

Checklist

carlinmack commented 6 months ago

If you think the code could be better written, can you please save rewriting until we merge the three following PRs! it makes rebasing so much more complicated

fnielsen commented 6 months ago

I get a "NameError: name 'string_to_arxivs' is not defined" with copy and paste of "https://arxiv.org/abs/2403.19856" into the main search interface http://127.0.0.1:8100/search?q=https://arxiv.org/abs/2403.19856

fnielsen commented 6 months ago

This http://127.0.0.1:8100/search?q=ilbert,%20S.,%20Fiesler,%20C.%20&%20Zimmer,%20M.%20Soc.%20Media%20Soc.%20https://doi.org/10.1177/20563051211019004%20(2021). results in the same error.

fnielsen commented 6 months ago

I often just copy-and-paste, e.g., "https://arxiv.org/abs/2403.19856" or part of a DOI, e.g., "org/10.1038/d41586-024-00901-3". As far as I can tell that functionality is lost.

fnielsen commented 6 months ago

There is lost of flake8 errors with flake8 scholia

carlinmack commented 5 months ago

This PR doesn't do anything to the main search interface: I am simply modifying the arxiv to quickstatements tool to be [doi, arxiv] to quickstatements. Therefore I don't really have an answer to your issues you raise

carlinmack commented 5 months ago

Besides from the regex issue this is now ready for review again, the identifier to quickstatement tool handles all the query strings you have mentioned

fnielsen commented 5 months ago

There is a crash with the following query:

http://127.0.0.1:8100/id-to-quickstatements?query=Zhang%2C+R.%2C+Madumal%2C+P.%2C+Miller%2C+T.%2C+Ehinger%2C+K.A.%2C+Rubinstein%2C+B.I.%3A+Invertible+concept-based+explanations+for+cnn+models+with+non-negative+concept+activation+vectors.+In%3A+Proceedings+of+the+AAAI+Conference+on+Artificial+Intelligence.+vol.+35%2C+pp.+11682%E2%80%9311690+%282021%29.+https%3A%2F%2Fdoi.org%2F10.1609%2Faaai.v35i13.17389

fnielsen commented 5 months ago

I have merge this PR, and then but in this bug: #2459

fnielsen commented 5 months ago

One more error: https://github.com/WDscholia/scholia/issues/2460

fnielsen commented 5 months ago

One of the errors are not closed by https://github.com/WDscholia/scholia/pull/2461

fnielsen commented 5 months ago

Third error with this PR: https://github.com/WDscholia/scholia/issues/2462

fnielsen commented 5 months ago

Fourth problem: https://github.com/WDscholia/scholia/issues/2463

fnielsen commented 5 months ago

Fifth problem: https://github.com/WDscholia/scholia/issues/2464