Project

General

Profile

Statistics
| Revision:

# Date Author Comment
9454 05/17/2013 01:08 PM Aaron Marcuse-Kubitza

added lib/ints.py with renamings of max()->set_*min*(), min()->set_*max*() for easier understandability of the set-ceiling/set-floor use cases of min()/max()

9453 05/17/2013 12:57 PM Aaron Marcuse-Kubitza

bin/map: Set default verbosity: by_col: documented that showing all queries is primarily to assist debugging, not profiling

9452 05/17/2013 11:59 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: logging: named it `log++`

9451 05/17/2013 11:59 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: logging: verbosities: level 0: documented that log++ also suppresses external command output for full support of cron jobs

9450 05/17/2013 11:57 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: logging: documented `make` equivalents of the various verbosities, where available. (many of the verbosities, such as level 1, are sorely needed in make to avoid excessive output.)

  1. verbosities (and `make` equivalents):
  2. 0: just print errors. useful for cron jobs....
9449 05/17/2013 04:03 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: die_e(): benign errors: increase log_level so that a benign non-zero exit status will only be displayed at debug verbosities (2+) (it is confusing otherwise)

9448 05/17/2013 03:36 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: try(): always run the command with benign_error=1 so that any die_e() doesn't prematurely indicate that a particular exit status was an error

9447 05/17/2013 03:34 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: die_e(): support benign errors using $benign_error flag that should be logged as info messages instead of errors

9446 05/17/2013 03:30 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: die(): documented that msg can't use $() (because it would reset $?)

9445 05/17/2013 03:19 AM Aaron Marcuse-Kubitza

inputs/bien_web/observation/VegBIEN.csv, unmapped_terms.csv: regenerated

9444 05/17/2013 03:01 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: command(): 2>&$err_fd: add to _redirs after echoing command so it isn't echoed at the end of every command (since this redirection is frequently applied)

9443 05/17/2013 02:55 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: sed: use case statement instead of test to determine flag letter, to easily allow matching multiple `uname` OSes or adding additional flag letters

9442 05/17/2013 02:46 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: die(): documented that its msg can use $?, because it has not yet been overridden by another command

9441 05/17/2013 02:45 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: die_e(): use die(), which performs the necessary save_e/rethrow. this requires using $? instead of $e for the exit status, because $e has not yet been set.

9440 05/17/2013 02:42 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: inlined log_e() into die_e() because that's the only place it's used

9439 05/17/2013 02:37 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: command(): print "command exited with error" message using new die_e() if command returns false. this requires removing manual die_e()/log_e() calls elsewhere.

9438 05/17/2013 02:34 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: command(): moved increase of indent inside () so that error-handling statements after () will use the outer log_level

9437 05/17/2013 02:31 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added die_e(), which logs that a command exited with an error

9436 05/17/2013 02:18 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: command(): determine redirections before echoing the command so they can be logged along with the command, instead of as separate exec statements. (these had a higher log_level to avoid cluttering the output with `exec` lines, which usually suppressed the redirections completely.) inline the command__set_fds() nested func so the redirections are all in one place.

9435 05/17/2013 01:54 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: use simpler `if can_log; then indent; fi` instead of `can_log && indent || true`. however, the `&& indent || true` syntax is still required in aliases such as echo_func which need to allow prefixing the command with a wrapper command or kw param assignments.

9434 05/16/2013 09:28 PM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: dynamically generate herbaria_filter.csv_ from herbaria.ih in new target herbaria_filter.csv_/make()

9433 05/16/2013 09:27 PM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: store the herbaria filter in a MySQL table loaded from a CSV instead of getting it from a hardcoded list of IN (...) values

9432 05/16/2013 09:24 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: added truncate()

9431 05/16/2013 09:23 PM Aaron Marcuse-Kubitza

lib/sh/make.sh: set_make_vars: set $target_stem

9430 05/16/2013 08:49 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: added mysql_import()

9429 05/16/2013 07:02 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: removed no longer used mk_esc_name()

9428 05/16/2013 07:01 PM Aaron Marcuse-Kubitza

lib/runscripts/table.run: don't mk_esc_name schema, table because these will be mk_esc_name'd by functions that use them

9427 05/16/2013 06:55 PM Aaron Marcuse-Kubitza

lib/sh/local.sh: psql(): use $schema_esc, $table_esc instead of just putting $schema, $table in ""

