Project

General

Profile

Statistics
| Revision:

# Date Author Comment
5125 09/28/2012 02:02 PM Aaron Marcuse-Kubitza

tnrs.py: max_pause: Changed to 30 min because TNRS sometimes freezes for ~10 min. The freezing usually happens while the data is being uploaded rather than when it's being retrieved, so that the max_pause would not apply, but to be on the safe side, requests should not time out unnecessarily.

5124 09/28/2012 01:27 PM Aaron Marcuse-Kubitza

tnrs_db: tnrs_profiler: Use iter_text='name' for consistency with tnrs.tnrs_request()'s own profiler's iter_text

5123 09/28/2012 01:25 PM Aaron Marcuse-Kubitza

tnrs_db: Print cumulative profiling information after every TNRS request, rather than just at the end

5122 09/28/2012 01:22 PM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/tnrs.make: Append to the log file instead of overwriting it, so that the TNRS scrubbing of each import's new taxonomic names can be included in one log file. Echo the command to the log file to identify separate runs.

5121 09/28/2012 01:15 PM Aaron Marcuse-Kubitza

TNRS-related programs: Use "names" instead of "taxons" for variable names because what's being submitted are actually verbatim taxonomic names, not official references to specific taxa

5120 09/28/2012 01:08 PM Aaron Marcuse-Kubitza

tnrs.py: tnrs_request(): Profile the TNRS request

5119 09/28/2012 12:58 PM Aaron Marcuse-Kubitza

tnrs.py: tnrs_request(): Fixed bug where initial_headers needed to be copied instead of just assigned to headers, because initial_headers is a global constant and should not be changed when the Cookie header is added

5118 09/28/2012 12:17 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: originalTaxonRank, acceptedTaxonRank: Fixed sources to use verbatimTaxonRank, not taxonRank

5117 09/28/2012 12:15 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: originalTaxonRank: Added source of the original* prefix

5116 09/28/2012 12:14 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: acceptedTaxonRank: Added source of the accepted prefix

5115 09/28/2012 12:12 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: accepted* taxonomic terms: Fixed sources of the accepted prefix to use acceptedNameUsage, not acceptedNameUsageID

5114 09/28/2012 12:09 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: original* taxonomic terms: Source the original prefix to DwC originalNameUsage, which is a more offical source than SALVIAS orig_species

5113 09/28/2012 12:09 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: original* taxonomic terms: Source the original prefix to DwC originalNameUsage, which is a more offical source than SALVIAS orig_species

5112 09/28/2012 11:56 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added accepted* taxonomic terms to store the scrubbed name

5111 09/28/2012 11:42 AM Aaron Marcuse-Kubitza

import_all: Clean up any new TNRS.tnrs entries before importing the TNRS data

5110 09/28/2012 11:36 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/: Create using datasource schema.sql file instead of text header and postprocess.sql, for clarity and to enable using `make inputs/.TNRS/tnrs/install` to clean up the tnrs entries populated by tnrs_db

5109 09/28/2012 11:21 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Don't combine taxonRank with infraspecificEpithet if there is no infraspecificEpithet, because the taxonRank is only the infraspecificEpithet's prefix when there is an actual infraspecificEpithet. Often, taxonRank contains values like "genus" or "species" which cannot be used for this purpose.

5108 09/28/2012 10:54 AM Aaron Marcuse-Kubitza

tnrs.py: repeated_tnrs_request(): Just retry the request once with with debug turned on, to avoid cluttering the log output with the verbose debug info of multiple failed requests if the error is not resolved on retry

5107 09/28/2012 10:47 AM Aaron Marcuse-Kubitza

tnrs.py: tnrs_request(): repeated_tnrs_request(): Print all suppressed exceptions to stderr

5106 09/28/2012 10:41 AM Aaron Marcuse-Kubitza

tnrs.py: tnrs_request(): parse_response(): Include both the response headers and the response body in the InvalidResponse message

5105 09/28/2012 10:23 AM Aaron Marcuse-Kubitza

inputs/import.stats.xls: Updated import times

