inputs/NYBG/maps/DwC.specimens.csv: Mapped CoordinatePrecision using _noCV
xml_func.py: Added _noCV func to check that non-ratio-scale data does not contain CV values
mappings/DwC-VegBIEN.specimens.csv: Fixed locality fields mapping to go to location.locationnarrative
input.Makefile: For all input types, including DB, import each table in a separate map invocation
xml_func.py: _range: Treat a None from or to value as an unknown (a la SQL NULL) and return None instead of raising a SyntaxException
xml_dom.py: NodeTextEntryIter: Convert empty entries (including entries containing error comments) to None
xml_dom.py: replace(): Added support for new node that's None (deletes existing node)
xml_func.py: Put SyntaxException's cause on same line as error message so that the whole error is treated as distinct by error_stats
Added errors_filter_before and errors_filter_after to prepare `map` error messages for easy filtering and then restore line breaks
error_stats: Fixed to work on Mac
error_stats: Simplified to use uniq --count option
input.Makefile: Print error message if no input file found (for file input type). This fixes a bug where map would just take input from stdin when no input file redirect or input DB env vars were specified.
map: Map standard DB names to original DB names on nimoy
Regenerated vegbien.ERD exports
vegbien.sql: Added methodtrait and methodtraitname tables
PostgreSQL-MySQL.csv: Handle array types
vegbien.ERD.mwb: Recolored plant tables to all have the same color, distinct from the occurrence color
mappings/VegX-VegBIEN.organisms.csv: Added mappings for SALVIAS fields with no join mapping. This fixes the last of the "no join mapping" errors.
input.Makefile: svn_props: Set svn:ignore on maps subdirs
inputs/SALVIAS-CSV/maps/VegX.plots.csv: Fixed mappings without a join mapping in VegX-VegBIEN.*.csv
VegX mappings: Gentry DBH mapping: Use VegX's attribute and method tables
mappings/VegX-VegBIEN.organisms.csv: Removed no longer used mapping to taxondetermination.determinationdate. This also prevents ever creating a taxondetermination without a plantconcept.
bin/map: Added redo option to control whether the database is emptied before inserting new data. Can be used to turn off emptying the DB in test mode, because this is often slow and is not needed if you are running tests on an empty testing database.
opts.py: env_flag(): Added support for default value if unset
bin/map: Use env_flag()'s new env_names usage support to print flags usage
opts.py: Added env_names usage support to env_flag()
mappings/VegX-VegBIEN.organisms.csv: Removed no longer needed mapping for taxonDetermination/note
inputs/SALVIAS-CSV/maps/VegX.organisms.csv: Map cfaff to taxonConcept/fit, which maps to taxondetermination.taxonFit
inputs/SALVIAS/maps/VegX.organisms.csv: Map cfaff to taxonConcept/fit, which maps to taxondetermination.taxonFit
join: Print a warning if no join mapping found (in addition to adding this warning to the comments column)
Removed no longer needed inputs/NYBG/maps/VegX.organisms.csv because NYBG is now mapped via DwC
mappings/VegX-VegBIEN.organisms.csv: Removed mappings used only by NYBG, because NYBG now maps via DwC
Added ch_root_via to transform a map spreadsheet to use a different root, using a connecting root that links the input and output roots together
Added cols to select columns from a spreadsheet
util.py: Added list_subset()
ch_root: Fixed detection of unset env vars so that usage message is printed when any option is missing
opts.py: Call an error handler if an env var isn't set
util.py: Added function wrappers for statements noop() and and_()
inputs/NYBG-CSV: Map via DwC
Added subtract to subtract map spreadsheets
ch_root: Ignore empty lines
Added intersect to intersect two map spreadsheets
union: Clarified overwrite order of inputs in description
Removed no longer needed mappings/review
mappings/Makefile: Regenerate for_review maps automatically when a map changes
mappings/review: Generalized to convert all mappings to VegBIEN, not just a specific listed set (which was out of date)
mappings/for_review/DwC-VegBIEN.specimens.csv: Regenerated
inputs/NYBG/maps/DwC.specimens.csv: Fixed CollectedDate mapping to use the _date XML func
DwC mappings: Mapped Substrate and Vegetation
DwC mappings: Mapped BoundingBox, footprintWKT to location.dsgpoly
DwC mappings: Mapped Notes and PlantFungusDescription to bien.specimenDescription, merged together
xml_func.py: Added _merge and _label XML funcs
vegbien.sql: Added specimenreplicate.description
DwC mappings: Corrected mappings for CollectorNumber, individualID, recordNumber, and fieldNumber
DwC mappings: Mapped infraspecificEpithet to/from Subspecies
DwC-VegBIEN mapping: merge decimalLatitude/Longitude with verbatimLatitude/Longitude
vegbien.ERD.mwb: Fixed lines. Repositioned elements.
vegbien.sql: Added locationevent.parent_id for subplot events to point to their parent plot event
vegbien.sql: Added plantconceptscope.namedplace_id
vegbien.sql: Added taxonoccurrence.method_id
vegbien.sql: Renamed plotmethod to method
vegbien.sql: Added locationdetermination.identifier_id
vegbien.ERD.mwb: Fixed lines
VegBIEN: Renamed locationplace to locationdetermination
vegbien.sql: Removed morphospecies, instead using plantconcept and new table plantconceptscope to represent scoped morphospecies. Reorganized plant* tables in ERD.
vegbien.ERD.mwb: Added plantcorrelation table to ERD
mappings/VegX-VegBIEN.organisms.csv: Fixed TaxonomicRankBelowSubspeciesEnum mapping to use plantname instead of placing the name directly inside plantconcept. This bug was probably left over from the switch from linking directly to plantname rather than to a plantconcept which has a plantname.
Renamed get_errors to error_stats and added counts of each error message
vegbien.sql: Added plotmethod table
input.Makefile: Renamed $(test) variable (containing the command to run a test) so it wouldn't conflict with test environment variable
mappings to VegBIEN: Don't map notes to taxondetermination because some organisms have notes but no species name
mappings/Makefile: Fixed bug in rules for cleaning up core maps whenever they change, which had the target and prerequisite reversed
input.Makefile: nolog option defaults to on when test is on
input.Makefile: Fixed bug where no log file was being created, even when nolog was off
Replaced all type(...) == str with util.is_str(...) to properly treat Unicode objects as strings
xml_dom.py: minidom.Element.write_opening(): Use new Attr.__str__() method for printing attributes
bin/map: For XML inputs, use xpath.get()'s new multiple result support to iterate over elements matching the root, rather than just iterating over the first matching element's siblings. This fixes the broken 2-step tests for stems, which didn't filter by the root's attributes.
xpath.py: get(): Fixed bug where limit was not passed to recursive get() calls
xml_dom.py: by_tag_name(): Iterate forwards over children unless last_only optimization turned on. Added Attr.__str__() and repr() for debug-printing Attrs.
xpath.py: get(): Turn off last_only optimization when limit > 1
xpath.py: get(): Added full support for returning multiple matches
xpath.py: get(): Added basic structure for returning multiple matches. Added limit parameter to select one or many matches.
input.Makefile: test/VegBIEN.%.2-step.xml: Use the core map specific to the test's table instead of the main core map
bin/map: Print error if map root not found inXML input
mappings/: Removed mappings used by old tester
inputs/SALVIAS/maps/VegX.*.csv: Replaced symlinks with actual files
Removed old tester
Switched to using inputs/test as main test target
Added SALVIAS-CSV tests
Added NYBG-CSV tests
input.Makefile: Run separate tests for each map spreadsheet (input table) rather than all tables at once. This will make it possible to test CSV inputs, which have one CSV per table.
Added NYBG-CSV input
inputs/Makefile: Fixed forwarding of empty targets to subdirs
vegbien.sql: Added morphospecies table
vegbien.sql: Removed the taxonOccurrence:aggregateOccurrence 1:1 constraint