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

Add WikiProject aspect #2289

Merged
merged 9 commits into from
Jun 30, 2023
Merged

Conversation

carlinmack
Copy link
Collaborator

@carlinmack carlinmack commented Jun 15, 2023

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.

Created a new aspect for WikiProjects. Has panels for items maintained by the WikiProject and items on the focus list of the WikiProject

image

I have also added a new function get_prop_value to query.py, which for a given QID and property, returns the value of the (Q, property, value) (where the value is also a QID. This is used to return the main subject.

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:

  • 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

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.

image

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, ...)

CC @Daniel-Mietchen

@carlinmack
Copy link
Collaborator Author

Will consider adding panels suggested here #1853

@Daniel-Mietchen
Copy link
Member

Will consider adding panels suggested here #1853

Yes, please do. Note that the second panel would give better results for P6104 instead of P5008, as per this comment.

@carlinmack
Copy link
Collaborator Author

Daniel, if you look at the image you will see that I already use both P6104 and P5008 :)

@carlinmack
Copy link
Collaborator Author

carlinmack commented Jun 15, 2023

Once Shex schemas are queryable via SPARQL (coming soon) I'll try add a panel which shows the coverage of the schema properties for the relevant items.

@carlinmack
Copy link
Collaborator Author

Added panels from a selection of the panels of the topic aspect:

image
image

scholia/query.py Outdated Show resolved Hide resolved
@carlinmack
Copy link
Collaborator Author

Had a call with Daniel where we worked on this aspect and he suggested using P6104/P5008 maintained by/focus list rather than getting the P921 main subject for the item. I think I'll remove get_prop_val in this case

@fnielsen
Copy link
Collaborator

Let me know when you are finished.

@carlinmack
Copy link
Collaborator Author

Removed the unused function, now ready to merge :) @fnielsen

@fnielsen fnielsen merged commit 59db86c into WDscholia:master Jun 30, 2023
4 checks passed
@fnielsen
Copy link
Collaborator

https://scholia.toolforge.org/wikiproject/Q56241615

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