Project

General

Profile

Statistics
| Revision:

# Date Author Comment
5468 10/12/2012 12:33 PM Aaron Marcuse-Kubitza

inputs/test_taxonomic_names/_scrub/public.sql: Regenerated with schema changes

5467 10/12/2012 12:29 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Renamed canon_concept_id to matched_concept_id, because this is actually the closest-match taxonconcept in the match hierarchy (datasource concept -> parsed concept -> matched concept -> accepted concept) rather than the accepted synonym, which goes in accepted_concept_id

5466 10/12/2012 05:51 AM Aaron Marcuse-Kubitza

Regenerated vegbien.ERD exports

5465 10/12/2012 05:47 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Renamed canon_concept_id to matched_concept_id, because this is actually the closest-match taxonconcept in the match hierarchy (datasource concept -> parsed concept -> matched concept -> accepted concept) rather than the accepted synonym, which goes in accepted_concept_id

5464 10/12/2012 05:34 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Added accepted_concept_id

5463 10/12/2012 05:27 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept.canon_concept_id: comment: Changed "accepted synonym" to "closest match", since canon_concept_id is actually a hierarchy from datasource concept -> parsed concept -> matched concept -> accepted concept

5462 10/12/2012 05:22 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Added order # to trigger names so they run in a defined order (triggers are run in alphabetical order)

5461 10/12/2012 04:53 AM Aaron Marcuse-Kubitza

README.TXT: Use new revision # in log filenames to get all the logs for an import. Changed <datetime> to <version> because the rotated public schema now also includes the svn revision.

5460 10/12/2012 04:44 AM Aaron Marcuse-Kubitza

lib/common.Makefile: $(version): Include both the svn revision when make was started as well as the svn revision when the command is actually run (when these values differ), in case svn was updated between the time an import was started and the time a particular table started being imported. Because tables within a datasource are imported sequentially, it is possible that an update would have happened before the last table started importing.

5459 10/12/2012 04:23 AM Aaron Marcuse-Kubitza

Makefile: Moved setting of $(root) before include of lib/common.Makefile because it's used by lib/common.Makefile

5458 10/12/2012 04:21 AM Aaron Marcuse-Kubitza

Factored OS section out from Makefile, input.Makefile into lib/common.Makefile

5457 10/12/2012 04:13 AM Aaron Marcuse-Kubitza

Makefile, input.Makefile: Use new $(version), which unlike $(date) also includes the svn revision, to version log files, etc. This way, the working copy can be put back to the way it was at the time of a given import (excluding changes to nonversioned files). This also makes it easier to get all the log files for a particular import when different tables' imports started at different times.

5456 10/12/2012 04:08 AM Aaron Marcuse-Kubitza

Makefile: Added $(root) for use with $(rootRevision)

5455 10/12/2012 04:08 AM Aaron Marcuse-Kubitza

lib/common.Makefile: Added $(version), to replace $(date) for versioning log files, etc., and helper function $(rootRevision)

5454 10/12/2012 04:07 AM Aaron Marcuse-Kubitza

lib/common.Makefile: Added $(revision)

5453 10/12/2012 04:04 AM Aaron Marcuse-Kubitza

input.Makefile: Removed no longer used $(SED)

5452 10/12/2012 04:03 AM Aaron Marcuse-Kubitza

lib/common.Makefile: Added $(sed)

5451 10/12/2012 03:58 AM Aaron Marcuse-Kubitza

Factored $(date) out from Makefile, input.Makefile into lib/common.Makefile

5450 10/12/2012 03:18 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): DuplicateKeyException: Fixed bug where indexes with conditions needed to have the input rows filtered by the condition, to prevent trying to retrieve an existing/inserted row using a join on the index columns when the index in fact does not apply. This fixes a bug in the import of taxonconcept where the taxonconcept_0_unique_identifying_name unique index has a condition which was not satisfied for input rows with no identifyingtaxonomicname, causing any input row with NULL in this column to match all taxonconcepts with a NULL identifyingtaxonomicname. This uses ignore_cond()'s new support for constraints that did not fail at least once.

5449 10/12/2012 03:12 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): ignore_cond(): Added support for constraints that did not fail at least once, and therefore should not be required to simplify to a non-false value. As part of this, only track the failed constraint in the errors table if it actually failed at least once based on the deleted row count or the `failed` param.

5448 10/12/2012 03:05 AM Aaron Marcuse-Kubitza

sql_gen.py: map_expr(): Fixed bug where names were being replaced when they were inside another name. This occurred with combined names created by sql_io.into_table_name().

5447 10/12/2012 01:11 AM Aaron Marcuse-Kubitza

sql.py: ConstraintException: message: Wrap condition in strings.as_tt()

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

sql.py: run_query(): DuplicateKeyException: Also retrieve the index's condition using new index_cond()

5445 10/12/2012 12:28 AM Aaron Marcuse-Kubitza

sql.py: Added index_cond()

