dsp-api icon indicating copy to clipboard operation
dsp-api copied to clipboard

refactor: Use rdf for create value

Open seakayone opened this issue 1 year ago • 1 comments

  • Introduce KnoraApiValueModel
  • add creation date
  • add hasermission move code up the for comprehension
  • add hasPermission and move code up the for comprehension
  • cleanup
  • move jena related code to JenaOps
  • Introduce ValueIri
  • Introduce ResourceIri
  • Introduce ResourceClassIri
  • Introduce PropertyIri
  • add value type to KnoraApiValueModel
  • Introduce dedicated Jena Ops classes for Resource and Statement
  • *Add more ValueContentV2 parsing

Pull Request Checklist

Task Description/Number

Issue Number: DEV-

PR Type

  • [ ] build/chore: maintenance tasks (no production code change)
  • [ ] docs: documentation changes (no production code change)
  • [ ] feat: represents new features
  • [ ] fix: represents bug fixes
  • [ ] perf: performance improvements
  • [ ] refactor: represents production code refactoring
  • [ ] test: adding or refactoring tests (no production code change)
  • [ ] deprecated: Deprecation warning (ideally referencing a migration guide)

Basic requirements for bug fixes and features

  • [ ] Tests for the changes have been added
  • [ ] Docs have been added / updated

Does this PR introduce a breaking change?

  • [ ] Yes

seakayone avatar Oct 30 '24 13:10 seakayone

Codecov Report

Attention: Patch coverage is 76.53333% with 88 lines in your changes missing coverage. Please review.

Project coverage is 18.64%. Comparing base (6ebe8e7) to head (39e1817). Report is 120 commits behind head on main.

Files with missing lines Patch % Lines
...s/v2/responder/valuemessages/ValueMessagesV2.scala 88.59% 17 Missing :warning:
...webapi/slice/common/KnoraApiCreateValueModel.scala 81.70% 15 Missing :warning:
...cala/org/knora/webapi/slice/common/KnoraIris.scala 51.61% 15 Missing :warning:
.../org/knora/webapi/slice/common/jena/ModelOps.scala 66.66% 8 Missing :warning:
...nora/webapi/messages/util/CalendarDateUtilV2.scala 36.36% 7 Missing :warning:
...ora/webapi/responders/v2/StandoffResponderV2.scala 0.00% 6 Missing :warning:
...knora/webapi/responders/v2/ValuesResponderV2.scala 0.00% 6 Missing :warning:
.../knora/webapi/slice/common/jena/StatementOps.scala 88.46% 3 Missing :warning:
...esponder/ontologymessages/OntologyMessagesV2.scala 0.00% 2 Missing :warning:
...ponders/v2/resources/CreateResourceV2Handler.scala 0.00% 2 Missing :warning:
... and 7 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3410       +/-   ##
===========================================
- Coverage   83.04%   18.64%   -64.40%     
===========================================
  Files         290      309       +19     
  Lines       23087    23014       -73     
===========================================
- Hits        19172     4291    -14881     
- Misses       3915    18723    +14808     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 30 '24 14:10 codecov[bot]

@BalduinLandolt I do understand for your desire of having more "realistic" values in the tests. My goal was to have minimal test data in the newly created tests. The other more complicated cases are covered by the existing tests. I leave these values in the test as to demonstrate that these are valid values.

Should you think that those values are not valid we may want to follow up on that.

seakayone avatar Nov 05 '24 13:11 seakayone

@BalduinLandolt I do understand for your desire of having more "realistic" values in the tests. My goal was to have minimal test data in the newly created tests. The other more complicated cases are covered by the existing tests. I leave these values in the test as to demonstrate that these are valid values.

Should you think that those values are not valid we may want to follow up on that.

Fine by me, I'm not even sure we need to follow up on it. Thanks

BalduinLandolt avatar Nov 05 '24 14:11 BalduinLandolt