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

Small changes for better SPARQL debugging #499

Merged
merged 15 commits into from
Jul 19, 2024

Conversation

kmcginnes
Copy link
Collaborator

@kmcginnes kmcginnes commented Jul 18, 2024

Description

  • Move fetch summary logic to its own function in all 3 explorers
  • Make sure title wraps in edge style sidebar
  • Use dedent for all sparql queries
  • Add comments to the top of all sparql queries
  • Delete unused template
  • Update accept header for sparql (fixes some open data sets)
  • Add debug log level and fix params so it doesn't print empty array
  • Add query template logging at the debug level
  • Add logging for each fetch call
  • Use env.MODE to configure the values env.DEV and env.PROD
  • Fix debug logging on the server for static file hosting locations

Validation

  • Smoke test
  • Tested against the following for accept header change
    • https://id.nlm.nih.gov/mesh
    • Neptune 1.3.1
    • Neptune 1.3.2

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0
    license.
  • I have run pnpm checks to ensure code compiles and meets standards.
  • I have run pnpm test to check if all tests are passing.
  • I have covered new added functionality with unit tests if necessary.
  • I have added an entry in the Changelog.md.

@kmcginnes kmcginnes requested a review from vkagamlyk July 18, 2024 23:49
@kmcginnes kmcginnes marked this pull request as ready for review July 18, 2024 23:50
Copy link

codecov bot commented Jul 19, 2024

Codecov Report

Attention: Patch coverage is 7.14286% with 104 lines in your changes missing coverage. Please review.

Project coverage is 14.65%. Comparing base (b689f93) to head (fa75a59).
Report is 4 commits behind head on main.

Files Patch % Lines
...ph-explorer/src/connector/sparql/sparqlExplorer.ts 0.00% 31 Missing ⚠️
...rer/src/connector/openCypher/openCypherExplorer.ts 0.00% 27 Missing ⚠️
packages/graph-explorer/src/utils/logger.ts 21.42% 11 Missing ⚠️
...onnector/sparql/queries/fetchBlankNodeNeighbors.ts 0.00% 8 Missing ⚠️
...rer/src/connector/sparql/queries/fetchNeighbors.ts 0.00% 7 Missing ⚠️
...plorer/src/connector/sparql/queries/fetchSchema.ts 0.00% 6 Missing and 1 partial ⚠️
...r/src/connector/sparql/queries/fetchClassCounts.ts 0.00% 1 Missing and 1 partial ⚠️
...rc/connector/sparql/queries/fetchNeighborsCount.ts 0.00% 1 Missing and 1 partial ⚠️
...orer/src/connector/sparql/queries/keywordSearch.ts 0.00% 1 Missing and 1 partial ⚠️
...eywordSearch/keywordSearchBlankNodesIdsTemplate.ts 0.00% 1 Missing and 1 partial ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #499      +/-   ##
==========================================
- Coverage   15.06%   14.65%   -0.42%     
==========================================
  Files         420      396      -24     
  Lines       30449    20000   -10449     
  Branches      974      949      -25     
==========================================
- Hits         4586     2930    -1656     
+ Misses      25531    16802    -8729     
+ Partials      332      268      -64     
Flag Coverage Δ
unittests 14.65% <7.14%> (-0.42%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kmcginnes
Copy link
Collaborator Author

@vkagamlyk Fixed the logging issue. Ready for another review

@kmcginnes kmcginnes merged commit 9baf1f3 into aws:main Jul 19, 2024
1 check passed
@kmcginnes kmcginnes deleted the sparql-safe-changes branch July 19, 2024 16:39
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.

2 participants