-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: Duplicated hierarchies #1260
Merged
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a038ceb
chore: Update types
bprusinowski 3915401
chore: Update types
bprusinowski 9cc19a2
fix: Duplicated hierarchy names
bprusinowski 5873091
chore: Remove legacy code
bprusinowski 902cffc
fix: Only fetch hierarchies from cube's shape
bprusinowski 990303d
chore: Update types
bprusinowski 703d7b9
refactor: Initialize cube explicitly
bprusinowski 3d79adb
feat: Introduce ExtendedCube to allow to separate triples from cube a…
bprusinowski 95874b0
perf: Use shapePtr when fetching hierarchies
bprusinowski 6f5661c
docs: Update CHANGELOG
bprusinowski 9a1c1e5
fix: Test
bprusinowski d08bd37
perf: Do not fetch shape when initializing raw cube
bprusinowski e9ab996
docs: Update CHANGELOG
bprusinowski 3bfc7bf
fix: Test
bprusinowski 089f06d
Merge branch 'main' of github.com:visualize-admin/visualization-tool …
bprusinowski 3e468c8
docs: Add docstring
bprusinowski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import clownface, { AnyPointer } from "clownface"; | ||
import { Cube, CubeOptions } from "rdf-cube-view-query"; | ||
import rdf from "rdf-ext"; | ||
import DatasetExt from "rdf-ext/lib/Dataset"; | ||
|
||
export class ExtendedCube extends Cube { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cna you add a docstring describing the general goal ? So that when we see a method that should be there, we can be sure that this class is the right one ? |
||
private shapeDataset: DatasetExt; | ||
public shapePtr: AnyPointer; | ||
|
||
constructor(options: CubeOptions) { | ||
const { term = rdf.blankNode(), graph } = options; | ||
super(options); | ||
this.shapeDataset = rdf.dataset(); | ||
this.shapePtr = clownface({ | ||
term, | ||
dataset: this.shapeDataset, | ||
graph, | ||
}); | ||
} | ||
|
||
async fetchShape() { | ||
const shapeData = await this.source.client.query.construct( | ||
this.shapeQuery() | ||
); | ||
this.dataset.addAll(shapeData); | ||
this.shapeDataset.addAll(shapeData); | ||
this.quads = [...this.quads, ...shapeData]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the splitted issue, getLatestCube could be put on ExtendedCube.