5104 09/28/2012 10:15 AM Aaron Marcuse-Kubitza

profiling.py: Profiler: Fixed bug where instance variable start had the same name as method start()

5103 09/28/2012 10:08 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: verbatimScientificNameWithAuthorship: Set canon_taxonpath_id to 0 on the first, scrubbed taxonpath to auto-create the self reference that indicates a scrubbed taxonpath

5102 09/28/2012 10:03 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Don't forward scientificName to taxonoccurrence.authortaxoncode when importing just taxonpaths, as for TNRS

5101 09/28/2012 09:51 AM Aaron Marcuse-Kubitza

tnrs_db: Moved lower max_taxons limit to tnrs.py because it's really required to avoid crashing the TNRS server and should apply to all callers

5100 09/28/2012 09:35 AM Aaron Marcuse-Kubitza

tnrs_db: Print log message with # of taxonpaths being sent to TNRS

5099 09/28/2012 09:30 AM Aaron Marcuse-Kubitza

tnrs_db: Fixed bug where InvalidResponse was missing module name

5098 09/28/2012 09:29 AM Aaron Marcuse-Kubitza

tnrs_db: Profile the TNRS requests. This involves using a finally block to ensure that the profiling stats are printed even if the program exits with an error.

5097 09/28/2012 09:13 AM Aaron Marcuse-Kubitza

tnrs_db: Reduced the chunk size to avoid slowing down the TNRS server

5096 09/28/2012 09:07 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/tnrs.make: Added log option which outputs to the terminal instead when set to ""

5095 09/28/2012 09:01 AM Aaron Marcuse-Kubitza

tnrs_db: Added log messages for Making TNRS request and Storing TNRS response data so that if the TNRS daemon pauses, it's obvious which step it's waiting on

5094 09/28/2012 08:58 AM Aaron Marcuse-Kubitza

sql.py: insert(): ignore optimization: Fixed bug where needed to run insert_select() recoverably so that the aborted transaction is rolled back after a DuplicateKeyException or NullValueException

5093 09/28/2012 08:43 AM Aaron Marcuse-Kubitza

tnrs_db: If tnrs.repeated_tnrs_request() stil throws InvalidResponse, skip the current set in case its data caused the error. Note that it will still be tried again the next time tnrs_db is run.

5092 09/28/2012 08:34 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Don't forward scientificName to taxonoccurrence.authortaxoncode when importing just taxonpaths, as for TNRS

5091 09/28/2012 08:30 AM Aaron Marcuse-Kubitza

repeated_tnrs_request(): When retrying after an invalid response, output protocol info for debugging

5090 09/28/2012 08:29 AM Aaron Marcuse-Kubitza

inputs/Makefile: Import logs: Don't download .TNRS/tnrs/tnrs.make.log by default because it changes each time `make inputs/.TNRS/tnrs/tnrs-remake` is run, and any version downloaded for debugging should be preserved. It can still be downloaded by setting the tnrs_log env var.

5089 09/28/2012 08:17 AM Aaron Marcuse-Kubitza

tnrs_client, tnrs_db: Use new tnrs.repeated_tnrs_request()

5088 09/28/2012 08:16 AM Aaron Marcuse-Kubitza

tnrs.py: Added repeated_tnrs_request() to retry a TNRS request which returned an invalid response

5087 09/28/2012 08:05 AM Aaron Marcuse-Kubitza

db_xml.py: put_table(): Fixed bug where pkeys_loc needed to be initialized. Note that this bug was only triggered when importing a table with zero rows (in this case, the initial empty TNRS.tnrs table), because otherwise it would be set in the loop.

5086 09/28/2012 07:57 AM Aaron Marcuse-Kubitza

inputs/Makefile: Import logs: Also download inputs/.TNRS/tnrs/tnrs.make.log

5085 09/28/2012 07:56 AM Aaron Marcuse-Kubitza

inputs/Makefile: Import logs: Use new $(rsync*) to also sync datasources starting with ., such as .TNRS

5084 09/28/2012 07:55 AM Aaron Marcuse-Kubitza

