Project

General

Profile

Statistics
| Revision:

# Date Author Comment
5205 10/03/2012 08:35 AM Aaron Marcuse-Kubitza

README.TXT: Data import: Run import_all in the background, because it needs to import all the taxonomic names synchronously before it can start the datasource import in the background

5204 10/03/2012 08:19 AM Aaron Marcuse-Kubitza

Regenerated vegbien.ERD exports

5203 10/03/2012 08:14 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Mapped Unmatched_terms to morphospecies because the morphospecies is what's left once named ranks are matched

5202 10/03/2012 08:11 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped morphospecies

5201 10/03/2012 08:08 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added morphospecies

5200 10/03/2012 08:04 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath: Added morphospecies

5199 10/03/2012 07:43 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/test.xml.ref: Updated for latest TNRS output

5198 10/03/2012 06:40 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Infraspecific_rank_2, Infraspecific_epithet_2_*: Mapped to UNUSED because they do not appear to be provided by TNRS (it just puts additional infraspecific names in Unmatched_terms)

5197 10/03/2012 06:34 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Omit Infraspecific_rank because Name_matched_rank contains the unabbreviated rank and is provided more often

5196 10/03/2012 06:29 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Also map TNRS-parsed infraspecificEpithet (Infraspecific_epithet_matched) to taxon at the infraspecies rank

5195 10/03/2012 06:07 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Also map TNRS-parsed taxonomic ranks to the tree of life in the taxon table

5194 10/03/2012 05:18 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxon: Added comment that this table stores the tree of life

5193 10/03/2012 05:00 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: accepted taxonomic terms: Use new _set_canon_taxonpath() to set the canon_taxonpath_id after the taxonpath has been inserted, so that if the taxonpath is an accepted name (scrubs to itself), it will link up to the just-inserted taxonpath with the taxonomic ranks parsed out, rather than to a new taxonpath containing only the few taxonomic ranks of the accepted name that TNRS provides. In particular, this (together with the tnrs_accepted_names sorting index on TNRS.tnrs) ensures that an accepted name is imported with its genus and species parsed out by TNRS instead of concatenated together in the Accepted_name_species field (genus+species). This enables the individual taxonomic ranks to be used in constructing the leaves of the tree of life (the taxon table).

5192 10/03/2012 04:50 AM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Fixed bug where row_ct_ref was incorrectly being incremented when the iteration is a function call. This bug only occurred in row-based mode, because the DB cursor for a function call is not stored in column-based mode.

5191 10/03/2012 04:30 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Use Name_matched_author/Name_matched_accepted_family instead of Author_matched/Family_matched because these fields are provided more often, due to being determined from the matched name itself rather than from the original string. This helps to fill in as many fields as possible. For accepted names (which scrub to themselves), this is especially important, because it adds the accepted name's family, which is not present in the input taxonomic name.

5190 10/03/2012 03:58 AM Aaron Marcuse-Kubitza

xml_func.py: process(): Fixed bug where need to preserve complex functions that have unevaluated XML nodes as arguments, because XML nodes are not accepted by sql_io.put() (they are handled by db_xml.put())

5189 10/03/2012 03:08 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Renamed set_canon_taxonpath() to _set_canon_taxonpath() (adding _ prefix) so that db_xml.put() treats its arguments as arguments rather than as children with fkeys to parent

5188 10/03/2012 03:02 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Added set_canon_taxonpath() to set a taxonpath's canon_taxonpath_id after it has been created

5187 10/03/2012 02:48 AM Aaron Marcuse-Kubitza

Added inputs/.TNRS/tnrs/cleanup.sql to cluster TNRS.tnrs on tnrs_accepted_names. This keeps TNRS.tnrs sorted with the accepted names first.

5186 10/03/2012 02:46 AM Aaron Marcuse-Kubitza

input.Makefile: Staging tables installation: %/cleanup: Also run any custom cleanup.sql provided in the subdir. %/install: Removed processing of postprocess.sql because no datasources are using it and because cleanup.sql can now be used for this purpose.

5185 10/03/2012 02:39 AM Aaron Marcuse-Kubitza

