-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
128 additions
and
58 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
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,14 @@ | ||
#!/usr/bin/env sh | ||
|
||
if [ -d $1 -a ! -z "$(ls -A $1)" ] | ||
then | ||
printf "$1 already exists and contains the following files: $(ls -A -m -w 0 $1)\nAre you sure (y/n)? " | ||
read enter | ||
if [ $enter = 'y' ] | ||
then | ||
exit 0 | ||
else | ||
echo "Understood. Exiting with error code." | ||
exit 1 | ||
fi | ||
fi |
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
|
||
|
||
TOKEN_LENGTH = 9 | ||
WINDOW_SIZE = 100 | ||
WINDOW_SIZE = 50 | ||
|
||
|
||
def get_special_tables(config): | ||
|
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,53 @@ | ||
table column label nulltype datatype structure description | ||
table table table_name table_name primary name of this table | ||
table path path path to the TSV file for this table, relative to the table.tsv file | ||
table type empty table_type type of this table, used for tables with special meanings | ||
table description empty description a description of this table | ||
column table table_name from(table.table) the table that this column belongs to | ||
column column column_name the name of this column | ||
column label empty label the human-readable label for this column | ||
column nulltype empty datatype_name from(datatype.datatype) the datatype for NULL values in this column | ||
column datatype datatype_name from(datatype.datatype) the datatype for this column | ||
column structure empty trimmed_line schema information for this column | ||
column description empty description a description of this column | ||
datatype datatype datatype_name primary the name of this datatype | ||
datatype parent empty datatype_name tree(datatype) the parent datatype | ||
datatype transform empty word | ||
datatype condition empty datatype_condition | ||
datatype structure empty trimmed_line | ||
datatype description empty trimmed_text | ||
datatype SQLite type empty datatype_name | ||
datatype PostgreSQL type empty datatype_name | ||
datatype RDF type empty datatype_name | ||
datatype HTML type empty datatype_name | ||
rule table table_name | ||
rule when column column_name | ||
rule when condition datatype_condition | ||
rule then column column_name | ||
rule then condition datatype_condition | ||
rule level word | ||
rule description empty description | ||
table1 prefix prefix primary | ||
table1 base IRI unique | ||
table1 ontology IRI empty IRI | ||
table1 version IRI empty IRI | ||
table2 child trimmed_line from(table4.other_foreign_column) | ||
table2 parent empty trimmed_line tree(child) | ||
table2 xyzzy empty trimmed_line under(table2.child, d) | ||
table2 foo empty integer from(table4.numeric_foreign_column) | ||
table2 bar empty text | ||
table3 source prefix from(table1.prefix) | ||
table3 id CURIE unique | ||
table3 label label primary | ||
table3 parent empty label tree(label) | ||
table3 related empty trimmed_line | ||
table4 foreign_column text unique | ||
table4 other_foreign_column text unique | ||
table4 numeric_foreign_column integer primary | ||
table5 foo word primary | ||
table5 bar integer | ||
table6 child integer from(table4.numeric_foreign_column) | ||
table6 parent empty integer tree(child) | ||
table6 xyzzy empty integer under(table6.child, 4) | ||
table6 foo empty text | ||
table6 bar empty integer |
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 |
---|---|---|
@@ -1,9 +1,2 @@ | ||
table when column when condition then column then condition level description | ||
table2 foo null bar null error bar must be null whenever foo is null | ||
table2 foo not null bar not null error bar cannot be null if foo is not null | ||
table2 foo IRI bar label error bar must be a label if foo is an IRI | ||
table2 foo equals(5) bar in('y', 'z') error bar must be 'y' or 'z' if foo = 5 | ||
table6 foo null bar null error bar must be null whenever foo is null | ||
table6 foo not null bar not null error bar cannot be null if foo is not null | ||
table6 foo IRI bar label error bar must be a label if foo is an IRI | ||
table6 foo equals(e) bar in(25, 26) error bar must be 25 or 26 if foo = 'e' | ||
table1 ontology IRI null version IRI null error 'version IRI' must be null whenever 'ontology IRI' is null |
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,11 @@ | ||
table path description type | ||
column test/guess_test_data/column_expected.tsv Columns for all of the tables. column | ||
datatype test/guess_test_data/datatype.tsv Datatypes for all of the columns datatype | ||
rule test/guess_test_data/rule.tsv More complex "when" rules rule | ||
table test/guess_test_data/table_expected.tsv All of the user-editable tables in this project. table | ||
table1 test/guess_test_data/table1.tsv The first data table | ||
table2 test/guess_test_data/ontology/table2.tsv The second data table | ||
table3 test/guess_test_data/ontology/table3.tsv The third data table | ||
table4 test/guess_test_data/ontology/table4.tsv The fourth data table | ||
table5 test/guess_test_data/ontology/table5.tsv The fifth data table | ||
table6 test/guess_test_data/ontology/table6.tsv The sixth data table (like table2 but all numeric) |