9426 05/16/2013 06:48 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: mk_esc_name_alias(): don't overwrite an already-defined $*_esc, to allow the user to provide an already-escaped value (such as a schema-qualified table) directly

9425 05/16/2013 06:38 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: rtrim(): increase the log_level of sed to 4+ instead of 2+ because it is usually run as part of a var assignment, and should therefore have a lower log_level than echo_vars

9424 05/16/2013 06:32 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: mk_esc_name_alias(): echo_vars the *_esc var when it's set

9423 05/16/2013 06:31 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: added mk_esc_name_alias() and use it to create mk_schema_esc, mk_table_esc

9422 05/16/2013 05:55 PM Aaron Marcuse-Kubitza

lib/sh/db.sh: mysql(): run with --local-infile=1

9421 05/16/2013 05:48 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/db.sh: log_sql(): use can_log() instead because the verbosity now gets decremented as the log_level increases, so the threshold to compare to is 0 instead of 2

9420 05/16/2013 05:46 PM Aaron Marcuse-Kubitza

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

9419 05/16/2013 05:45 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: rtrim(): run at higher log_level so that sed command is not normally echoed

9418 05/16/2013 04:40 PM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: renamed herbaria.sql to herbaria.data.sql so it wouldn't be added to svn by `make inputs/GBIF/raw_occurrence_record/add` or `make inputs/add`

9417 05/16/2013 04:38 PM Aaron Marcuse-Kubitza

inputs/input.Makefile: $(svnFiles): also exclude *.data.sql, which should never be in svn

9416 05/16/2013 04:27 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: cultivated_family_locations: documented that table is from sftp://nimoy.nceas.ucsb.edu/home/bien/bien2_scripts/geoscrub/cultivated/cult_by_taxon/flag_by_taxa.inc (i.e. not generated by a function)

9415 05/16/2013 04:15 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: place.geovalid: added latLongDomainValid to the values to _and together

9414 05/16/2013 04:09 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: place.geovalid: require it to be NOT NULL so that it's always a 2-valued boolean (but default it to false since it's not a required field)

9413 05/16/2013 04:06 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: place.geovalid: use false instead of NULL

9412 05/16/2013 03:46 PM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: table.tsv/make(): exclude deleted rows (i.e. where the deleted timestamp is non-NULL)

9411 05/16/2013 03:42 PM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/header.csv: regenerated using ./run. since the table is reimported as a CSV, it uses bin/csv2db, which prepends an additional row_num column.

9410 05/16/2013 03:09 PM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: table.tsv/make(): remove explicit cols list to include all cols. the file size of the generated table.tsv will increase by ~3x, but should remain reasonably-sized compared to our available disk space.

9409 05/16/2013 03:04 PM Aaron Marcuse-Kubitza

bugfix: inputs/GBIF/raw_occurrence_record/run: table.tsv/make(): need \ line continuation after vars so they only apply to the command rather than being set as global vars

9408 05/16/2013 03:02 PM Aaron Marcuse-Kubitza

bugfix: lib/runscripts/table.run: load_data(): use new $verbosity_min instead of running `verbosity_min` so that the command name logging is not output with the new verbosity

9407 05/16/2013 02:59 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: added $verbosity_min to set a `verbosity_min` value after the command name, etc. has been logged, so that the logging itself is not output with the new verbosity

9406 05/16/2013 02:38 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: range_modeling_input: include only plants (i.e. rows with higher_plant_group IS NOT NULL)

9405 05/16/2013 02:36 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: range_modeling_input: added higher_plant_group, for use in restricting rows to plants

9404 05/16/2013 02:24 PM Aaron Marcuse-Kubitza

inputs/.geoscrub/geoscrub_output/map.csv: *validity: added definitions of the numeric codes from _src/README.TXT

9403 05/16/2013 01:11 PM Aaron Marcuse-Kubitza

added planning/workflow/validation/GeoDistKM.sql.txt

9402 05/16/2013 12:42 PM Aaron Marcuse-Kubitza

planning/goals/BIEN3_derived_data_products.docx: updated to most recent version from Brad's e-mail on 2013-4-16

9401 05/16/2013 11:18 AM Aaron Marcuse-Kubitza

/README.TXT: Full database import: before running screen: added `unset TMOUT` because TMOUT (autologout) causes screen to exit even with background processes active

9400 05/16/2013 11:17 AM Aaron Marcuse-Kubitza