inputs/.TNRS/schema.sql: tnrs: Added tnrs_accepted_names index, which sorts accepted names first, and cluster the table on this index. This ensures that the component-parsed entries for accepted names are created before any verbatim names that point to them.

5184 10/03/2012 02:37 AM Aaron Marcuse-Kubitza

input.Makefile: Staging tables installation: %/cleanup: Documented that this removes any index comments, due to a PostgreSQL bug. (This occurs because ALTER TABLE recreates the index but not its comment.)

5183 10/03/2012 01:55 AM Aaron Marcuse-Kubitza

inputs/.TNRS/schema.sql: Removed hardcoded schema name

5182 10/03/2012 01:18 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Changed Name_matched_accepted_family comment to match analogous Name_matched_author comment

5181 10/03/2012 01:17 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Remapped Author_matched as the scientificNameAuthorship instead of Name_matched_author, because Name_matched_author contains the author based on the matched name, not the author in the original string, so it's not strictly from the original name

5180 10/03/2012 12:33 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added acceptedBinomial, originalBinomial

5179 10/03/2012 12:29 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added binomial

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

inputs/.TNRS/tnrs/map.csv: Mapped Specific_epithet_matched

5177 10/02/2012 11:53 PM Aaron Marcuse-Kubitza

Added inputs/test_taxonomic_names/

5176 10/02/2012 11:37 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: taxonoccurrence.authortaxoncode: Only populate if needed to distinguish the taxonoccurrence within a plot

5175 10/02/2012 11:24 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: placepath: Removed no longer used placepath_unique constraint on place_id. Removed place_id from placepath_unique_within_datasource_by_name unique index because otherranks is now used to store custom ranks.

5174 10/02/2012 11:23 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: placepath: Removed no longer used placepath_unique constraint on place_id. Removed place_id from placepath_unique_within_datasource_by_name unique index because otherranks is now used to store custom ranks.

5173 10/02/2012 11:14 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath, placepath: Added *_required_key check constraints to ensure that empty entries are not created when a row does not have taxonpath/placepath data

5172 10/02/2012 10:35 PM Aaron Marcuse-Kubitza

import_all: Use new dedicated cleanup make target to clean up TNRS.tnrs

5171 10/02/2012 09:54 PM Aaron Marcuse-Kubitza

tnrs.py: encode_map: Added hidden minus sign, which TNRS removes

5170 10/02/2012 09:44 PM Aaron Marcuse-Kubitza

csvs.py: tsv_encode_map: Escape \n as \n (instead of as a \ followed by a newline) for clarity. Added escape for \r by using strings.json_encode_map. TsvReader: Decode all escapes in tsv_encode_map.

5169 10/02/2012 09:25 PM Aaron Marcuse-Kubitza

tnrs.py: encode_map: Added × (times), which TNRS replaces with x

5168 10/02/2012 09:18 PM Aaron Marcuse-Kubitza

tnrs.py: encode_map: Added " and ', which TNRS removes when at the beginning or end

5167 10/02/2012 09:12 PM Aaron Marcuse-Kubitza

tnrs.py: encode_map: Documented why each character needs to be encoded

5166 10/02/2012 09:04 PM Aaron Marcuse-Kubitza

tnrs.py: encode_map: Removed '&', which is actually not a special character for TNRS (although ';' is)

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

tnrs.py: encode_map: Added '_', which TNRS replaces with space

5164 10/02/2012 08:56 PM Aaron Marcuse-Kubitza

sql_io.py: append_csv(): In INSERT mode, print # rows read (different from # lines read if some fields contained embedded newlines) and # rows inserted (different from # rows read if some violated a constraint)

5163 10/02/2012 08:42 PM Aaron Marcuse-Kubitza

sql.py: insert(): Explicitly return None if the insert failed and a DuplicateKeyException or NullValueException was suppressed

5162 10/02/2012 07:13 PM Aaron Marcuse-Kubitza