lib/common.Makefile: rsync: Added $(rsync*) to rsync all files, including those starting with "."

5083 09/28/2012 07:43 AM Aaron Marcuse-Kubitza

tnrs.py: parse_response(): Raise custom InvalidResponse exception instead of SystemExit, so callers can catch the exception and respond to it

5082 09/28/2012 07:38 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: taxonpath.taxonomicnamewithauthor _join_words mappings: Added space after taxon rank prefix (var., etc.) for infraspecific ranks

5081 09/27/2012 11:28 AM Aaron Marcuse-Kubitza

import_all: Start the tnrs daemon using `make inputs/.TNRS/tnrs/tnrs-remake &`

5080 09/27/2012 11:25 AM Aaron Marcuse-Kubitza

Added inputs/.TNRS/tnrs/tnrs.make to run tnrs_db on VegBIEN

5079 09/27/2012 11:25 AM Aaron Marcuse-Kubitza

Added tnrs_db to scrub the taxonpaths in VegBIEN using TNRS

5078 09/27/2012 11:19 AM Aaron Marcuse-Kubitza

Regenerated vegbien.ERD exports

5077 09/27/2012 11:17 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath: Made it datasource-general and uniquely identified only by its taxonomicnamewithauthor so that the taxonpaths imported by the TNRS datasource will be matched and used directly when the other datasources are imported

5076 09/27/2012 11:10 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath: taxonpath_unique_within_datasource_by_name unique index: Just do duplicate elimination on the taxonomicnamewithauthor, since that is now a required field and is generated by concatenating all the other fields. Note that the inserted row counts change slightly because the concatenation makes some names equal that are split among the fields differently, such as when the genus is included in the species field.

5075 09/27/2012 10:51 AM Aaron Marcuse-Kubitza

db_xml.py: put(): Added _alt optimization that just returns the first arg if it's non-NULL

5074 09/27/2012 10:49 AM Aaron Marcuse-Kubitza

sql_gen.py: Added is_nullable()

5073 09/27/2012 10:49 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath.taxonomicnamewithauthor: Made it NOT NULL, so that all taxonpaths would have a concatenated name to feed to TNRS

5072 09/27/2012 10:37 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: taxonomic terms: Changed _first to _alt because some datasources have NULL values in scientificNameWithAuthorship or scientificName, so it can't just be used in place of the joined-together taxonomic ranks

5071 09/27/2012 10:19 AM Aaron Marcuse-Kubitza

db_xml.py: put(): Parse input columns and process values in separate loops, so that structural XML function optimization code can be inserted between them

5070 09/27/2012 10:12 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Removed comment that can support in_tables of any fixed-size iterable type, because the iterable must be ordered so that the first table can be treated specially

5069 09/27/2012 10:09 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Support in_tables of any fixed-size iterable type

5068 09/27/2012 09:13 AM Aaron Marcuse-Kubitza

mappings/Veg+-VegCore.csv: cationExchangeCapacity->cationExchangeCapacity_cmol_kg mapping: Removed ? prefix because a mapping to only one set of units is unambiguous (if additional units for cationExchangeCapacity are found, this will become an ambiguous mapping). Note that canon automatically removes punctuation from VegCore terms, so this mapping would previously have had the ? prefix autoremoved anyway (both in inputs/*/*/map.csv and recently also in Veg+-VegCore.csv).

5067 09/27/2012 09:06 AM Aaron Marcuse-Kubitza

mappings/Makefile: .Veg+-VegCore.csv.last_cleanup: Translate VegCore terms using itself so that any mapping to another Veg+ term automatically becomes a mapping to a VegCore term. .VegX-VegCore.csv.last_cleanup: Translate VegCore terms using Veg+-VegCore.csv to keep the terms up to date.

5066 09/27/2012 09:04 AM Aaron Marcuse-Kubitza

mappings/VegX-VegCore.csv: Translated VegCore terms using Veg+-VegCore.csv

5065 09/27/2012 09:00 AM Aaron Marcuse-Kubitza

