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

chore: Remove deprecated validThrough cube filters #1249

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ You can also check the [release page](https://github.com/visualize-admin/visuali
- Maintenance
- Added retrieval of dimension units via `qudt:hasUnit` (but kept `qudt:unit` for backward compatibility)
- Improved GQL debug panel (added resolver variables and rectangles to visually indicate resolving times)
- Removed deprecated `validThrough` cube filters

# [3.23.0] - 2023-10-17

Expand Down
1 change: 0 additions & 1 deletion app/rdf/cube-filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export const makeCubeFilters = ({

const res = [
// Cubes that have a newer version published have a schema.org/expires property; Only show cubes that don't have it
Cube.filter.noValidThrough(), // Keep noValidThrough for backwards compat
Cube.filter.noExpires(),
isVisualizeCubeFilter,
includeDrafts
Expand Down
15 changes: 7 additions & 8 deletions app/rdf/query-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ export const makeVisualizeDatasetFilter = (options?: {
includeDrafts?: boolean;
cubeIriVar?: string;
}) => {
const cubeIriVar = options?.cubeIriVar || "?iri";
const includeDrafts = options?.includeDrafts || false;
const cubeIriVar = options?.cubeIriVar ?? "?iri";
const includeDrafts = options?.includeDrafts ?? false;

return sparql`
${cubeIriVar} ${
schema.workExample
} <https://ld.admin.ch/application/visualize>.
} <https://ld.admin.ch/application/visualize> .
${
includeDrafts
? ""
: sparql`${cubeIriVar} ${schema.creativeWorkStatus} <https://ld.admin.ch/vocabulary/CreativeWorkStatus/Published>.`
: sparql`${cubeIriVar} ${schema.creativeWorkStatus} <https://ld.admin.ch/vocabulary/CreativeWorkStatus/Published> .`
}
${cubeIriVar} ${cube.observationConstraint} ?shape.
FILTER NOT EXISTS {${cubeIriVar} ${schema.expires} ?expiryDate }
FILTER NOT EXISTS {${cubeIriVar} ${schema.validThrough} ?validThrough }
`;
${cubeIriVar} ${cube.observationConstraint} ?shape .
FILTER NOT EXISTS { ${cubeIriVar} ${schema.expires} ?expiryDate }`;
};
Loading