Project

General

Profile

Statistics
| Revision:

# Date Author Comment
5418 10/10/2012 10:47 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: matchedFamilyFit_fraction: Source the "matched" to Family_matched, which is a closer fit than Name_matched. matchedGenusFit_fraction: Fixed Genus_matched source to use #detailed_download instead of #simple_download.

5417 10/10/2012 10:42 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added matchedGenusFit_fraction

5416 10/10/2012 10:18 AM Aaron Marcuse-Kubitza

README.TXT: Removed extra trailing whitespace

5415 10/10/2012 10:18 AM Aaron Marcuse-Kubitza

README.TXT: Documentation: To import and scrub just the test taxonomic names: Use new inputs/test_taxonomic_names/test_scrub

5414 10/10/2012 10:17 AM Aaron Marcuse-Kubitza

Added inputs/test_taxonomic_names/test_scrub

5413 10/10/2012 10:01 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Renamed canon_taxonconcept_id to canon_concept_id to shorten the name, which is used often

5412 10/10/2012 09:45 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Added taxonconcept_canon_concept_min_fit() trigger to remove the canon_concept_id link from insufficient matches. These occur when e.g. a name in another language is approximated to a latin name or when the input name is not a proper taxon but TNRS provides a best-guess match anyway.

5411 10/10/2012 09:42 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Mapped Family_score to new matchedFamilyFit_fraction

5410 10/10/2012 09:39 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Use matchedFamilyFit_fraction as canon_concept_fit_fraction when greater than matchedTaxonFit_fraction, because if there is at least a matched family, there is a valid taxonconcept to attach to

5409 10/10/2012 09:39 AM Aaron Marcuse-Kubitza

xml_func.py: Simplifying functions: Added _min, _max as passthroughs

5408 10/10/2012 09:34 AM Aaron Marcuse-Kubitza

schemas/functions.sql: Added _max(), _min()

5407 10/10/2012 09:21 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added matchedFamilyFit_fraction

5406 10/10/2012 09:04 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Remapped matchedTaxonFit_fraction to the verbatim* taxonconcept, because this is actually for the verbatim* concept's fit to the matched concept, not the matched concept's fit to the accepted concept

5405 10/10/2012 08:59 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Restored *-prefixed output terms for unmapped terms that had initially been mapped to OMIT but could reasonably match to something in the future. Continue mapping Name_number to OMIT because it isn't globally unique (it identifies the name only within one TNRS batch).

5404 10/10/2012 08:45 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Mapped Overall_score to new matchedTaxonFit_fraction

5403 10/10/2012 08:44 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped matchedTaxonFit_fraction to _set_canon_taxonconcept(canon_concept_fit_fraction)

5402 10/10/2012 08:37 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added matchedTaxonFit_fraction

5401 10/10/2012 08:20 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: _set_canon_taxonconcept(): Also set the canon_concept_fit_fraction

5400 10/10/2012 08:10 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Added canon_concept_fit_fraction to store the closeness of fit of the canon_concept

5399 10/10/2012 07:55 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Renamed canon_taxonconcept_id to canon_concept_id to shorten the name, which is used often

5398 10/10/2012 07:10 AM Aaron Marcuse-Kubitza

sql.py: mk_update(): in_place: Convert columns of type character varying to text so that they can be merge-joined with text columns. Note that these two types are equivalent but not aliases of one another, so the explicit type change is needed.

5397 10/10/2012 07:07 AM Aaron Marcuse-Kubitza

sql_gen.py: Added canon_type()

5396 10/10/2012 06:52 AM Aaron Marcuse-Kubitza

sql.py: mk_update(): in_place: Factored retrieval of column type out into separate statement for clarity

5395 10/10/2012 06:27 AM Aaron Marcuse-Kubitza

schemas/functions.sql: _join*(): Fixed bug where was returning '' instead of NULL when only NULL inputs were provided, because array_to_string() always returns a non-NULL string. Functions must always return NULL in place of '' to ensure that empty strings do not find their way into VegBIEN, and to prevent inconsistencies between row-based and column-based import (row-based import folds empty strings to NULL while column-based import relies on having a clean input table).

5394 10/10/2012 06:10 AM Aaron Marcuse-Kubitza

sql_io.py: cleanup_table(): Use sql.table_pkey_col() instead of sql.pkey_col() so that only an actual pkey column is removed from the list of columns to clean. This fixes a bug where the first column in the table was not cleaned up if there was no pkey. Note that this bug only affected newly re-created staging tables, because staging tables previously had a special row_num pkey column added if they did not already have a pkey. The row_num column is now added by column-based import instead.

