Skip to content

Commit

Permalink
chore: Remove depreciated validThrough cube filters
Browse files Browse the repository at this point in the history
  • Loading branch information
bprusinowski committed Nov 3, 2023
1 parent e33a7c4 commit f24f25c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
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 depreciated `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 }`;
};

0 comments on commit f24f25c

Please sign in to comment.