input.Makefile: Staging tables installation: $(logInstall*Add): Fixed bug where the existing install log would be overwritten in quiet mode, even though this function should append its output to the log. Note that plain $(logInstall*) always overwrites the existing install log because it is used by the first install command.

5161 10/02/2012 06:53 PM Aaron Marcuse-Kubitza

strings.py: json_encode(): Fixed bug where '\n' and '\r' also needed to be encoded

5160 10/02/2012 06:50 PM Aaron Marcuse-Kubitza

tnrs.py: repeated_tnrs_request(): Also retry request in debug mode if an HTTPError is thrown, so that debugging info can also be obtained if there is a bug in the TNRS client

5159 10/01/2012 10:44 PM Aaron Marcuse-Kubitza

tnrs_db: Updated query for new three-level taxonpath hierarchy, where the concatenated name is now stored in identifyingtaxonomicname instead of taxonomicnamewithauthor

5158 10/01/2012 10:41 PM Aaron Marcuse-Kubitza

root map: Removed no longer needed public schema override, which is now handled by vegbien_dest

5157 10/01/2012 10:40 PM Aaron Marcuse-Kubitza

vegbien_dest: Allow user to specify a custom public schema in the $public env var. This makes custom public schema functionality available to all VegBIEN-accessing scripts, not just map.

5156 10/01/2012 10:12 PM Aaron Marcuse-Kubitza

tnrs_db: Adjusted pause, max_pause so the daemon waits longer before exiting, because after the initial TNRS run, most names have already been scrubbed and new names may not be added until the end of the import (in the case of a very large new datasource)

5155 10/01/2012 09:44 PM Aaron Marcuse-Kubitza

input.Makefile: Staging tables installation: Added cleanup, %/cleanup to clean up already-installed tables

5154 10/01/2012 09:36 PM Aaron Marcuse-Kubitza

tnrs.py: encode(): Also prepend special padding string to empty and whitespace-only strings because these names are otherwise ignored by TNRS (no response row)

5153 10/01/2012 09:15 PM Aaron Marcuse-Kubitza

tnrs_db: pause: Increased to 30 min because if no new names are available in TNRS.tnrs, there is no need to check every minute for new names (which clutters up the log file output). The pause feature is designed to allow tnrs_db to run in parallel with the import process, and process new names as they are made available, which only happens once for each partition of each datasource.

5152 10/01/2012 09:11 PM Aaron Marcuse-Kubitza

tnrs_db: Fixed bug where the new filtering out of already-scrubbed names caused names to be skipped, because the loop would both advance by the number of rows found and those rows would no longer be returned by the query, causing only every other set of rows to be processed

5151 10/01/2012 08:58 PM Aaron Marcuse-Kubitza

tnrs.py: tnrs_request(): Rewrapped lines (became >80 chars after adding profiling)

5150 10/01/2012 08:52 PM Aaron Marcuse-Kubitza

tnrs.py: tnrs_request(): Use new encode() and TnrsOutputStream to escape TNRS-invalid characters

5149 10/01/2012 08:51 PM Aaron Marcuse-Kubitza

tnrs.py: Added encode(), decode(), decode_for_tsv(), and TnrsOutputStream to handle escaping TNRS-invalid characters

5148 10/01/2012 08:48 PM Aaron Marcuse-Kubitza

strings.py: Added regexp_repl_esc()

5147 10/01/2012 08:47 PM Aaron Marcuse-Kubitza

strings.py: Added replace_all() and replace_all_re(), as well as flip_map() for use with maps for these functions

5146 10/01/2012 08:46 PM Aaron Marcuse-Kubitza

csvs.py: Added tsv_encode_map for use in creating TSVs parsed by TsvReader

5145 10/01/2012 06:42 PM Aaron Marcuse-Kubitza

csvs.py: TsvReader: Also interpret '\t' as a tab, to provide a mechanism for encoding embedded tabs

5144 10/01/2012 05:47 PM Aaron Marcuse-Kubitza

tnrs.py: gwt_encode(): Escape special characters in the string instead of removing them, so that TNRS receives the original name rather than a modified version. This will help make the submitted names match up with the returned Name_submitted.

