Skip to content

fix: produce terms for missing values#592

Merged
tpluscode merged 6 commits into
masterfrom
missing-values
Mar 11, 2021
Merged

fix: produce terms for missing values#592
tpluscode merged 6 commits into
masterfrom
missing-values

Conversation

@tpluscode

@tpluscode tpluscode commented Mar 10, 2021

Copy link
Copy Markdown
Collaborator

Please excuse 68k changed rows in the sample csv. Had to add a column to prepare a test scenario

fixes #481:

  1. If not specified, all observations table literal columns will output an UNICODE substitute character
    • necessary because csvw:default only accepts string per spec
  2. The pipeline maps that character based depending on the column:
    • cube:Undefined IRI for column mapped to shared dimension
    • ""^^cube:Undefined for all other columns
  3. The shape's properties sh:datatype and sh:in are updated accordingly, using sh:or where necessary

At this time appears impossible to do anything with reference columns, because CSVW does not have any special behaviour when constructing templates from missing values. They will simply be inserted as empty strings into the resulting URI

@changeset-bot

changeset-bot Bot commented Mar 10, 2021

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b78976b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@cube-creator/core-api Patch
@cube-creator/cli Patch

Not sure what this means? Click here to learn what changesets are.

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

@codecov-io

codecov-io commented Mar 11, 2021

Copy link
Copy Markdown

Codecov Report

Merging #592 (b78976b) into master (8e03b0f) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #592      +/-   ##
==========================================
+ Coverage   80.61%   80.67%   +0.05%     
==========================================
  Files         138      140       +2     
  Lines        8172     8252      +80     
  Branches      518      539      +21     
==========================================
+ Hits         6588     6657      +69     
- Misses       1581     1592      +11     
  Partials        3        3              
Impacted Files Coverage Δ
apis/core/lib/csvw-builder/index.ts 88.94% <100.00%> (+0.28%) ⬆️
cli/lib/output-mapper.ts 85.96% <100.00%> (+2.98%) ⬆️
cli/lib/toCubeShape/Dimension.js 83.17% <100.00%> (-14.81%) ⬇️
packages/core/mapping.ts 100.00% <100.00%> (ø)
apis/shared-dimensions/lib/store.ts 100.00% <0.00%> (ø)
...s/shared-dimensions/lib/shapes/shared-dimension.ts 100.00% <0.00%> (ø)
...red-dimensions/lib/shapes/shared-dimension-term.ts 100.00% <0.00%> (ø)
cli/lib/validation.ts 72.72% <0.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e03b0f...b78976b. Read the comment docs.

@tpluscode tpluscode merged commit 006c3fc into master Mar 11, 2021
@tpluscode tpluscode deleted the missing-values branch March 11, 2021 15:11
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.

Fix behaviour of Missing Values

3 participants