mappings/Makefile: .VegCore.csv.last_cleanup, .VegCore-VegBIEN.csv.last_cleanup: Apply Veg+-VegCore.csv so that terms can easily be renamed just by adding a mapping in Veg+-VegCore.csv, which will auto-translate all places that use the term. .VegCore-VegBIEN.csv.last_cleanup: Canonicalize to VegCore.csv so case changes in VegCore terms will automatically propagate to VegCore-VegBIEN.csv.

5064 09/27/2012 08:46 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped verbatimScientificNameWithAuthorship, so that it links a verbatim taxonpath to the scrubbed taxonpath created from the primary taxonomic terms

5063 09/27/2012 08:36 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Renamed unscrubbedScientificNameWithAuthorship to the more standard verbatimScientificNameWithAuthorship, which is available now that the original taxondetermination terms use the original* prefix

5062 09/27/2012 08:31 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Renamed verbatim* taxonomic terms to original* because in most datasources, they are in fact for the original taxon determination of the organism (which can be a completely different name than the primary determination), rather than merely unscrubbed versions of the primary taxonomic name elements. Note that SALVIAS's orig_* terms do appear to be merely unscrubbed versions, but it's not a problem to add an additional taxon determination for them.

5061 09/27/2012 08:14 AM Aaron Marcuse-Kubitza

sql.py: pkey(): Get the table's actual primary key column, rather than just using the first column in the table. Continue to return the first column in the table if the table has no primary key.

5060 09/27/2012 07:31 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/postprocess.sql: Use :table var instead of hardcoding the table name

5059 09/27/2012 07:30 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/postprocess.sql: Also add a primary key on Name_submitted, to prevent duplicate entries

5058 09/27/2012 07:27 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/: Added postprocess.sql which makes Name_submitted NOT NULL

5057 09/27/2012 07:25 AM Aaron Marcuse-Kubitza

sql.py: insert(): ignore mode: Also ignore NullValueException

5056 09/27/2012 07:24 AM Aaron Marcuse-Kubitza

input.Makefile: Staging tables installation: %/install: Support custom postprocess.sql which specifies commands to run after the table is imported

5055 09/27/2012 07:10 AM Aaron Marcuse-Kubitza

import_all: Added import of .TNRS datasource, which happens synchronously before other datasources are imported

5054 09/27/2012 07:08 AM Aaron Marcuse-Kubitza

Moved tnrs table from public (schemas/vegbien.sql) to its own TNRS schema, which is created by a new .TNRS datasource. Note that .TNRS is included in the automated testing, but not yet in the import.

5053 09/27/2012 06:57 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Restored subplotID -> if subplot cond mapping, which had been overwritten

5052 09/27/2012 06:46 AM Aaron Marcuse-Kubitza

inputs/ACAD/Specimen/map.csv: Remapped scientificName to scientificNameWithAuthorship

5051 09/27/2012 06:06 AM Aaron Marcuse-Kubitza

sql_io.py: append_csv(): Using INSERT: Use ignore mode to support inserting rows into a table with a unique constraint

5050 09/27/2012 06:05 AM Aaron Marcuse-Kubitza

sql.py: insert(): Added ignore optimization that just suppresses any DuplicateKeyException on the client side, to avoid needing to create a wrapper function just to insert-ignore one row

5049 09/27/2012 05:23 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Synchronized verbatim* and non-verbatim taxonomic terms' mappings

5048 09/27/2012 05:08 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added special term unscrubbedScientificNameWithAuthorship

5047 09/27/2012 05:05 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added verbatimSubspecies, verbatimVariety, verbatimForma, verbatimCultivar (already mapped in VegCore-VegBIEN.csv)

5046 09/27/2012 05:04 AM Aaron Marcuse-Kubitza

mappings/Makefile: .VegCore.csv.last_cleanup: Also remake VegCore-VegBIEN.unsourced_terms.csv here, not just in .VegCore-VegBIEN.csv.last_cleanup, so that the unsourced_terms.csv will be remade if the user adds the missing sources to VegCore.csv

