Project

General

Profile

Statistics
| Revision:

# Date Author Comment
9764 06/06/2013 04:21 PM Aaron Marcuse-Kubitza

inputs/.TNRS/schema.sql: tnrs_populate_fields(): Is_plant: must match family as Family_score = 1 (as discussed during conference call vegpath.org/wiki/2013-05-30_conference_call#postprocess-TNRS-results-to-exclude-animals-with-genus-homonyms) instead of as Family_matched IS NOT NULL (as listed in Brad's formula at vegpath.org/wiki/Result_filtering#TNRS-results) because TNRS transforms animal to plant families via fuzzy matching, necessitating a Family_score check to ensure an exact match to a plant family that was not transformed from an animal family

9763 06/06/2013 03:29 PM Aaron Marcuse-Kubitza

inputs/.TNRS/schema.sql: added Is_plant derived field, which is populated using the formula at vegpath.org/wiki/Result_filtering#TNRS-results . note that the homonym filtering is currently excluded until we determine whether we can get direct access to the IRMNG homonyms database (http://www.cmar.csiro.au/datacentre/irmng/homonyms.htm). note also that changes to the TNRS schema cannot be fully tested until any TNRS client bugs are fixed, because the data.sql updater requires a working TNRS client to regenerate the sample data.

9762 06/06/2013 02:42 PM Aaron Marcuse-Kubitza

inputs/.TNRS/schema.sql: updated for current TSV schema: renamed Accepted_species->Accepted_name_species, Accepted_family->Accepted_name_family

9761 06/06/2013 02:27 PM Aaron Marcuse-Kubitza

bugfix: schemas/vegbien.sql: tnrs_input_name: must anti-join against MatchedTaxon rather than ValidMatchedTaxon to ensure that all of TNRS.tnrs is excluded from the input names. this prevents duplicates from appearing in the TNRS results, which would break the TSV import into TNRS.tnrs. it also prevents no-match names from being scrubbed repeatedly because they were not properly filtered out of the input names.

9760 06/06/2013 02:17 PM Aaron Marcuse-Kubitza

inputs/.TNRS/schema.sql: fixed whitespace

9759 06/06/2013 02:15 PM Aaron Marcuse-Kubitza

inputs/.TNRS/schema.sql: added MatchedTaxon view, which now just renames the columns but does not filter the results, and use it in ValidMatchedTaxon

9758 06/06/2013 02:11 PM Aaron Marcuse-Kubitza

inputs/.TNRS/schema.sql: MatchedTaxon: renamed to ValidMatchedTaxon since this view actually contains only the names with a valid match

9757 06/06/2013 12:59 PM Aaron Marcuse-Kubitza

bugfix: lib/sql.py: parse_exception(): make_DuplicateKeyException(): handle nested exceptions (which should never be generated, but may be in case of sql.py bugs such as wiki.vegpath.org/To_Do#Fixes > #1) by printing the nested exception and then rethrowing the original exception, so that the original exception does not get lost and still ends up at the end of the program's output, to enable debugging

9756 06/06/2013 11:08 AM Aaron Marcuse-Kubitza

inputs/.TNRS/schema.sql: tnrs: documented that when changing this table's schema, you must regenerate data.sql using `inputs/test_taxonomic_names/test_scrub`

9755 06/06/2013 08:09 AM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: table.tsv.gz/make(): documented runtime (35 min)

9754 06/06/2013 07:52 AM Aaron Marcuse-Kubitza

bugfix: schemas/vegbien.sql: analytical_stem_view: speciesBinomialWithMorphospecies: if accepted name not specified, use matched name (matched*) or Name_submitted (concatenatedScientificName), as described at http://wiki.vegpath.org/2013-05-30_conference_call#fix-TNRS-speciesBinomialWithMorphospecies-to-include-alternatives-when-no-accepted-name

9753 06/06/2013 07:24 AM Aaron Marcuse-Kubitza

lib/sh/make.sh: make(): time all invocations of make

9752 06/06/2013 07:14 AM Aaron Marcuse-Kubitza

lib/sh/make.sh: make() at verbosity < 4, hide messages about making included Makefiles: use sed with a range expression (/.../,/.../) to also exclude all log messages between an opening "make ...Makefile" and a closing "make[#]: ...Makefile"

9751 06/06/2013 06:35 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: log+ aliases: added clog++/-- aliases for cmds, which don't include log_local. these are useful when you can't just use "log++" because you need the command following it to be alias-expanded.

9750 06/06/2013 05:52 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/make.sh: make(): use [:char_class:] exprs instead of \X char class abbrs because the \ abbrs are not supported on Linux

9749 06/06/2013 05:33 AM Aaron Marcuse-Kubitza

inputs/GBIF/table.run: table.tsv/make(): remake table.tsv.gz/make() after table.tsv is made

9748 06/06/2013 05:27 AM Aaron Marcuse-Kubitza

inputs/GBIF/table.run: added table.tsv.gz/make()

9747 06/06/2013 05:26 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added bg_cmd() and helpers log_bg(), log_last_bg()

9746 06/06/2013 05:04 AM Aaron Marcuse-Kubitza

lib/runscripts/subdir.run: auto-append -remake to all targets in remake mode

9745 06/06/2013 04:15 AM Aaron Marcuse-Kubitza

lib/runscripts/subdir.run: subdir_make(): put prepending of "$subdir/" on its own line for clarity

9744 06/06/2013 04:00 AM Aaron Marcuse-Kubitza

bugfix: lib/common.Makefile: gzip/gunzip: in `touch -r`, $< needs to be the reference file

9743 06/06/2013 02:36 AM Aaron Marcuse-Kubitza

*{.sh,run}: make() calls: removed no longer applicable silent=1, which is now handled automatically by the log_level mechanism

9742 06/06/2013 02:35 AM Aaron Marcuse-Kubitza

/Makefile: new config target (part of install): install our bin/make in the user's ~/bin dir so that bin/make (with filtering of verbose messages) will always be used instead of standard make (without us needing to change every occurrence of make to bin/make!)

9741 06/06/2013 02:25 AM Aaron Marcuse-Kubitza

bugfix: bin/make: use standard make logging port (1) instead of $log_fd (30) so that the output of bin/make can in turn be filtered by util.sh using the standard cmd_log_fd=1

9740 06/06/2013 02:23 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: command(): print the log_fd in effect in case the user changes it

9739 06/06/2013 02:23 AM Aaron Marcuse-Kubitza

lib/sh/make.sh: make(): log the messages about making included Makefiles at log_level 4 instead of 3, so that verbosity 3 can be used to see the vars being used by the filtering process (i.e. the filtering process must still be enabled at verbosity 3)

9738 06/06/2013 02:00 AM Aaron Marcuse-Kubitza

bin/make: use `readlink -f` on BASH_SOURCE0 so that this script can also be run via a symlink

9737 06/06/2013 01:57 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: no_PATH_recursion(): also remove $top_symlink_dir_abs

9736 06/06/2013 01:56 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added $top_symlink_dir_abs

9735 06/06/2013 01:53 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: $top_dir_orig: renamed to $top_symlink_dir since this reflects better what the dir actually represents, and when it differs from $top_dir

9734 06/06/2013 01:33 AM Aaron Marcuse-Kubitza

lib/sh/make.sh: make(): fixed func name in usage

9733 06/06/2013 01:32 AM Aaron Marcuse-Kubitza

bin/make: don't print make cmd by default, so that only `make` output is printed at verbosity 1

9732 06/06/2013 01:31 AM Aaron Marcuse-Kubitza

bin/make: don't reinvoke make() if the make filter has already been set up, as indicated by $is_outermost (instead, invoke make directly using exec)

9731 06/06/2013 01:30 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added $is_outermost, which stores whether the util.sh env has not yet set up

9730 06/06/2013 01:28 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: echo_redirs_cmd(): added $cmd_name_log_inc kw param to allow echoing the command name at a different log_level than the command output

9729 06/06/2013 12:22 AM Aaron Marcuse-Kubitza

lib/sh/make.sh: make(): log the filter setup operations at log_level 2 so they do not clutter up normal output

9728 06/06/2013 12:13 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: filter_fd: alias-expand filter_cmd

9727 06/06/2013 12:08 AM Aaron Marcuse-Kubitza

added bin/make, which runs make, hiding verbose messages about making included Makefiles. this should be used in preference to plain make, to avoid excessive log messages that prevent the user from seeing the core commands that are being run.

9726 06/06/2013 12:05 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added no_PATH_recursion(), which allows running a system command of the same name as the script

9725 06/06/2013 12:04 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added PATH_rm(), which removes components from the PATH

9724 06/06/2013 12:03 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added $top_dir_abs, $top_dir_orig

9723 06/05/2013 11:44 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: command(): use `builtin command` instead of `exec` so that options like -p (reset PATH) work properly. also, the command builtin it overrides is designed to be used with more than just external commands, and command() should not impose additional limitations.

9722 06/05/2013 10:54 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added self_sys alias, which uses only system utilities (`command -p`) instead of the current PATH

9721 06/05/2013 10:37 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: make(): at verbosity < 3, hide messages about making included Makefiles. this makes the make output much more readable when a Makefile contains an include statement, because there won't be a ton of log messages every time a Makefile is included. this filtering is so useful that it probably makes sense to run make for any of our Makefiles using `lib/runscripts/util.run make ...` instead of plain make. compare e.g. `make inputs/ACAD/Specimen/map.csv` (53 lines of output) and `lib/runscripts/util.run make inputs/ACAD/Specimen/map.csv` (17 lines of output, 1/3 as much).

9720 06/05/2013 10:15 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log++: before cmd: documented that you need to use "log++" instad of log++ to avoid using the log++ alias, which prepends a log_local call. omitting the quotes is generally not a problem, but when there is another command wrapping the log++, you need the "" to avoid the wrapper applying to log_local's declare call instead.

9719 06/05/2013 10:09 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log++: before cmd: documented how to use it as `log+ #` when incrementing multiple log_levels at once (this is a better method than `"log++" "log++" ...`)

9718 06/05/2013 10:04 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log++: before cmd: documented that you need to use it as `"log++" "log++"` when repeating it multiple times

9717 06/05/2013 10:02 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added filter_fd(), which encapsulates the use of >() process substitution for filtering an fd other than stdout (yes, this is possible without lots of 3>&1 1>&2 2>&3 redirections!). this can be useful e.g. to filter logging output or highlight errors.

9716 06/05/2013 09:49 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log+(): documented that with a cmd, assignments are applied just to the cmd, so log_local is not needed

9715 06/05/2013 08:59 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: moved pipe_delay() before fd-related functions so it can be used by them

9714 06/05/2013 08:56 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: removed no longer needed load new aliases before echo_stdin(), since pipe_delay() is now a function

9713 06/05/2013 08:48 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: set_fds(): add #<>&- before every #<>&# reopen: need to use loop var $i instead of $1 (which would have been used with a while/shift method of iterating over $@)

9712 06/05/2013 12:57 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: set_fds(): added workaround for strange bash bug where reopening an fd sometimes first requires explicitly closing it, by adding an <>&- entry for every redirection

9711 06/05/2013 12:53 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added match_prefix()

9710 06/05/2013 03:28 AM Aaron Marcuse-Kubitza

lib/sh/make.sh: make(): determine --silent status based on the verbosity (<=0) instead of a kw param

9709 06/05/2013 03:11 AM Aaron Marcuse-Kubitza

inputs/GBIF/table.run: table.tsv.md5/make(): only use %-remake if remaking

9708 06/05/2013 03:10 AM Aaron Marcuse-Kubitza

lib/sh/make.sh: make(): removed extra space after --silent

9707 06/04/2013 11:17 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: moved mysql_root() after the mysql->mysql_ANSI alias (and load new aliases) so that it will also use ANSI mode and support "" identifiers

9706 06/04/2013 11:15 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: mysql: always use ANSI mode, to support "" identifiers. note that `` are still supported in this mode, so it also works with SHOW CREATE TABLE output and dumpfiles.

9705 06/04/2013 11:05 PM Aaron Marcuse-Kubitza

bugfix: inputs/GBIF/raw_occurrence_record/run: plant_fraction_for_herbaria_filter/make(): need to make prerequisites first (plant_fraction/make)

9704 06/04/2013 06:35 PM Aaron Marcuse-Kubitza

bugfix: inputs/GBIF/table.run: table.tsv.md5/make(): use %-remake to ensure that the .md5 file is remade, regardless of the .md5 file's mtime relative to table.tsv. you would generally expect table.tsv's new mtime to be newer than the .md5 file's (thus triggering make to run), but if you e.g. ran svn up after making the table.tsv, this might not be the case.

9703 06/04/2013 06:31 PM Aaron Marcuse-Kubitza

/Makefile: moved %/remake, %-remake to lib/common.Makefile because they are generally useful

9702 06/04/2013 06:26 PM Aaron Marcuse-Kubitza

/Makefile: moved %/reinstall to lib/common.Makefile because it is generally useful

9701 06/04/2013 06:07 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: mysql_cmd(): run the command with `time` because in mysql()'s output_data mode, no queries, and therefore no runtimes, are echoed, so the total runtime needs to be echoed separately instead. the total runtime is also useful in general, when many long-running queries are run and you would also like to know the total time (e.g. in make_analytical_db).

9700 06/04/2013 05:54 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: limit(): usage: surrounded query in "" to clarify that it's a string, not a command

9699 06/01/2013 09:32 PM Aaron Marcuse-Kubitza

inputs/GBIF/table.run: table.tsv/make(): use new set_large_table to prevent table.tsv from being deleted on error for full export runs (while still deleting it on error for sample subset runs)

9698 06/01/2013 09:31 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: added set_large_table alias, used to set to_file's $del flag based on $limit

9697 06/01/2013 09:30 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added exit2bool()

9696 06/01/2013 09:18 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: int2bool(): renamed to int2exit() because it actually sets a boolean exit status rather than returning a boolean string

9695 06/01/2013 09:07 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: to_file(): also kw_params the other kw params if_not_exists, del

9694 06/01/2013 07:02 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: mysql_cmd(): use --quick to avoid buffering entire result (which is slow and memory-intensive for large result sets). this option applies to both mysql() and mysqldump().

9693 06/01/2013 06:35 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: self_make(): documented that it should be preceded by set_make_vars

9692 06/01/2013 06:34 PM Aaron Marcuse-Kubitza

bugfix: inputs/GBIF/_MySQL/GBIFPortalDB-2013-02-20.data.sql.run: ^.preamble.sql/make(): need to run set_make_vars even though the make vars are not used, because set_make_vars sets $_remake, which is needed by self_make

9691 06/01/2013 06:33 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: set_make_vars: echo_vars $_remake to help debugging

9690 06/01/2013 06:27 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: to_file(): need to run invoked cmd using redir so that >$stdout redir is applied properly when cmd is a shell function instead of an external command (external commands were already redirected properly because command() calls redir). this fixes a bug in inputs/GBIF/_MySQL/GBIFPortalDB-2013-02-20.data.sql.run ^.preamble.sql/make(), where the generated file would be output to stdout instead of to the file because to_file()'s command was a shell function, and therefore the redirection was not applied. this fix requires redir() to be a separate function from command(), because command() does many things that are only applicable to external commands.

9689 06/01/2013 06:20 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: redir(): override save_e and add `unset redirs` so error handlers are not redirected

9688 06/01/2013 06:15 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added alias_append(), similar to func_override() for aliases

9687 06/01/2013 06:05 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: redir(): don't do redir actions if redir will be run later (i.e. if command to run starts with `redir` or `command`)

9686 06/01/2013 06:04 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: redir(), command(): log their function calls at the usual log_level (2) instead of one higher, so that they are printed in the call tree to help debugging

9685 06/01/2013 05:39 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added redir() and use it in command() to perform and echo the redirections

9684 06/01/2013 09:35 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: command(): removed comment that "the following redirections must happen in exactly this order", because there is now only one redirection

9683 06/01/2013 06:01 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: command(): removed 2>&$err_fd, which is no longer needed because $err_fd is now 2 (in general, there is probably not a need for a special $err_fd var, because 2 is already stderr)

9682 06/01/2013 05:52 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: command(): don't set err_fd to global stderr, because this prevents errors from being captured and parsed by callers. it is also not necessary to use a separate port than stderr, because stderr already contains only errors (since logging messages go to their own port). global stderr would still be useful e.g. for displaying input prompts the user when reading from global stdin.

9681 06/01/2013 05:17 AM Aaron Marcuse-Kubitza

bugfix: *run: overriding targets: use new self_make to properly progagate the $remake flag to the overridden target, so that the target itself is not skipped

9680 06/01/2013 05:15 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: to_file(): added del= flag to prevent the file from being auto-removed on error (e.g. to preserve a partial result, which normally would be removed)

9679 06/01/2013 05:12 AM Aaron Marcuse-Kubitza

lib/sh/make.sh: added self_make(), which progagates the $remake flag (normally it is not progagated, because prerequisites should not also be remade)

9678 06/01/2013 03:58 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: usage comments: when there is a descriptive comment on the same line as the usage, prepend it with # (as if it were an end-of-line comment) instead of enclosing it in (), to make it visually obvious that it's a comment and not part of the usage commands

9677 06/01/2013 03:54 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added all_funcs(), which lists all declared functions

9676 06/01/2013 03:31 AM Aaron Marcuse-Kubitza

bugfix: inputs/GBIF/raw_occurrence_record/run: table.tsv/make(): added check_target_exists so table.tsv would not be overwritten if it already existed

9675 06/01/2013 03:30 AM Aaron Marcuse-Kubitza

bugfix: inputs/GBIF/table.run: table.tsv/make(): force table.tsv.md5 to be remade (using remake=1) because the table.tsv contents will have changed

9674 06/01/2013 03:29 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/make.sh: set_make_vars: can't use end-of-line comment in alias because it will comment out whatever is after the alias where it's used. can't just put a newline or ; after the end-of-line comment because the alias's lines will be combined onto one line using ; , so end-of-line comments would not be supported.

9673 06/01/2013 03:23 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added pf(), to print a function declaration for debugging

9672 06/01/2013 02:08 AM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: plant_fraction/make(): documented runtime (1 hr)

9671 06/01/2013 01:19 AM Aaron Marcuse-Kubitza

*.url: mailto URLs: use the standard e-mail dotpath syntax e-mail@host?name.date.subject.(attachment) (vegpath.org/wiki/Global_IDs#Resource). populated missing fields (e.g. name, subject) where needed.

9670 06/01/2013 12:12 AM Aaron Marcuse-Kubitza

*.url: mailto URLs: ensured that they are proper URLs with the mailto: protocol

9669 05/30/2013 08:32 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: to_file(): exc handler that rm's file: unset redirs so it isn't used in the rm cmd

9668 05/30/2013 08:22 PM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: herbaria_filter/make(): removed no longer needed explicit clear of $remake, which is now done by make.sh instead

9667 05/30/2013 08:18 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: set_make_vars: don't progagate remake to prerequisites, so that remake=1 only applies to the outermost target rather than forcing every prerequisite to be remade, too

9666 05/30/2013 07:58 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: moved remaking section before set_make_vars so that it can be used in set_make_vars

9665 05/30/2013 07:53 PM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: added herbaria_filter/seal()