hash icon indicating copy to clipboard operation
hash copied to clipboard

H-162, BP-74, BP-89: Simplify type-system definitions

Open TimDiekmann opened this issue 1 year ago • 1 comments

🌟 What is the purpose of this PR?

Various improvements around the type-system crate

🔍 What does this change?

  • Rename Array to ArraySchema, Object to ObjectSchema, and OneOf to OneOfSchema
  • Simplifies usage of ontology types in Rust (making the fields public)
  • Remove link ordering - for real this time
  • Fix the oneOf type
  • Omit oneOf and AllOf if empty
  • Simplify Tsify definitions as they are not needed anymore

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • [x] does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • [x] are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • [x] do not affect the execution graph

TimDiekmann avatar Jun 28 '24 11:06 TimDiekmann

Codecov Report

Attention: Patch coverage is 5.55556% with 17 lines in your changes missing coverage. Please review.

Project coverage is 20.26%. Comparing base (64b13dd) to head (300f55d).

Files Patch % Lines
...@local/hash-isomorphic-utils/src/ontology-types.ts 0.00% 7 Missing :warning:
...ogy-types/util/upgrade-entity-type-dependencies.ts 0.00% 5 Missing :warning:
...raph-is-initialized/migrate-ontology-types/util.ts 0.00% 3 Missing :warning:
...blockprotocol/type-system/typescript/src/common.ts 50.00% 1 Missing :warning:
...l/type-system/typescript/src/native/entity-type.ts 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4654      +/-   ##
==========================================
- Coverage   20.28%   20.26%   -0.03%     
==========================================
  Files         456      456              
  Lines       15657    15678      +21     
  Branches     2372     2377       +5     
==========================================
+ Hits         3176     3177       +1     
- Misses      12440    12460      +20     
  Partials       41       41              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.53% <ø> (ø)
apps.hash-api 0.00% <0.00%> (ø)
blockprotocol.type-system 47.41% <33.33%> (+0.04%) :arrow_up:
local.hash-backend-utils 4.26% <ø> (-0.01%) :arrow_down:
local.hash-isomorphic-utils 0.00% <0.00%> (ø)
local.hash-subgraph 24.87% <ø> (ø)

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

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

codecov[bot] avatar Jun 28 '24 11:06 codecov[bot]