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

Linting a schema with duplicate nodes gives misleading error message. #115

Open
enjoythecode opened this issue May 27, 2022 · 0 comments
Open

Comments

@enjoythecode
Copy link
Contributor

enjoythecode commented May 27, 2022

Using the import tool, on lint mode, on a schema MCF with duplicate (same dcid) Nodes gives a misleading error message:

Found a missing or empty property value :: property: 'dcid', node: 'dcid:Annual_ExpectedLoss_NaturalHazardImpact', type: 'StatisticalVariable'

The duplicate node example:

Node: dcid:Annual_ExpectedLoss_NaturalHazardImpact
dcid: Annual_ExpectedLoss_NaturalHazardImpact
typeOf: dcs:StatisticalVariable
statType: measuredValue
populationType: dcs:NaturalHazardImpact
measuredProperty: dcs:expectedLoss
measurementQualifier: Annual

Node: dcid:Annual_ExpectedLoss_NaturalHazardImpact
typeOf: dcs:StatisticalVariable
statType: measuredValue
populationType: dcs:NaturalHazardImpact
measuredProperty: dcs:expectedLoss
measurementQualifier: Annual

Resources

See commit 5dc7078 on https://github.com/enjoythecode/import/tree/catfood
fema_nri_schema.mcf contains 21 nodes duplicated
report.json contains the dc-import generated error message.

Steps to Reproduce

git clone https://github.com/enjoythecode/import.git
cd import
git pull origin catfood
git checkout a4fa6d4
cd bin
chmod +x s/genmcf.sh
s/genmcf.sh

git clone https://github.com/enjoythecode/import.git
cd import
git pull origin catfood
git checkout 545a1bb194c5cc85df55905690aa2348b8bb051c
cd bin
chmod +x s/lint.sh
s/lint.sh
cat dc_generated/report.json
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

No branches or pull requests

1 participant