5045 09/27/2012 05:03 AM Aaron Marcuse-Kubitza

mappings/Makefile: VegCore-VegBIEN.unsourced_terms.csv: Factored remake code into its own make target

5044 09/27/2012 04:51 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: verbatim* taxonomic terms: Added taxonomicnamewithauthor mappings analogous to those for the non-verbatim taxonomic terms

5043 09/27/2012 04:29 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added verbatimScientificNameWithAuthorship

5042 09/27/2012 03:50 AM Aaron Marcuse-Kubitza

Added inputs/.public/, which stores mappings that manipulate VegBIEN itself

5041 09/27/2012 03:49 AM Aaron Marcuse-Kubitza

forwarding.Makefile: Differentiate between subdirs which can be sent a command and subdirs which will receive a command broadcast to "all" subdirs

5040 09/27/2012 03:39 AM Aaron Marcuse-Kubitza

README.TXT: Data import: Starting column-based import: Use import_all, which now supports passing custom vars like by_col=1

5039 09/27/2012 03:37 AM Aaron Marcuse-Kubitza

import_all: Pass any args, such as vars, through to with_all

5038 09/27/2012 03:35 AM Aaron Marcuse-Kubitza

with_all: Support additional command-line args for the make target, such as vars

5037 09/27/2012 03:11 AM Aaron Marcuse-Kubitza

sql_io.py: append_csv(): Check that the CSV's header matches the table's columns

5036 09/27/2012 03:08 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Added tnrs table to hold contents of TNRS response

5035 09/27/2012 02:20 AM Aaron Marcuse-Kubitza

input.Makefile: Existing maps discovery: $(anyMap): Inlined patterns used because they are only used here

5034 09/27/2012 01:27 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath_canon_taxonpath_id_self_ref(), placepath_canon_placepath_id_self_ref(): Fixed bug where the pkey could only be prepopulated if it was not already set, in order to support UPDATE as well as INSERT statements

5033 09/27/2012 01:15 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath.canon_taxonpath_id, placepath.canon_placepath_id: Fixed comment describing that the special value 0 creates an automatic self-reference

5032 09/27/2012 01:09 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath.canon_taxonpath_id, placepath.canon_placepath_id: Added trigger to automatically create a self-reference (indicating a scrubbed name) when set to the special value 0

5031 09/27/2012 12:33 AM Aaron Marcuse-Kubitza

input.Makefile: Staging tables installation: `%/install: %/create.sql`: Don't add a row number column to the created table because it is now added automatically to the temp table by column-based import (row-based import now also does not require a pkey for DB inputs)

5030 09/27/2012 12:28 AM Aaron Marcuse-Kubitza

bin/map, db_xml.put_table() (row-based and column-based import): Don't sort the input table by its pkey, in order to support input tables with no pkey. Note that reading the input table in table order and having this match the input flat file's order is only possible with sql_io.import_csv()'s truncation of the table on a failed import, which ensures that the rows will be stored in inserted order.

5029 09/27/2012 12:19 AM Aaron Marcuse-Kubitza

input.Makefile: Staging tables installation: Removed no longer used $(isJoinedTable). Note that it is no longer necessary for joined tables to be suffixed with ".src" to prevent the creation of a row_num column, which collided during joins.

5028 09/27/2012 12:17 AM Aaron Marcuse-Kubitza

csv2db: Removed no longer used has_row_num param

5027 09/27/2012 12:14 AM Aaron Marcuse-Kubitza

sql_io.py: import_csv(): Don't add a row number column to the created table because it is now added automatically to the temp table by column-based import (row-based import now also does not require a pkey for DB inputs)

5026 09/26/2012 11:49 PM Aaron Marcuse-Kubitza

bin/map, db_xml.put_table() (row-based and column-based import): Don't sort the input table by its pkey, in order to support input tables with no pkey. Note that reading the input table in table order and having this match the input flat file's order is only possible with sql_io.import_csv()'s truncation of the table on a failed import, which ensures that the rows will be stored in inserted order.