5444 10/12/2012 12:11 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): insert_into_pkeys(): Take a query as the param instead of sql.mk_select()'s params, to allow the caller to pass in any query without needing insert_into_pkeys() to manually pass through those args

5443 10/11/2012 11:40 PM Aaron Marcuse-Kubitza

sql.py: constraint_cond(): Fixed NotImplementedError message to apply to this function

5442 10/11/2012 09:36 PM Aaron Marcuse-Kubitza

sql_io.py: put_table(): ignore_cond(): Log message: Replaced don't with do not so it wouldn't mess up syntax highlighting when viewing the log file in a text editor

5441 10/11/2012 09:07 PM Aaron Marcuse-Kubitza

input.Makefile: Staging tables installation: Don't delete %/header.csv on error, because header.csv is a byproduct rather than the primary output and is created roughly atomically

5440 10/11/2012 08:40 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: *_ancestor tables: Added descriptive comment that these are ancestor cross link tables

5439 10/11/2012 08:23 PM Aaron Marcuse-Kubitza

csvs.py: sniff(): Support multi-char delims using \t, such as \t|\t used by NCBI. Support custom line suffixes, such as \t| used by NCBI.

5438 10/11/2012 08:18 PM Aaron Marcuse-Kubitza

csvs.py: TsvReader.next(): Remove only the autodetected line ending instead of any standard line ending. Note that this requires all header override files to use the same line ending as the CSV they override, which is now the case.

5437 10/11/2012 08:15 PM Aaron Marcuse-Kubitza

csvs.py: is_tsv(): Support multi-char delimiters by checking only the first char of the delimiter

5436 10/11/2012 08:12 PM Aaron Marcuse-Kubitza

csvs.py: sniff(): Also autodetect the line ending

5435 10/11/2012 08:11 PM Aaron Marcuse-Kubitza

csvs.py: sniff(): Also autodetect the line ending

5434 10/11/2012 08:02 PM Aaron Marcuse-Kubitza

inputs/test_taxonomic_names/Taxon/+header.txt: Changed line endings to \r\n to match testNames.txt line endings. This will be necessary when the line ending is autodetected by csvs.sniff().

5433 10/11/2012 07:59 PM Aaron Marcuse-Kubitza

csvs.py: TsvReader.next(): Renamed raw_contents var to line, since this is just the line with the ending removed

5432 10/11/2012 07:36 PM Aaron Marcuse-Kubitza

strings.py: Replaced no longer used contains_any() with find_any(), which returns any found substring, or None if none of the substrings were found

5431 10/11/2012 07:22 PM Aaron Marcuse-Kubitza

csvs.py: Modify csv.Dialect._validate() to ignore "delimiter must be a 1-character string" errors, in order to support multi-char delimiters used by TsvReader

5430 10/11/2012 07:21 PM Aaron Marcuse-Kubitza

csvs.py: Modify csv.Dialect._validate() to ignore "delimiter must be a 1-character string" errors, in order to support multi-char delimiters used by TsvReader

5429 10/11/2012 06:58 PM Aaron Marcuse-Kubitza

csvs.py: TsvReader: Use str.split() instead of csv.reader().next() to parse the row, for efficiency and to support multi-char delimiters. This is possible because the TSV dialect doesn't use CSV parsing features other than the delimiter and newline-escaping (which is handled separately).

5428 10/11/2012 06:02 PM Aaron Marcuse-Kubitza

Regenerated vegbien.ERD exports

5427 10/10/2012 11:43 AM Aaron Marcuse-Kubitza

input.Makefile: $(exts): Added .dmp

5426 10/10/2012 11:43 AM Aaron Marcuse-Kubitza

csvs.py: delims: Added |

5425 10/10/2012 11:28 AM Aaron Marcuse-Kubitza

Removed no longer used inputs/.public/. Use inputs/.TNRS/ and inputs/.TNRS/tnrs/tnrs.make instead.

5424 10/10/2012 11:23 AM Aaron Marcuse-Kubitza

README.TXT: Documentation: To import and scrub just the test taxonomic names: Added steps to restore the original DB when the test scrub is complete

5423 10/10/2012 11:22 AM Aaron Marcuse-Kubitza

inputs/test_taxonomic_names/test_scrub: Also export the results to inputs/test_taxonomic_names/_scrub/

5422 10/10/2012 11:06 AM Aaron Marcuse-Kubitza

inputs/test_taxonomic_names/test_scrub: Use regular for .. in loop with a list of what's being processed in each iteration (match_input_names, parse_accepted_names)

5421 10/10/2012 10:58 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Mapped Genus_score, Specific_epithet_score

5420 10/10/2012 10:56 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped matchedGenusFit_fraction, matchedSpeciesFit_fraction. Reordered canon_concept_fit_fraction _maxs in the order they would be used if _alt were being used instead.

5419 10/10/2012 10:52 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added matchedSpeciesFit_fraction

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