/README.TXT: Maintenance: added things to put in your .profile on a live machine (e.g. vegbiendev). in particular, you MUST NOT have a TMOUT (autologout) set, because this causes screen to exit even if background processes (e.g. from column-based import) are running

9399 05/16/2013 11:15 AM Aaron Marcuse-Kubitza

/README.TXT: Maintenance: added things to put in your .profile on a live machine (e.g. vegbiendev). in particular, you MUST NOT have a TMOUT (autologout) set, because this causes screen to exit even if background processes (e.g. from column-based import) are running

9398 05/16/2013 06:15 AM Aaron Marcuse-Kubitza

bugfix: lib/runscripts/table.run: load_data(): need to ensure the verbosity is at least 3 because the install logs require verbose output. (3 is the default for the installer, but is overridden by the runscripts, which instead set the default to 1.)

9397 05/16/2013 06:13 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: logging: added verbosity_min()

9396 05/16/2013 06:00 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: logging: added verbosity_int() and use it instead of `round_down "$verbosity"`

9395 05/16/2013 02:08 AM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: log+ alias: don't expand next word because it's not a cmd

9394 05/16/2013 01:59 AM Aaron Marcuse-Kubitza

lib/runscripts/table.run: $schema, $table: log the `cd` used to calculate the value at log_level 3 instead of 1 (note that the cd() function call for this will be logged at log_level 5)

9393 05/16/2013 01:51 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: cd(): trace-log the cd() function call itself (at log_level 3) in addition to the cd builtin call

9392 05/15/2013 11:28 PM Aaron Marcuse-Kubitza

lib/runscripts/table.run: import(): added step to load the data into the staging table before postprocessing it

9391 05/15/2013 11:27 PM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: moved table.tsv.md5/make() and invocation of it to inputs/GBIF/table.run because it's general to all tables (which would all use table.tsv for this datasource). use $target_filename in calling table.tsv.md5/make from table.tsv/make.

9390 05/15/2013 11:21 PM Aaron Marcuse-Kubitza

bugfix: lib/sql.py: parse_exception(): typed_name_re: need to ensure that full name is matched rather than just first character

9389 05/15/2013 10:26 PM Aaron Marcuse-Kubitza

web/links/index.htm: updated to Firefox bookmarks. Mountain Lion upgrade: added Python psycopg2, Python OrderedDict, X11.

9388 05/15/2013 07:51 PM Aaron Marcuse-Kubitza

lib/runscripts/table.run: table_make(): run canon_rel_path on the datasrc dir so it's displayed as the direct path to it, without ..

9387 05/15/2013 07:47 PM Aaron Marcuse-Kubitza

lib/runscripts/table.run: table_make(): moved comment about "${@/#/$table/}" to right after the line it describes

9386 05/15/2013 07:44 PM Aaron Marcuse-Kubitza

lib/runscripts/table.run: input_make(): renamed to table_make() to make it clear that the target names are relative to the table subdir itself, not the datasrc dir. it was previously called input_make because it used inputs/input.Makefile directly, but now will use any Makefile in the datasrc dir.

9385 05/15/2013 06:44 PM Aaron Marcuse-Kubitza

added inputs/GBIF/Makefile, which links to ../input.Makefile, to allow running make directly in the datasrc dir (i.e. without --makefile=.../input.Makefile). this is required by the runscripts.

9384 05/15/2013 03:34 PM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: table.tsv.md5/make(): don't add extra .md5 extension to $target_filename because it already has the extension as part of the target name (now that this command is run in its own make target rather than in table.tsv/make())

9383 05/15/2013 03:30 PM Aaron Marcuse-Kubitza

lib/sql_gen.py: import OrderedDict from collections instead of ordereddict for Mac 10.8 Mountain Lion upgrade

9382 05/15/2013 02:29 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: logging: renamed $log_level_indent to $log_indent_step to avoid confusion with the log_level, which is a different kind of indent (using + signs instead of |s)

9381 05/15/2013 02:26 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: logging: also export PS4, because it follows verbosity and therefore also needs to be propagated to invoked commands

9380 05/15/2013 02:21 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: can_log(): support decimal verbosities using round_down()

9379 05/15/2013 02:21 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: always use echo_export instead of export, even when the verbosity at load time would suppress output, because the verbosity may actually increase during the script due to log-- calls, etc., and vars should then still be echoed as expected

