Skip to content

Fix askQuery endpoint configuration #2632

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

egonw
Copy link
Collaborator

@egonw egonw commented Apr 27, 2025

Fixes #2629

Description

This patch adds the complementary askQuery2 method that uses the endpoint configuration data. Similar to the #2631 patch.

The askQuery() method is used in the macro defined in base.html and that macro is used in three aspects, together four times:

$ grep -ri "ask_query_callback" scholia
scholia/app/templates/work.html:{% call ask_query_callback('cito') %}
scholia/app/templates/work.html:{% call ask_query_callback('gallery') %}
scholia/app/templates/venue.html:{% call ask_query_callback('cito') %}
scholia/app/templates/author.html:{% call ask_query_callback('retractions') %}
scholia/app/templates/base.html:{% macro ask_query_callback(panel) -%}

Caveats

Check any of the following which apply:

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
    • I have made corresponding changes to the documentation
  • This change requires new dependencies (please list)

If you make changes to the Python code

  • My code passes the tox check, I can receive warnings about tests, documentation or both

Testing

Earlier the three aspects are listed that use the askQuery() functionality: work, venue, and author.

  • Test the three aspects.
    • For author test an author that has retractions
    • For venue and work, test the CiTO annotation
    • For work, test the "gallery" functonality

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have not used code from external sources without attribution
  • I have considered accessibility in my implementation
  • There are no remaining debug statements (print, console.log, ...)

@egonw egonw marked this pull request as ready for review April 27, 2025 09:05
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.

askQuery() has hardcoded endpoint URL
1 participant