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 support for showDeprecated parameter in hierarchy queries; touche… #1173

Draft
wants to merge 1 commit into
base: skosmos-2
Choose a base branch
from

Conversation

kouralex
Copy link
Contributor

…s #1143

This draft PR brings support for showDeprecated parameter in multiple hierarchy-related queries. However, implementing this has proven to be a bit difficult and this PR is not yet ready. There seems to be quite a bit of different cases involved and,, thus, open, questions, e.g.,

  • Deprecated concept (attached to hierarchy) is opened, what to do with hierarchy? E.g., https://finto.fi/juho/fi/page/p4304
    -- Show it normally
    -- Show the hierarchy 'till the opened deprecated concept (this is what this draft PR is doing)
    -- Only show the deprecated concept (and maybe it's non-deprecated children?)
    -- Previous one combined with "base" hierarchy
    -- Something else, what?

  • If a concept lies below a deprecated one, what to do with hierarchy? E.g., https://finto.fi/juho/fi/page/p5875
    -- Show the whole tree without deprecated ones ("jumping" over deprecated ones)
    -- Only show the hierarchy 'till there is non-deprecated concepts (current implementation, additionally, breadcrumbs halt at the very same non-deprecated concept)
    -- Somethings else, what?

  • Deprecated sub-tree
    -- Show that part, if one of those is chosen?

Requires tests for each of the ones above, both live and PHPUnit. One must pay attention that changing some functions here may affect the input of other queries, too (e.g., queryTransitiveProperty).

Other questions:

  • Configurable via REST?
  • Utilization of dct:isReplacedBy - direct replacement?

Additional note: after playing a bit back and forth, it seems like it could be possible to just return the states of concepts (whether a concept is deprecated or not) and from there, adjust the hierarchy in either JavaScript or in the transform* function. This would simplify the required code quite a bit compared to what it would have to be - e.g., the deprecatedClauses in files changed may not be complete in many cases. E.g., skipping deprecated broader concepts in hierarchy in cases of non-deprecated subconcepts is not a very easy feat to do directly in SPARQL.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@joelit joelit added this to the 2.11 milestone Jun 2, 2021
@joelit joelit modified the milestones: 2.11, 2.12 Jun 2, 2021
@osma osma removed this from the 2.12 milestone Oct 6, 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