5393 10/10/2012 05:51 AM Aaron Marcuse-Kubitza

sql.py: table_pkey_col(): Raise a DoesNotExistException if the table has no pkey

5392 10/10/2012 05:23 AM Aaron Marcuse-Kubitza

sql.py: pkey_col(): Call table_pkey_col() directly rather than via pkey_name(). pkey_name(): Call pkey_col() instead of table_pkey_col() now that pkey_col() calls table_pkey_col().

5391 10/10/2012 05:14 AM Aaron Marcuse-Kubitza

sql.py: pkey_col(): Documented that if there is no pkey, returns the first column in the table

5390 10/10/2012 05:13 AM Aaron Marcuse-Kubitza

sql.py: pkey_col(): Specify recover directly as a kw_arg because it's the only kw_arg passed to pkey_name()

5389 10/10/2012 05:10 AM Aaron Marcuse-Kubitza

sql.py: Added table_pkey_col() and use it in pkey_name()

5388 10/10/2012 05:01 AM Aaron Marcuse-Kubitza

sql.py: Renamed pkey() to pkey_name()

5387 10/10/2012 04:45 AM Aaron Marcuse-Kubitza

sql.py: Renamed pkey_col_() to pkey_col()

5386 10/10/2012 04:43 AM Aaron Marcuse-Kubitza

sql.py: Removed no longer used pkey_col

5385 10/10/2012 04:43 AM Aaron Marcuse-Kubitza

db_xml.py: cleanup_table(): Inline sql.pkey_col ('row_num') because this is the only place it's used

5384 10/10/2012 04:37 AM Aaron Marcuse-Kubitza

cleanup_table(): Use new sql.table_cols() instead of sql.table_col_names()

5383 10/10/2012 04:36 AM Aaron Marcuse-Kubitza

sql.py: Added table_cols()

5382 10/10/2012 04:16 AM Aaron Marcuse-Kubitza

db_xml.py: put(): Fixed bug where needed to avoid truncating the pkeys_loc table, in case it's the same as one of the in_tables. This occurs now that sql_io.put_table() passes through the actual input column instead of the joined-together input table's column when ignoring all rows.

5381 10/10/2012 03:33 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Resolving default value column: If ignoring all rows, use input cols directly instead of cols from joined-together input table. In addition to being simpler, this prevents the returned column's name from growing longer and longer as each iteration prepends its input table table name to the default value column name.

5380 10/10/2012 03:07 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Moved changing the table of the default value column from Resolving the default value column to Setting pkeys of missing rows, because the table change is only needed in this section

5379 10/10/2012 03:04 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Resolving default value column: Always call sql_gen.remove_col_rename() because it will just pass the value through if it's not a column

5378 10/10/2012 02:41 AM Aaron Marcuse-Kubitza

sql_gen.py: simplify_parens(): Removed extra simplify_parens() at end because it is done in the final iteration that performs no other replacements, so it is not necessary to also do it explicitly

5377 10/10/2012 02:30 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Replaced limit_ref integer with ignore_all_ref boolean, because it is no longer used as a select statement limit

5376 10/10/2012 02:29 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): remove_all_rows(): Corrected "just create an empty pkeys table" comment to "just return the default value column"

5375 10/10/2012 02:27 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): mk_main_select(): Removed setting limit to limit_ref0, because an empty pkeys table is no longer created when ignoring all rows

5374 10/10/2012 02:19 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Setting pkeys of missing rows: Removed "limit_ref0 == 0" check because this code is never reached in that case

5373 10/10/2012 02:16 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Ignoring all rows for unrecoverable errors: Even in multi-row mode, just return whatever the default value or column was, instead of creating an output table containing the default value filled in for every row. This also assists the optimization to skip empty levels of taxonconcepts, because it folds the empty level to that level's parent level rather than creating a whole new temp table with ultimately the same contents.

5372 10/10/2012 01:57 AM Aaron Marcuse-Kubitza

sql_gen.py: not_false_re, not_true_re: Appended \b to ensure that true/false is only matched as a single word

5371 10/10/2012 01:56 AM Aaron Marcuse-Kubitza

sql_gen.py: simplify_expr(): Also simplify "NOT false" to true

5370 10/10/2012 01:53 AM Aaron Marcuse-Kubitza

sql_gen.py: simplify_expr(): Also simplify "NOT true" to false

5369 10/10/2012 01:24 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): ignore_cond(): Changed "Ignoring rows where" message with the negated (filter-out) condition to "Ignoring rows that don't satisfy" with the filter condition for clarity

