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

Support for hidden cubes #1485

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Support for hidden cubes #1485

wants to merge 10 commits into from

Conversation

mchlrch
Copy link
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
Copy link

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

Copy link

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.

packages/model/Dataset.ts Outdated Show resolved Hide resolved
apis/core/lib/domain/job/create.ts Outdated Show resolved Hide resolved
apis/core/bootstrap/shapes/dataset.ts Outdated Show resolved Hide resolved
@mchlrch
Copy link
Member Author

mchlrch commented Mar 5, 2024

Where should the flag show up in UI?

image

image

image

image

image

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
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
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 :)

apis/core/lib/domain/job/create.ts Outdated Show resolved Hide resolved
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
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

apis/core/lib/domain/job/create.ts Outdated Show resolved Hide resolved
apis/core/lib/domain/cube-projects/Project.ts Outdated Show resolved Hide resolved
apis/core/lib/domain/cube-projects/update.ts Outdated Show resolved Hide resolved
apis/core/lib/domain/cube-projects/create.ts Outdated Show resolved Hide resolved
apis/core/lib/domain/cube-projects/import.ts Outdated Show resolved Hide resolved
fix e2e-tests
- property organization.hiddenGraph
- testcase 'createPublishJob for hiddenCube'
- remove Project.updateIsHiddenCube()
@mchlrch
Copy link
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
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