9378 05/15/2013 02:17 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log+: inlined PS4_prefix_n alias because there is now room for it

9377 05/15/2013 02:16 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log+: $verbosity: support decimal verbosities (but not decimal log_levels) by using new float+int

9376 05/15/2013 02:13 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: removed no longer used log-. use log+ with a negative argument instead.

9375 05/15/2013 02:12 PM Aaron Marcuse-Kubitza

bugfix: lib/sh/util.sh: log+: PS4 when $1 < 0: need to negate $1 because now it's a negative number

9374 05/15/2013 02:06 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: log--: use log+ with 1 instead of log so we don't need a separate log- function

9373 05/15/2013 02:04 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: logging: log+: support negative log_level adjustments. log-: use log+ with the negative of its argument

9372 05/15/2013 01:48 PM Aaron Marcuse-Kubitza

web/links/index.htm: updated to Firefox bookmarks. sorted MySQL and PostgreSQL sections.

9371 05/15/2013 01:42 PM Aaron Marcuse-Kubitza

web/links/index.htm: updated to Firefox bookmarks

9370 05/15/2013 01:39 PM Aaron Marcuse-Kubitza

web/links/index.htm: Mac 10.8 Mountain Lion > PostgreSQL: appended tab to name to disambiguate it from the general PostgreSQL section

9369 05/15/2013 01:33 PM Aaron Marcuse-Kubitza

bugfix: web/links/index.htm.run: prepend __ to the HTML anchors of bookmarks toolbar links so they don't shadow/override folders of the same name: also renamed the corresponding self-anchor hyperlinks

9368 05/15/2013 01:32 PM Aaron Marcuse-Kubitza

bugfix: web/links/index.htm.run: prepend __ to the HTML anchors of bookmarks toolbar links so they don't shadow/override folders of the same name: need to replace all occurrences (using /g option to sed) to include both HTML anchors on the line

9367 05/15/2013 01:26 PM Aaron Marcuse-Kubitza

web/links/index.htm.run: prepend __ to the HTML anchors of bookmarks toolbar links so they don't shadow/override folders of the same name

9366 05/15/2013 01:23 PM Aaron Marcuse-Kubitza

lib/sh/util.sh: sed: changed it to an alias so it will also be expanded when passed to an external command (like in_place) that can only run an executable, not a shell function (this occurs as long as the external command is defined as an alias which ends in space, to alias-expand the next word). added associated $sed_cmd var for cases when there is no alias wrapper around the external command, and the literal alias body must be used instead.

9365 05/15/2013 11:02 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: log+/-(): setting verbosity: added space around operators to support negative numbers

9364 05/15/2013 10:55 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: added float functions (esp. float+int()) for dealing with decimal verbosities used by sql.py and column-based import

9363 05/15/2013 10:53 AM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: inputs/GBIF/raw_occurrence_record/run: added check_target_exists so you know why make skipped the file (for other, non-silent targets, it would also avoid make's verbose output when the file exists)

9362 05/15/2013 10:38 AM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: table.tsv/make(): moved making of table.tsv.md5 to separate function

9361 05/15/2013 10:30 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: $log_fd: indicated that this is only initially stderr (however, the new port will just use stderr if it's not redirected separately)

9360 05/15/2013 10:28 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: verbosities: 3: added that this includes values of kw params

9359 05/15/2013 10:25 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: logging: added description of the verbosities available, including what each one does and what it's useful for:

  1. verbosities:
  2. 0: just print errors. useful for cron jobs.
  3. 1: also external commands run. useful for running at the command line....
9358 05/15/2013 10:11 AM Aaron Marcuse-Kubitza

lib/sh/util.sh: command__set_fds(): echo the >& line at a higher log_level, because this information (i.e. which fd is used by the command for logging) is primarily for debugging and should not normally be printed

9357 05/15/2013 10:00 AM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: table.tsv/make(): also add md5 sum for table.tsv

9356 05/15/2013 09:50 AM Aaron Marcuse-Kubitza

inputs/GBIF/raw_occurrence_record/run: table.tsv/make(): added back filter kw args, which had gotten deleted in a commit without update (although actually, svn should not allow a commit without update, so the working copy may have gotten corrupted)

9355 05/15/2013 09:27 AM Aaron Marcuse-Kubitza

lib/runscripts/table.run: input_make(): added $silent flag which turns on make's --silent option