5143 10/01/2012 05:45 PM Aaron Marcuse-Kubitza

strings.py: Added json_encode()

5142 10/01/2012 05:44 PM Aaron Marcuse-Kubitza

strings.py: Added esc_quotes()

5141 10/01/2012 04:52 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: placepath.canon_placepath_id: Changed hierarchy comment to match the taxonpath.canon_taxonpath_id comment, but with a two-level hierarchy of datasource name -> accepted name. This may later be changed to a three-level hierarchy like taxonpath.canon_taxonpath_id depending on how GNRS works.

5140 10/01/2012 04:49 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath.canon_taxonpath_id: Changed comment to specify that taxonpaths should now be linked in a three-level hierarchy of datasource name -> concatenated name -> accepted name

5139 10/01/2012 04:45 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath, placepath: Changed "scrubbed" to "accepted" to emphasize that the name is the accepted name returned by TNRS or GNRS, rather than merely the matched name

5138 10/01/2012 04:38 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: non-TNRS taxonpaths: Store the concatenated identifyingtaxonomicname in a separate taxonpath owned by the TNRS datasource, so that it will match up with (and create a link to) the corresponding submitted TNRS name's taxonpath. This in turn is linked to the TNRS-determined accepted name, thus creating a three-level hierarchy of datasource name -> concatenated name -> accepted name.

5137 10/01/2012 03:59 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: taxonomic terms: Remapped the concatenated taxonomic name to new identifyingtaxonomicname to use it directly to match up with the TNRS submitted name. Continue to map scientificNameWithAuthorship to taxonomicnamewithauthor.

5136 10/01/2012 03:56 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath: Renamed plantcode to identifyingtaxonomicname so that it can be used to store the concatenated taxonomicname that gets scrubbed. This enables ignoring the name components when the full name is specified, so that when a TNRS submitted name's matched components are included in its taxonpath, this will not prevent a datasource's concatenated name (without the matched components) from matching up with the corresponding TNRS submitted name.

5135 10/01/2012 03:25 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath: Made taxonomicnamewithauthor optional again and include all columns in the taxonpath_unique_within_datasource_by_name unique index so that the original name components can be stored in a separate taxonpath from the taxonpath with the concatenated taxonomic name. (The datasource's taxonpath would not always contain an entry for taxonomicnamewithauthor, so the other columns also need to be used in the unique index.)

5134 10/01/2012 02:57 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonpath: Added back datasource_id, plantcode to make taxonpath datasource-specific again. This way, the original name components can still be stored in taxonpath, in addition to storing the concatenated name in a datasource-general taxonpath for use by TNRS.

5133 09/28/2012 03:46 PM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Mapped columns for components of original, submitted name

5132 09/28/2012 03:33 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv, VegCore.csv: Removed no longer used verbatimScientificNameWithAuthorship. Use scientificNameWithAuthorship instead, and map accepted (scrubbed) names to acceptedScientificNameWithAuthorship to create the canon_taxonpath_id link.

5131 09/28/2012 03:28 PM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Remapped to new accepted* taxonomic terms

5130 09/28/2012 03:23 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped accepted* taxonomic terms

5129 09/28/2012 03:00 PM Aaron Marcuse-Kubitza

sql_io.py: cleanup_table(): Don't clean up the pkey, because the canonicalization involved may produce collisions (as it does for TNRS.tnrs)

5128 09/28/2012 02:58 PM Aaron Marcuse-Kubitza

sql.py: Added pkey_col_()

5127 09/28/2012 02:31 PM Aaron Marcuse-Kubitza

tnrs.py: tnrs_request(): Added comment that names containing only whitespace characters are ignored by TNRS and do not receive a response row. Our tnrs_db and reimport pipeline handles the necessary re-matching-up by just creating taxonpaths for each Name_submitted, and then letting the data import process on the following import attach to the prepopulated taxonpaths.

5126 09/28/2012 02:17 PM Aaron Marcuse-Kubitza

tnrs_db: Exclude taxonomic names which have already been scrubbed, by using a filter-out LEFT JOIN on TNRS.tnrs

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