5368 10/10/2012 01:22 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): ignore_cond(): If cond simplifies to false, remove all rows instead of filtering out individual rows which will all be filtered out. This optimization should improve import times of tables, such as taxonconcept, which use a check constraint instead of NOT NULL constraints to prevent empty rows. The taxonomic schema refactoring caused the creation of many more levels of taxonconcepts, many of which (such as variety, forma, cultivar) are empty for most datasources, so this optimization should also reduce overall import times for datasources that have any empty levels of taxonconcept. Note that this optimization is only possible now that sql_gen.simplify_expr() is able to simplify all the way to a single boolean value for the taxonconcept_required_key constraint.

5367 10/10/2012 12:55 AM Aaron Marcuse-Kubitza

Moved expression transforming functions from sql.py to sql_gen.py because they do not manipulate an actual database and merely generate SQL

5366 10/10/2012 12:38 AM Aaron Marcuse-Kubitza

sql.py: Added true_expr, false_expr and use them where their values are used

5365 10/10/2012 12:34 AM Aaron Marcuse-Kubitza

sql.py: simplify_expr(): Also simplify "AND true" expressions

5364 10/10/2012 12:30 AM Aaron Marcuse-Kubitza

sql.py: simplify_expr(): Also simplify "AND false" expressions

5363 10/10/2012 12:19 AM Aaron Marcuse-Kubitza

sql.py: Added atom_re and use it in simplify_parens()

5362 10/10/2012 12:19 AM Aaron Marcuse-Kubitza

sql.py: Added or_re and use it in simplify_expr()

5361 10/10/2012 12:18 AM Aaron Marcuse-Kubitza

sql.py: logic_op_re(): Added expr_re param for an expr on the other side of the operator

5360 10/09/2012 11:54 PM Aaron Marcuse-Kubitza

sql.py: simplify_parens(): Use bool_re

5359 10/09/2012 11:54 PM Aaron Marcuse-Kubitza

sql.py: Removed no longer needed paren_re()

5358 10/09/2012 11:53 PM Aaron Marcuse-Kubitza

sql.py: true_re, false_re: Removed no longer needed paren_re() because simplify_parens() now handles this

5357 10/09/2012 11:50 PM Aaron Marcuse-Kubitza

sql.py: simplify_expr(): Removed final simplify_parens() because this is now done by simplify_recursive()

5356 10/09/2012 11:49 PM Aaron Marcuse-Kubitza

sql.py: simplify_expr(): Use new simplify_recursive(). This also fixes a bug where some logic expressions are not simplified because of extra parens.

5355 10/09/2012 11:48 PM Aaron Marcuse-Kubitza

sql.py: Added simplify_recursive()

5354 10/09/2012 11:31 PM Aaron Marcuse-Kubitza

sql.py: simplify_parens(): Also remove parens around true and false

5353 10/09/2012 11:26 PM Aaron Marcuse-Kubitza

regexp.py: sub_nested(): Use new sub_recursive()

5352 10/09/2012 11:25 PM Aaron Marcuse-Kubitza

regexp.py: Added sub_recursive()

5351 10/09/2012 11:21 PM Aaron Marcuse-Kubitza

sql.py: simplify_expr(): Use new simplify_parens()

5350 10/09/2012 11:20 PM Aaron Marcuse-Kubitza

sql.py: Added simplify_parens()

5349 10/09/2012 11:14 PM Aaron Marcuse-Kubitza

sql.py: simplify_expr(): Use new regexp.sub_nested()

5348 10/09/2012 11:14 PM Aaron Marcuse-Kubitza

Added regexp.py

5347 10/09/2012 10:46 PM Aaron Marcuse-Kubitza

sql.py: simplify_expr(): Use new logic_op_re()

5346 10/09/2012 10:46 PM Aaron Marcuse-Kubitza

sql.py: Added logic_op_re()

5345 10/09/2012 10:40 PM Aaron Marcuse-Kubitza

sql.py: bool_re: Use new true_re, false_re

5344 10/09/2012 10:40 PM Aaron Marcuse-Kubitza

sql.py: Added true_re, false_re

5343 10/09/2012 10:37 PM Aaron Marcuse-Kubitza

sql.py: bool_re: Use new paren_re()

5342 10/09/2012 10:36 PM Aaron Marcuse-Kubitza

sql.py: bool_re: Use new paren_re()

5341 10/09/2012 10:36 PM Aaron Marcuse-Kubitza

sql.py: Added paren_re()

5340 10/09/2012 10:31 PM Aaron Marcuse-Kubitza

