-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rules): WRONG_INDEX_VALUE and WRONG_INDEX_KEY implementation
- Loading branch information
Showing
16 changed files
with
3,029 additions
and
10 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# WRONG_INDEX_KEY | ||
|
||
## Rule test folder | ||
|
||
`test/fixtures/rules-cases/wrong-index-key` | ||
|
||
## Description | ||
An issue according to this rule will be fired when `key` in `ddf--index.csv` is not valid. The key should be concept or set of concepts or `concept` constant. | ||
|
||
## Examples of correct data | ||
|
||
`ddf--index.csv` | ||
``` | ||
key,value,file | ||
concept,concept_type,ddf--concepts.csv | ||
concept,name,ddf--concepts.csv | ||
"geo,year",gas_production_bcf,ddf--datapoints--gas_production_bcf--by--geo--year.csv | ||
geo,geo_name,ddf--entities--geo.csv | ||
``` | ||
|
||
`ddf--concepts.csv` | ||
``` | ||
concept,concept_type,name | ||
geo,entity_domain,Geo | ||
gas_production_bcf,measure,Gas Production – Bcf | ||
name,string,Name | ||
year,time,Year | ||
``` | ||
|
||
## Examples of incorrect data | ||
|
||
`ddf--index.csv` | ||
``` | ||
key,value,file | ||
concept,concept_type,ddf--concepts.csv | ||
concept,name,ddf--concepts.csv | ||
"geo,foo",gas_production_bcf,ddf--datapoints--gas_production_bcf--by--geo--year.csv | ||
bar,geo_name,ddf--entities--geo.csv | ||
``` | ||
|
||
`ddf--concepts.csv` | ||
``` | ||
concept,concept_type,name | ||
geo,entity_domain,Geo | ||
gas_production_bcf,measure,Gas Production – Bcf | ||
name,string,Name | ||
year,time,Year | ||
``` | ||
|
||
## Output data format | ||
|
||
Non existing concepts that found in record's key of DDF index |
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,51 @@ | ||
# WRONG_INDEX_VALUE | ||
|
||
## Rule test folder | ||
|
||
`test/fixtures/rules-cases/wrong-index-value` | ||
|
||
## Description | ||
An issue according to this rule will be fired when `value` in `ddf--index.csv` is not valid. The key should be concept or set of concepts or `concept` constant. | ||
|
||
## Examples of correct data | ||
|
||
`ddf--index.csv` | ||
``` | ||
key,value,file | ||
concept,concept_type,ddf--concepts.csv | ||
concept,name,ddf--concepts.csv | ||
"geo,year",gas_production_bcf,ddf--datapoints--gas_production_bcf--by--geo--year.csv | ||
geo,geo_name,ddf--entities--geo.csv | ||
``` | ||
`ddf--concepts.csv` | ||
``` | ||
concept,concept_type,name | ||
geo,entity_domain,Geo | ||
gas_production_bcf,measure,Gas Production – Bcf | ||
name,string,Name | ||
geo_name,string,Name | ||
year,time,Year | ||
``` | ||
|
||
* **Examples of incorrect data:** | ||
|
||
`ddf--index.csv` | ||
``` | ||
key,value,file | ||
concept,concept_type,ddf--concepts.csv | ||
concept,name,ddf--concepts.csv | ||
"geo,year",foo,ddf--datapoints--gas_production_bcf--by--geo--year.csv | ||
geo,geo_name,ddf--entities--geo.csv | ||
``` | ||
`ddf--concepts.csv` | ||
``` | ||
concept,concept_type,name | ||
geo,entity_domain,Geo | ||
gas_production_bcf,measure,Gas Production – Bcf | ||
name,string,Name | ||
year,time,Year | ||
``` | ||
|
||
## Output data format | ||
|
||
Non existing concepts that found in record's value of DDF index |
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,6 @@ | ||
concept,concept_type,name | ||
geo,entity_domain,Geo | ||
gas_production_bcf,measure,Gas Production – Bcf | ||
name,string,Name | ||
geo_name,string,Name | ||
year,time,Year |
Oops, something went wrong.