Documentation ¶
Index ¶
- func AccuracyRatioChart(ars []AccuracyRatio, now time.Time) error
- func DeliverySchedule(wt worktimes.WorkTimes, now time.Time, ...) [100]time.Time
- func PadFakeHistoricalEstimateAccuracyRatios(rs, fakeRs []float64) []float64
- func PredictedDeliveryDateChart(predictedDaysInFuture []float64, ts tasks, pct []string)
- func RenderDeliverySchedule(dates [100]time.Time) [21]string
- func RenderTaskOneLineSummary(t *Task, includeHeaders bool) string
- func RenderYesterdayTasks(wt worktimes.WorkTimes, ts tasks, now time.Time) string
- func WithEstConfigAndFile(fn func(ec *EstConfig, ef *EstFile), failFn func())
- type AccuracyRatio
- type AccuracyRatios
- type EstConfig
- type EstFile
- type Task
- func (t *Task) Actual() time.Duration
- func (t *Task) AddActual(d time.Duration, now time.Time) error
- func (t *Task) CreatedAt() time.Time
- func (t *Task) Delete() error
- func (t *Task) DeletedAt() time.Time
- func (t *Task) DoneAt() time.Time
- func (t *Task) EstimateAccuracyRatio() AccuracyRatio
- func (t *Task) Estimated() time.Duration
- func (t *Task) EstimatedAt() time.Time
- func (t *Task) ID() uuid.UUID
- func (t *Task) IsDeleted() bool
- func (t *Task) IsDone() bool
- func (t *Task) IsEstimated() bool
- func (t *Task) IsNeverStarted() bool
- func (t *Task) IsPaused() bool
- func (t *Task) IsStarted() bool
- func (t *Task) Name() string
- func (t *Task) PausedAt() time.Time
- func (t *Task) SetEstimated(d time.Duration) error
- func (t *Task) SetName(n string) error
- func (t *Task) StartedAt() time.Time
- func (t *Task) Undelete() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccuracyRatioChart ¶
func AccuracyRatioChart(ars []AccuracyRatio, now time.Time) error
AccuracyRatioChart shows how accuracy the user has estimated, providing a feedback loop to become a better estimator.
func DeliverySchedule ¶
func DeliverySchedule(wt worktimes.WorkTimes, now time.Time, historicalEstimateAccuracyRatios []float64, ts tasks) [100]time.Time
DeliverySchedule returns a predicted delivery schedule, as a time percentile, using the passed historical data as a basis for future work on the passed tasks.
func PadFakeHistoricalEstimateAccuracyRatios ¶
PadFakeHistoricalEstimateAccuracyRatios returns a copy of passed historical estimate accuray ratios. If there's fewer than 20 passed ratios, they are padded with passed fake ratios. Fake ratios make 'est schedule' more useful for new estimators by providing a fake-but-conservative estimation history to supplement a growing track record of real estimates.
func PredictedDeliveryDateChart ¶
PredictedDeliveryDateChart renders a full-terminal chart, for predicted delivery dates of passed tasks, until user presses 'Q' to quit.
func RenderDeliverySchedule ¶
RenderDeliverySchedule returns a list of string delivery dates for the passed delivery dates percentile.
func RenderTaskOneLineSummary ¶
RenderTaskOneLineSummary returns a string rendering of passed task suitable to be included in a one-task-per-line output to user.
func RenderYesterdayTasks ¶
RenderYesterdayTasks returns a user-suitable summary of task activity on first business day prior to now.
func WithEstConfigAndFile ¶
WithEstConfigAndFile is the standard entrypoint into est/core. Loads or creates a canonical estconfig and estfile, then passes them to the passed function. TODO drop the With() and should just be (es, ef, error) TODO ensure all fatal/errors in entire app written to stderr
Types ¶
type AccuracyRatio ¶
type AccuracyRatio struct {
// contains filtered or unexported fields
}
AccuracyRatio is an anonymous data point representing the accuracy of some (expected, actual) pair. The time is e.g. task done task
type AccuracyRatios ¶
type AccuracyRatios []AccuracyRatio
AccuracyRatios provides convenience functions.
func (AccuracyRatios) After ¶
func (ars AccuracyRatios) After(t time.Time) AccuracyRatios
After returns subset of accuracy ratios which are after the passed time.
func (AccuracyRatios) Ratios ¶
func (ars AccuracyRatios) Ratios() []float64
Ratios returns all []AccuracyRatio.ratio.
func (AccuracyRatios) SortByTimeAscending ¶
func (ars AccuracyRatios) SortByTimeAscending() AccuracyRatios
SortByTimeAscending sorts this []AccuracyRatio in place by ascending ar.time.
type EstConfig ¶
type EstConfig struct {
Estfile string // est file name
}
EstConfig is the user preferences file for est. $HOME/.estconfig is deserialized into this struct.
type EstFile ¶
type EstFile struct { Version int // future use, to migrate old estfiles Tasks tasks // a type alias for []*Task // Fake ratios, see historicalEstimateAccuracyRatios(). // Fake ratios are saved to EstFile so they are stable. FakeHistoricalEstimateAccuracyRatios []float64 // contains filtered or unexported fields }
EstFile is a wrapper around estFile. EstFile uses Task and provides a public API for clients, but is not serializable. estFile uses task and is serializable but unsafe for public use. Whereas Task is a wrapper around task, EstFile is a different data structure than estFile. There's a bijection between EstFile <-> estFile.
func (EstFile) HistoricalEstimateAccuracyRatios ¶
func (ef EstFile) HistoricalEstimateAccuracyRatios() AccuracyRatios
HistoricalEstimateAccuracyRatios returns the accuracy ratios for historical tasks in this EstFile. Our definition of historical are tasks which are done and not deleted. This returned []float64 is the "evidence" in "evidence-based scheduling".
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task is a wrapper around task, preventing illegal state and state transitions. Some task state can be updated only in the context of a collection of other tasks. The root cause here is that task fields must be exported to be automatically serializeable, so this wrapper tries to give us both a nice API and easy serialization.
func (*Task) AddActual ¶
AddActual logs actual time spent against this task. Most tasks should use auto time tracking. AddActual() provides an escape hatch for auto time tracking edge cases.
func (*Task) EstimateAccuracyRatio ¶
func (t *Task) EstimateAccuracyRatio() AccuracyRatio
EstimateAccuracyRatio returns a ratio of estimate / actual hours for a done task. I.e. 1.0 is perfect estimate, 2.0 means task was twice as fast, 0.5 task twice as long.
func (*Task) EstimatedAt ¶
EstimatedAt returns the most recent time at which this task was estimated.
func (*Task) IsEstimated ¶
IsEstimated returns true iff this task has a non-zero estimated duration.
func (*Task) IsNeverStarted ¶
IsNeverStarted returns true iff this task was never started.
func (*Task) SetEstimated ¶
SetEstimated sets this task's estimated duration.