sql.py: simplify_expr(): Combined replacements of bool_re+' OR ' with the value in either order into one replacement

5339 10/09/2012 10:27 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: verbatim* taxonconcept: Don't store Name_submitted in taxonomicnamewithauthor in addition to identifyingtaxonomicname, because the fields other than identifyingtaxonomicname are meant to store parsed values rather than raw, unscrubbed values and TNRS does not directly provide a concatenated taxonomic name with author

5338 10/09/2012 10:23 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: verbatim* taxonconcept: Don't create hierarchy of parent taxonconcepts, because the parsed names (rather than the names for the matched taxonconcept) are from the input taxonomic name, rather than from the official tree of life used by TNRS. Otherwise, if a taxonomic name provides e.g. no family (common), a separate genus taxonconcept would have been created with no parent_id, which would not compare equal to the matched taxonconcept's genus with a parent_id. Continue to store the parsed family, genus, species in the family, genus, species cached fields, because the parsed family is often different from the matched taxonconcept's family when e.g. no family is provided in the taxonomic name.

5337 10/09/2012 10:16 PM Aaron Marcuse-Kubitza

sql.py: Renamed table_cols() to table_col_names() for clarity, because it does not return sql_gen.Col objects

5336 10/09/2012 10:12 PM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/test.xml.ref: Accepted new inserted row count. The change is most likely from several revisions back, but the cause of the change is unknown (it is not due to the updated TNRS.tnrs table, which is still sorted with the same rows first).

5335 10/09/2012 09:09 PM Aaron Marcuse-Kubitza

sql_gen.py: is_text_col(): Use new is_text_type()

5334 10/09/2012 09:09 PM Aaron Marcuse-Kubitza

sql_gen.py: Added is_text_type()

5333 10/09/2012 09:05 PM Aaron Marcuse-Kubitza

sql_gen.py: ensure_not_null(): Documented that NULL has no type, hence the NoUnderlyingTableException being re-raised

5332 10/09/2012 09:04 PM Aaron Marcuse-Kubitza

sql_gen.py: ensure_not_null(): Just store the column type in col_type, instead of storing typed_col and using typed_col.type, now that other info in typed_col is no longer needed

5331 10/09/2012 09:02 PM Aaron Marcuse-Kubitza

sql_gen.py: ensure_not_null(): Use is_nullable() instead of determining nullability itself, for clarity

5330 10/09/2012 08:59 PM Aaron Marcuse-Kubitza

sql_gen.py: is_nullable(): Fixed bug where non-columns could not be sent to db.col_info()

5329 10/09/2012 08:53 PM Aaron Marcuse-Kubitza

sql_gen.py: ensure_not_null(): Always remove_col_rename() the column to ensure that it is acceptable by helper functions like is_nullable()

5328 10/09/2012 08:11 PM Aaron Marcuse-Kubitza

lib/PostgreSQL-MySQL.csv: COMMENT statement: Fixed bug where ending ; could match only when preceded by ' and followed by a newline, to avoid matching ; embedded in the comment

5327 10/09/2012 08:07 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: family, genus, species comments: Changed "scoping" to "identifying" for clarity

5326 10/09/2012 08:06 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: family, genus, species: Added comment that each is a cached field for easy querying and the scoping version of it is stored in the chain of parent_id ancestors

5325 10/09/2012 08:03 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: taxonconcept_unique: Removed family, genus, species because these are now just cached fields for analytical_db_view rather than scoping fields. The scoping versions of these fields are stored in the chain of parent_id ancestors.

5324 10/09/2012 07:42 PM Aaron Marcuse-Kubitza

tnrs_db: Moved "Processing # taxonconcepts" log message to before waiting or exiting if no taxonconcepts left, so that it would be printed right after the query is run and say that no taxonconcepts were found

5323 10/09/2012 07:39 PM Aaron Marcuse-Kubitza

tnrs_db: Updated comments and log messages for schema changes

5322 10/09/2012 07:33 PM Aaron Marcuse-Kubitza

tnrs_db: Updated query for schema changes

5321 10/09/2012 07:33 PM Aaron Marcuse-Kubitza

README.TXT: Schema changes: files to update with renamings: Added bin/tnrs_db

5320 10/09/2012 07:25 PM Aaron Marcuse-Kubitza

inputs/import.stats.xls: Updated import times

5319 10/09/2012 07:04 PM Aaron Marcuse-Kubitza

README.TXT: Data import: Changed `inputs/*/*/logs` to `inputs/{.,}*/*/logs` to also include the TNRS names import log