Code Putback

1 view
Skip to first unread message

Clayton Carter

unread,
May 21, 2008, 10:52:25 PM5/21/08
to cropplann...@googlegroups.com
Hi All. A fairly big code putback tonight. I've been sitting on a
number of changes and felt like I should send them back. Many of them
are still only half done (the db schema has really changed, but the UI
doesn't yet reflect that) or are untested.

A couple things to check out:

1) When you run this new "version" for the first time, the db will
update itself. Keep an eye out for problems and report them here.
2) Debug messages are now off by default for messages that use
CPSModule.debug(). This is the preferred method for printing debug
messages as it formats them nicely, indicated where they're coming
from and allows the user to turn them on or off. To turn on debugging
messages, either skip the CPSModule.debug() method or pass in "-debug"
as a runtime parameter. I did this because the debug messages seem
important but most were very ignorable.

The bulk of these changes revolve around a fairly beefy db schema
update to support crops which have different planting specs when
direct seeded versus when they're transplanted. I have also added
"_actual" columns for all of the dates, to track the date that
planting/transplanting/harvesting ACTUALLY happened versus just when
it was planned to happen. I also added an "ignore" column so that
plantings can be ignored or skipped, for instance when you get so far
behind that you just skip a planting instead of setting it out late.

So update your code bases and give it whirl!

Clayton

A summary of the changes I made, module by module:

==[ CropDB ]==

Added support for data import
Slight modification to data export.
UI changes (in progress)
Changes to allow it to keep working w/ new DB schema
Maintainabilty tweaks
Added main() for simpler testing of layout changes.

==[ CropPlans ]==

Added main() for simpler testing of layout changes.
UI changes (in progress)
Changes to allow it to keep working w/ new DB schema
Maintainabilty tweaks and other minor fixes/improvements.
Added support for data import
Slight modification to data export.

==[ CPS-CSV ]==

minor changes to improve handling of export/import for crops vs plantings

==[ HSQLDB ]==

semi-major schema changes
improved calculations and error checking
improved calculation support for DS plantings (vs TP)
column map supports new DB schema
support for crops w/ different data for TP vs DS
added support for pseudocolumns, which don't exist but are calculated
off of other columns
added support for directional inheritance, where a column is tested
and the inherited column is determined from that test
improved abstraction from hard coded column names and toward property numbers
improved filtering: added support for new ignore column and fixed
support for boolean columns
disabled automatic data import (which didn't work anyway and just caused errors)
Added JUnit [some] tests.

==[ CPS-Spec ]==

bumped minor version from 0.1.3 to 0.1.4
fixed incorrect calculation: beds to plant was incorrect when in row
spacing was not a multiple of 12
many changes to data structures etc for new schema
added frost hardy getters and setters
very minor fix for inheritance
added debug setting in GlobalSettings
CPSTable can tag columns as not-editable (ie pseudocolumns)
Added JUnit [some] tests.

==[ TODOLists ]==

Changed default for lists from "this week only" to "all uncompleted plantings"
Slight changes for new schema and adjustments to columns displayed.
Notes for plantings are now displayed on a seperate line, improving
readablity of the note, but degrading the overall readability of the
list.

==[ CropPlanning ]==

Added param parsing for -debug

Reply all
Reply to author
Forward
0 new messages