Skip to content
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

check and externalize explicit sparql queries #1284 #1487

Merged
merged 31 commits into from
Jul 28, 2021

Conversation

curibe
Copy link
Collaborator

@curibe curibe commented Jul 7, 2021

related #1283, #1282, #785

Externalize explicit sparql queries

Converting the explicit queries (tables) first to externalized query format. For example, files who have the following queries:

somePanelDescriptionSparql = `
SELECT ...
...
`

This PR solves partially the issue #1284.

The following files still have explicit queries:

  • 404_chemical.html
  • author.html
  • author-index-curation.html
  • authors.html
  • award_curation.html
  • chemical-index-curation.html
  • chemical-index.html
  • lexeme_empty.html
  • pathway_empty.html
  • pathway.html
  • property.html
  • software_empty.html
  • topic_curation.html
  • use_empty.html
  • use.html
  • venue_curation.html
  • venues.html
  • work_cito.html
  • work_empty.html
  • works.html

Some annotations

  • Files with empty will use the aspect as index but the name of html file will be the same for the moment. For example,
    use_empty.html have an aspect named use-index. The name of these html will be change in other PR
  • Externalization for author.html, pathway.html and 404_chemical.html required the creation of new macros and custom JS functions for extracting queries to external .sparql files

@fnielsen
Copy link
Collaborator

fnielsen commented Jul 8, 2021

Sorry, about the name pattern of the files not being clear. It should be aspect_panel-description, e.g., {% set aspect = "chemical-index" %}. This is confusingly used. So the file is chemical-index_statistics.sparql

@fnielsen
Copy link
Collaborator

fnielsen commented Jul 8, 2021

venues are named fine!

@fnielsen
Copy link
Collaborator

fnielsen commented Jul 8, 2021

Files called "empty" should be "index" instead, e.g., "work-index" and "pathway-index". Sorry again

@fnielsen
Copy link
Collaborator

fnielsen commented Jul 8, 2021

award_curation -> award-curation

@curibe
Copy link
Collaborator Author

curibe commented Jul 9, 2021

award_curation -> award-curation

@fnielsen In this case the html is called "award_curation.html". Do I still assign it in aspect as "award-curation"? no matter if the html file uses "_" or "-"?

@curibe
Copy link
Collaborator Author

curibe commented Jul 9, 2021

Files called "empty" should be "index" instead, e.g., "work-index" and "pathway-index". Sorry again

@fnielsen Do you want to change the name only in the {%set aspect=....%} or also the html name?

@fnielsen
Copy link
Collaborator

award_curation -> award-curation

@fnielsen In this case the html is called "award_curation.html". Do I still assign it in aspect as "award-curation"? no matter if the html file uses "_" or "-"?

All HTML and sparql files should be called with a dash instead of an underscore

@curibe
Copy link
Collaborator Author

curibe commented Jul 13, 2021

@fnielsen please, could you check this commit 4548191? A new macro was implemented together with JS functions in scholia.js

@curibe curibe force-pushed the check-sparql-externalize-1284 branch from 11c7148 to 4548191 Compare July 14, 2021 16:39
@curibe
Copy link
Collaborator Author

curibe commented Jul 14, 2021

@fnielsen do you also require this caption here?
image

@curibe curibe changed the title [WIP] check and externalize sparql queries #1284 [WIP] check and externalize explicit sparql queries #1284 Jul 14, 2021
@curibe curibe changed the title [WIP] check and externalize explicit sparql queries #1284 check and externalize explicit sparql queries #1284 Jul 15, 2021
@curibe curibe force-pushed the check-sparql-externalize-1284 branch from e83cb81 to 92abc8b Compare July 16, 2021 21:39
@fnielsen
Copy link
Collaborator

@fnielsen do you also require this caption here?

I am not sure what you mean?

@curibe
Copy link
Collaborator Author

curibe commented Jul 26, 2021

@fnielsen do you also require this caption here?

I am not sure what you mean?

I refer to the caption shown in the red box. The function that shows the diagram does not a code implemented to display the
link, but another caption (below-left in the image : This diagram is showing... ):
https://scholia.toolforge.org/pathway/Q28031254
image

I put it to keep the format as the other externalizations. You can see the changes in this commit: a37c600
The caption was added here:
image
And It looks like this:
image

@fnielsen
Copy link
Collaborator

No a caption there is not necessary, I think. The rendering does not come from Wikimedia services, but from a thirdparty service, available at https://pathway-viewer.toolforge.org/?id=WP111 . I do not think they construct the visualization with SPARQL.

@curibe curibe force-pushed the check-sparql-externalize-1284 branch from 92abc8b to ded489f Compare July 28, 2021 18:23
@fnielsen fnielsen merged commit 7998b9c into WDscholia:master Jul 28, 2021
@fnielsen
Copy link
Collaborator

fnielsen commented Jul 28, 2021

@curibe curibe mentioned this pull request Jul 30, 2021
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