Skip to content

Support for hidden cubes#1485

Open
mchlrch wants to merge 10 commits intomasterfrom
feature/hidden-graph
Open

Support for hidden cubes#1485
mchlrch wants to merge 10 commits intomasterfrom
feature/hidden-graph

Conversation

@mchlrch
Copy link
Copy Markdown
Member

@mchlrch mchlrch commented Mar 5, 2024

  • Adds flag to the cubes metadata Project.
  • Sets the publishGraph in the PublishJob to a .../hidden graph
  • Adds the flag to the published cubes metadata (cc:isHiddenCube)

add flag to Cube Metadata (cc:isHiddenCube)
PublishJob: conditional publishGraph IRI
@mchlrch mchlrch requested review from giacomociti and tpluscode March 5, 2024 12:39
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 5, 2024

⚠️ No Changeset found

Latest commit: 4409528

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 92.40506% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 80.42%. Comparing base (dd4cba3) to head (4409528).
Report is 5 commits behind head on master.

Files Patch % Lines
apis/core/lib/domain/cube-projects/create.ts 82.35% 3 Missing ⚠️
apis/core/lib/domain/cube-projects/import.ts 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1485      +/-   ##
==========================================
+ Coverage   80.36%   80.42%   +0.06%     
==========================================
  Files         199      200       +1     
  Lines       13676    13745      +69     
  Branches      829      836       +7     
==========================================
+ Hits        10991    11055      +64     
- Misses       2676     2681       +5     
  Partials        9        9              

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

Comment thread packages/model/Dataset.ts Outdated
Comment thread apis/core/lib/domain/job/create.ts Outdated
Comment thread apis/core/bootstrap/shapes/dataset.ts Outdated
@mchlrch
Copy link
Copy Markdown
Member Author

mchlrch commented Mar 5, 2024

Where should the flag show up in UI?

image

image

image

image

image

mchlrch added 2 commits March 6, 2024 19:04
move flag from Cube Metadata to Project (cc:isHiddenCube)
add flag to the published cubes metadata (cc:isHiddenCube)
Comment on lines +19 to +23
return through2.obj(
(chunk, enc, cb) => cb(null, chunk),
function (done) {
dataset.forEach(this.push.bind(this))
done()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throught2 works of course but for readability, I think generators are the preferred option.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also interesting that you used clownface for a single triple :)

Comment thread apis/core/lib/domain/job/create.ts Outdated
mchlrch added 4 commits March 11, 2024 16:25
fix create/update of project to have flag persisted
complete the property decorator with appropriate type declaration
fix build error
fix unit-tests
Copy link
Copy Markdown
Collaborator

@tpluscode tpluscode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the requests in e2e-tests
Please add a test scenario in cli/test/lib/commands/publish.test.ts which checks that publishing a hidden cube writes to the expected graph

Comment thread apis/core/lib/domain/job/create.ts Outdated
Comment thread apis/core/lib/domain/cube-projects/Project.ts Outdated
Comment thread apis/core/lib/domain/cube-projects/update.ts Outdated
Comment thread apis/core/lib/domain/cube-projects/create.ts Outdated
Comment thread apis/core/lib/domain/cube-projects/import.ts Outdated
mchlrch added 2 commits March 14, 2024 12:14
fix e2e-tests
- property organization.hiddenGraph
- testcase 'createPublishJob for hiddenCube'
- remove Project.updateIsHiddenCube()
@mchlrch
Copy link
Copy Markdown
Member Author

mchlrch commented Mar 21, 2024

Please add a test scenario in cli/test/lib/commands/publish.test.ts which checks that publishing a hidden cube writes to the expected graph

I added a unit test here: apis/core/test/domain/job/create.test.ts

Copy link
Copy Markdown
Contributor

@giacomociti giacomociti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not able to provide nuanced advice, but overall the changes make sense to me

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