predictability-engine 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/predictability-engine +19 -0
- data/bin/predictability-engine.bat +2 -0
- data/bin/setup +47 -0
- data/data/samples/sample_data.csv +19 -0
- data/data/samples/sample_data_large.csv +201 -0
- data/data/samples/wip_data.csv +5 -0
- data/lib/predictability_engine/agents/assistant.rb +29 -0
- data/lib/predictability_engine/agents/tools.rb +98 -0
- data/lib/predictability_engine/calculators/aging.rb +36 -0
- data/lib/predictability_engine/calculators/cfd.rb +80 -0
- data/lib/predictability_engine/calculators/cfd_forecaster.rb +112 -0
- data/lib/predictability_engine/calculators/cycle_time.rb +26 -0
- data/lib/predictability_engine/calculators/throughput.rb +42 -0
- data/lib/predictability_engine/cli.rb +414 -0
- data/lib/predictability_engine/config.rb +167 -0
- data/lib/predictability_engine/data_generator.rb +53 -0
- data/lib/predictability_engine/data_manager.rb +28 -0
- data/lib/predictability_engine/data_sources/base.rb +93 -0
- data/lib/predictability_engine/data_sources/csv.rb +62 -0
- data/lib/predictability_engine/data_sources/excel.rb +18 -0
- data/lib/predictability_engine/data_sources/factory.rb +20 -0
- data/lib/predictability_engine/data_sources/jira.rb +201 -0
- data/lib/predictability_engine/data_sources/jira_yaml.rb +103 -0
- data/lib/predictability_engine/duration.rb +16 -0
- data/lib/predictability_engine/excel_exporter.rb +48 -0
- data/lib/predictability_engine/html_style.rb +63 -0
- data/lib/predictability_engine/html_templates.rb +70 -0
- data/lib/predictability_engine/jira_auth/base.rb +26 -0
- data/lib/predictability_engine/jira_auth/basic.rb +15 -0
- data/lib/predictability_engine/jira_auth/bearer.rb +11 -0
- data/lib/predictability_engine/jira_auth/cookie.rb +15 -0
- data/lib/predictability_engine/jira_auth/mfa_api.rb +36 -0
- data/lib/predictability_engine/jira_auth/mfa_browser.rb +85 -0
- data/lib/predictability_engine/jira_auth.rb +22 -0
- data/lib/predictability_engine/jira_config_prompter.rb +48 -0
- data/lib/predictability_engine/jira_workflow.rb +137 -0
- data/lib/predictability_engine/logger.rb +45 -0
- data/lib/predictability_engine/mermaid_visualizer.rb +94 -0
- data/lib/predictability_engine/models/work_item.rb +43 -0
- data/lib/predictability_engine/pdf_visualizer/primitives.rb +83 -0
- data/lib/predictability_engine/pdf_visualizer.rb +64 -0
- data/lib/predictability_engine/raw_data_exporter.rb +46 -0
- data/lib/predictability_engine/report/constants.rb +70 -0
- data/lib/predictability_engine/report/image_generator.rb +36 -0
- data/lib/predictability_engine/report/text_renderer.rb +84 -0
- data/lib/predictability_engine/report.rb +328 -0
- data/lib/predictability_engine/report_generator.rb +170 -0
- data/lib/predictability_engine/setup_manager.rb +127 -0
- data/lib/predictability_engine/simulators/monte_carlo.rb +57 -0
- data/lib/predictability_engine/simulators/monte_carlo_validator.rb +85 -0
- data/lib/predictability_engine/summary_visualizer/helpers.rb +71 -0
- data/lib/predictability_engine/summary_visualizer/renderer.rb +88 -0
- data/lib/predictability_engine/summary_visualizer.rb +36 -0
- data/lib/predictability_engine/terminal_visualizer/cfd_renderer.rb +52 -0
- data/lib/predictability_engine/terminal_visualizer.rb +97 -0
- data/lib/predictability_engine/vega_visualizer/aging_wip_visualizer.rb +44 -0
- data/lib/predictability_engine/vega_visualizer/basic_charts.rb +121 -0
- data/lib/predictability_engine/vega_visualizer/cfd_charts.rb +82 -0
- data/lib/predictability_engine/vega_visualizer/cfd_layout.rb +132 -0
- data/lib/predictability_engine/vega_visualizer/tooltip_helpers.rb +34 -0
- data/lib/predictability_engine/vega_visualizer.rb +106 -0
- data/lib/predictability_engine/version.rb +5 -0
- data/lib/predictability_engine/visualizer.rb +114 -0
- data/lib/predictability_engine.rb +117 -0
- metadata +566 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: bb18ad50e7f34c716b84cefdeadbc03fca465950013b131be129c4402b8869cd
|
|
4
|
+
data.tar.gz: b4d59dff31a557b39194a7416dd54d34ccf5c326dfae8a8b72a17806b8e61fa9
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 3b4463a96a91c0750b6dc8115b495a1b55587b834c94c630a8395ca17f90c06d2122f279f0ab155b3a5afde8980af33bac5471a49a5efbde371a5ebe366f0179
|
|
7
|
+
data.tar.gz: e9e9ac3b3cecceaa372fb712b10b4bbd80b7cb083c0c204dcde99578326793ced743b924c8162ac752e9fd440e6db1292129ea711c9bcdc26f7ca8da57fb9048
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# When running from the source tree (not an installed gem), point Bundler
|
|
5
|
+
# at this gem's Gemfile so the binary works from any CWD.
|
|
6
|
+
gemfile = File.expand_path('../Gemfile', __dir__)
|
|
7
|
+
ENV['BUNDLE_GEMFILE'] ||= gemfile if File.exist?(gemfile)
|
|
8
|
+
|
|
9
|
+
begin
|
|
10
|
+
require 'bundler/setup'
|
|
11
|
+
rescue LoadError
|
|
12
|
+
# Bundler not available, hope for the best with system gems
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
|
|
16
|
+
require 'predictability_engine'
|
|
17
|
+
require 'predictability_engine/cli'
|
|
18
|
+
|
|
19
|
+
PredictabilityEngine::Cli.start(ARGV)
|
data/bin/setup
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# bin/setup — ensures Ruby, then bootstraps Bundler and delegates to the PE CLI.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
cd "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
+
|
|
6
|
+
# ── Ruby version guard ────────────────────────────────────────────────────────
|
|
7
|
+
REQUIRED_RUBY_MAJOR=${REQUIRED_RUBY_MAJOR:-4}
|
|
8
|
+
|
|
9
|
+
ensure_ruby() {
|
|
10
|
+
if command -v ruby &>/dev/null; then
|
|
11
|
+
major=$(RUBYOPT= ruby -e 'puts RUBY_VERSION.split(".").first')
|
|
12
|
+
[ "$major" -ge "$REQUIRED_RUBY_MAJOR" ] && return 0
|
|
13
|
+
echo "==> Ruby ${major}.x found but Ruby >= ${REQUIRED_RUBY_MAJOR}.0 is required."
|
|
14
|
+
else
|
|
15
|
+
echo "==> Ruby not found. Ruby >= ${REQUIRED_RUBY_MAJOR}.0 is required."
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
echo "==> Trying version managers..."
|
|
19
|
+
if command -v mise &>/dev/null; then mise install && return 0; fi
|
|
20
|
+
if command -v asdf &>/dev/null; then asdf install && return 0; fi
|
|
21
|
+
if command -v rbenv &>/dev/null; then rbenv install --skip-existing && return 0; fi
|
|
22
|
+
if command -v rvm &>/dev/null; then
|
|
23
|
+
rvm install "$(cat .ruby-version)" && rvm use "$(cat .ruby-version)" && return 0
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
ruby_version=$(sed 's/ruby-//' .ruby-version)
|
|
27
|
+
echo ""
|
|
28
|
+
echo "ERROR: No Ruby version manager found. Install Ruby ${ruby_version} manually:"
|
|
29
|
+
echo ""
|
|
30
|
+
echo " macOS: brew install rbenv && rbenv install ${ruby_version}"
|
|
31
|
+
echo " Linux: curl -fsSL https://mise.run | sh && mise install"
|
|
32
|
+
echo " -- or --"
|
|
33
|
+
echo " curl -fsSL https://rvm.io/install | bash && rvm install ${ruby_version}"
|
|
34
|
+
echo " Windows: https://rubyinstaller.org"
|
|
35
|
+
echo " -- or -- winget install RubyInstallerTeam.Ruby"
|
|
36
|
+
echo " Docker: FROM ruby:${ruby_version}-alpine"
|
|
37
|
+
echo ""
|
|
38
|
+
echo " Then re-run: ./bin/setup"
|
|
39
|
+
exit 1
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
ensure_ruby
|
|
43
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
44
|
+
|
|
45
|
+
gem install bundler --conservative
|
|
46
|
+
bundle install --jobs 4 --retry 3
|
|
47
|
+
bundle exec predictability-engine setup
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id,title,start_date,end_date
|
|
2
|
+
PROJ-1,Implement core,2026-03-01,2026-03-05
|
|
3
|
+
PROJ-2,Fix bug A,2026-03-02,2026-03-04
|
|
4
|
+
PROJ-3,Add feature X,2026-03-05,2026-03-10
|
|
5
|
+
PROJ-4,Update docs,2026-03-06,2026-03-07
|
|
6
|
+
PROJ-5,Tests,2026-03-08,2026-03-12
|
|
7
|
+
PROJ-6,Refactor,2026-03-10,2026-03-15
|
|
8
|
+
PROJ-7,Security,2026-03-12,2026-03-18
|
|
9
|
+
PROJ-8,UI change,2026-03-14,2026-03-20
|
|
10
|
+
PROJ-9,CI setup,2026-03-16,2026-03-22
|
|
11
|
+
PROJ-10,Deployment,2026-03-18,2026-03-25
|
|
12
|
+
PROJ-11,Marketing,2026-03-20,2026-03-28
|
|
13
|
+
PROJ-12,Analytics,2026-03-22,2026-04-01
|
|
14
|
+
PROJ-13,Feedback,2026-03-24,2026-04-03
|
|
15
|
+
PROJ-14,Cleanup,2026-03-26,2026-04-05
|
|
16
|
+
PROJ-15,v1.0 release,2026-03-28,2026-04-08
|
|
17
|
+
PROJ-16,Next gen,2026-04-01,
|
|
18
|
+
PROJ-17,Research,2026-04-03,
|
|
19
|
+
PROJ-18,Spike,2026-04-05,
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
id,type,priority,title,start_date,end_date
|
|
2
|
+
DONE-37,Story,Medium,Implement user authentication and session management for the API,2025-10-14,2025-10-19
|
|
3
|
+
DONE-96,Bug,Highest,Fix performance regression in the data processing pipeline,2025-10-14,2025-10-25
|
|
4
|
+
DONE-124,Task,Low,Refactor the legacy payment gateway integration module,2025-10-17,2025-11-01
|
|
5
|
+
DONE-34,Improvement,High,Add comprehensive end-to-end tests for the checkout flow,2025-10-19,2025-11-03
|
|
6
|
+
DONE-99,Story,High,Migrate database schema to support multi-tenancy architecture,2025-10-20,2025-10-30
|
|
7
|
+
DONE-26,Bug,High,Resolve memory leak in the background job processing worker,2025-10-22,2025-11-02
|
|
8
|
+
DONE-38,Task,Medium,Implement real-time notifications using WebSockets,2025-10-24,2025-10-29
|
|
9
|
+
DONE-79,Improvement,Medium,Improve search indexing performance for large datasets,2025-10-24,2025-10-29
|
|
10
|
+
DONE-104,Story,Low,Add support for OAuth2 single sign-on provider integration,2025-10-25,2025-11-02
|
|
11
|
+
DONE-13,Bug,Medium,Redesign the reporting dashboard with filterable date ranges,2025-10-26,2025-11-13
|
|
12
|
+
DONE-61,Task,Low,Optimize SQL queries causing slow response times in production,2025-10-26,2025-11-14
|
|
13
|
+
DONE-81,Improvement,Medium,Implement automated data export with configurable scheduling,2025-10-26,2025-10-28
|
|
14
|
+
DONE-92,Story,Medium,Add role-based access control to the admin management panel,2025-10-28,2025-11-11
|
|
15
|
+
DONE-128,Bug,Low,Fix intermittent timeout errors in the third-party API client,2025-10-28,2025-11-02
|
|
16
|
+
DONE-107,Task,Low,Refactor authentication middleware to use JWT token validation,2025-10-29,2025-11-17
|
|
17
|
+
DONE-148,Improvement,Low,Create data migration scripts for the legacy customer records,2025-10-31,2025-11-17
|
|
18
|
+
DONE-42,Story,Low,Implement pagination for the product catalogue endpoint,2025-11-05,2025-11-13
|
|
19
|
+
DONE-126,Bug,High,Add audit logging for all user actions in the admin interface,2025-11-06,2025-11-16
|
|
20
|
+
DONE-125,Task,Highest,Fix race condition in the concurrent order processing service,2025-11-07,2025-11-11
|
|
21
|
+
DONE-73,Improvement,High,Improve error handling and retry logic in the email delivery service,2025-11-10,2025-11-14
|
|
22
|
+
DONE-101,Story,Medium,Implement bulk import feature for CSV product data uploads,2025-11-10,2025-11-28
|
|
23
|
+
DONE-1,Bug,Low,Add internationalization support for the customer-facing UI,2025-11-11,2025-11-13
|
|
24
|
+
DONE-150,Task,Medium,Resolve CSS layout issues on mobile devices in Safari,2025-11-12,2025-12-02
|
|
25
|
+
DONE-78,Improvement,Medium,Implement two-factor authentication for privileged user accounts,2025-11-13,2025-11-29
|
|
26
|
+
DONE-136,Story,Highest,Optimize image processing pipeline to reduce storage costs,2025-11-13,2025-11-24
|
|
27
|
+
DONE-56,Bug,High,Add GraphQL API endpoint for the mobile application team,2025-11-16,2025-11-29
|
|
28
|
+
DONE-112,Task,Lowest,Fix incorrect tax calculation for cross-border transactions,2025-11-16,2025-11-22
|
|
29
|
+
DONE-127,Improvement,Highest,Implement webhook delivery with exponential backoff retry,2025-11-16,2025-11-22
|
|
30
|
+
DONE-6,Story,Medium,Create dashboard for monitoring real-time system health metrics,2025-11-17,2025-11-23
|
|
31
|
+
DONE-28,Bug,High,Add support for custom fields in the customer profile section,2025-11-19,2025-11-22
|
|
32
|
+
DONE-39,Task,Lowest,Migrate from deprecated authentication library to current version,2025-11-20,2025-11-28
|
|
33
|
+
DONE-103,Improvement,Low,Implement smart caching strategy for frequently accessed resources,2025-11-21,2025-11-26
|
|
34
|
+
DONE-3,Story,Low,Fix data inconsistency bug in the inventory synchronization job,2025-11-22,2025-12-04
|
|
35
|
+
DONE-77,Bug,Medium,Add automated regression tests for the payment processing flow,2025-11-22,2025-11-30
|
|
36
|
+
DONE-119,Task,High,Refactor the monolithic reporting service into microservices,2025-11-22,2025-12-10
|
|
37
|
+
DONE-143,Improvement,Medium,Implement configurable rate limiting for the public REST API,2025-11-22,2025-12-12
|
|
38
|
+
DONE-5,Story,Lowest,Fix security vulnerability in the file upload validation logic,2025-11-23,2025-12-09
|
|
39
|
+
DONE-75,Bug,Medium,Add dark mode support to the main application interface,2025-11-24,2025-11-26
|
|
40
|
+
DONE-16,Task,Medium,Optimize the recommendation engine for better response times,2025-11-25,2025-12-10
|
|
41
|
+
DONE-95,Improvement,Medium,Implement GDPR-compliant data deletion workflow for user accounts,2025-11-29,2025-12-14
|
|
42
|
+
DONE-120,Story,Medium,Fix broken pagination on the search results listing page,2025-11-29,2025-11-30
|
|
43
|
+
DONE-146,Bug,Medium,Add support for multiple currency display in the pricing tables,2025-12-02,2025-12-19
|
|
44
|
+
DONE-12,Task,Medium,Implement automated database backup and point-in-time recovery,2025-12-03,2025-12-08
|
|
45
|
+
DONE-80,Improvement,Medium,Refactor the notification service to use an event-driven pattern,2025-12-03,2025-12-12
|
|
46
|
+
DONE-64,Story,High,Fix incorrect date timezone handling in the scheduling module,2025-12-04,2025-12-07
|
|
47
|
+
DONE-7,Bug,Low,Add comprehensive API documentation using OpenAPI specification,2025-12-05,2025-12-09
|
|
48
|
+
DONE-53,Task,High,Implement feature flag system for gradual feature rollouts,2025-12-05,2025-12-23
|
|
49
|
+
DONE-84,Improvement,Low,Resolve slow startup time caused by heavy dependency loading,2025-12-05,2025-12-12
|
|
50
|
+
DONE-49,Story,Medium,Add accessibility improvements to comply with WCAG 2.1 standards,2025-12-06,2025-12-21
|
|
51
|
+
DONE-50,Bug,High,Implement soft-delete functionality across all resource endpoints,2025-12-06,2025-12-26
|
|
52
|
+
DONE-121,Task,Medium,Implement user authentication and session management for the API,2025-12-06,2025-12-21
|
|
53
|
+
DONE-11,Improvement,Low,Fix performance regression in the data processing pipeline,2025-12-07,2025-12-11
|
|
54
|
+
DONE-149,Story,Medium,Refactor the legacy payment gateway integration module,2025-12-07,2025-12-12
|
|
55
|
+
DONE-98,Bug,Medium,Add comprehensive end-to-end tests for the checkout flow,2025-12-08,2025-12-23
|
|
56
|
+
DONE-108,Task,Medium,Migrate database schema to support multi-tenancy architecture,2025-12-08,2025-12-22
|
|
57
|
+
DONE-24,Improvement,High,Resolve memory leak in the background job processing worker,2025-12-11,2025-12-31
|
|
58
|
+
DONE-68,Story,Medium,Implement real-time notifications using WebSockets,2025-12-13,2025-12-14
|
|
59
|
+
DONE-2,Bug,Low,Improve search indexing performance for large datasets,2025-12-14,2025-12-24
|
|
60
|
+
DONE-35,Task,Low,Add support for OAuth2 single sign-on provider integration,2025-12-15,2025-12-17
|
|
61
|
+
DONE-129,Improvement,High,Redesign the reporting dashboard with filterable date ranges,2025-12-15,2025-12-23
|
|
62
|
+
DONE-67,Story,High,Optimize SQL queries causing slow response times in production,2025-12-16,2025-12-25
|
|
63
|
+
DONE-117,Bug,Medium,Implement automated data export with configurable scheduling,2025-12-16,2026-01-03
|
|
64
|
+
DONE-8,Task,Medium,Add role-based access control to the admin management panel,2025-12-17,2025-12-21
|
|
65
|
+
DONE-105,Improvement,Medium,Fix intermittent timeout errors in the third-party API client,2025-12-17,2025-12-25
|
|
66
|
+
DONE-140,Story,Medium,Refactor authentication middleware to use JWT token validation,2025-12-17,2026-01-06
|
|
67
|
+
DONE-48,Bug,Medium,Create data migration scripts for the legacy customer records,2025-12-18,2026-01-02
|
|
68
|
+
DONE-145,Task,Medium,Implement pagination for the product catalogue endpoint,2025-12-19,2025-12-28
|
|
69
|
+
DONE-15,Improvement,Medium,Add audit logging for all user actions in the admin interface,2025-12-20,2026-01-05
|
|
70
|
+
DONE-23,Story,High,Fix race condition in the concurrent order processing service,2025-12-20,2025-12-24
|
|
71
|
+
DONE-57,Bug,Medium,Improve error handling and retry logic in the email delivery service,2025-12-20,2025-12-21
|
|
72
|
+
DONE-94,Task,High,Implement bulk import feature for CSV product data uploads,2025-12-21,2026-01-06
|
|
73
|
+
DONE-29,Improvement,High,Add internationalization support for the customer-facing UI,2025-12-22,2025-12-29
|
|
74
|
+
DONE-132,Story,Medium,Resolve CSS layout issues on mobile devices in Safari,2025-12-23,2026-01-04
|
|
75
|
+
DONE-30,Bug,Medium,Implement two-factor authentication for privileged user accounts,2025-12-24,2026-01-07
|
|
76
|
+
DONE-36,Task,Medium,Optimize image processing pipeline to reduce storage costs,2025-12-27,2026-01-10
|
|
77
|
+
DONE-66,Improvement,Medium,Add GraphQL API endpoint for the mobile application team,2025-12-28,2026-01-02
|
|
78
|
+
DONE-147,Story,Medium,Fix incorrect tax calculation for cross-border transactions,2025-12-31,2026-01-04
|
|
79
|
+
DONE-60,Bug,Medium,Implement webhook delivery with exponential backoff retry,2026-01-01,2026-01-16
|
|
80
|
+
DONE-123,Task,Medium,Create dashboard for monitoring real-time system health metrics,2026-01-01,2026-01-19
|
|
81
|
+
DONE-58,Improvement,Medium,Add support for custom fields in the customer profile section,2026-01-02,2026-01-15
|
|
82
|
+
DONE-33,Story,Medium,Migrate from deprecated authentication library to current version,2026-01-03,2026-01-13
|
|
83
|
+
DONE-65,Bug,Medium,Implement smart caching strategy for frequently accessed resources,2026-01-03,2026-01-23
|
|
84
|
+
DONE-114,Task,Medium,Fix data inconsistency bug in the inventory synchronization job,2026-01-03,2026-01-16
|
|
85
|
+
DONE-9,Improvement,Medium,Add automated regression tests for the payment processing flow,2026-01-04,2026-01-14
|
|
86
|
+
DONE-22,Story,Low,Refactor the monolithic reporting service into microservices,2026-01-05,2026-01-13
|
|
87
|
+
DONE-31,Bug,Low,Implement configurable rate limiting for the public REST API,2026-01-07,2026-01-20
|
|
88
|
+
DONE-72,Task,Low,Fix security vulnerability in the file upload validation logic,2026-01-10,2026-01-16
|
|
89
|
+
DONE-144,Improvement,Lowest,Add dark mode support to the main application interface,2026-01-10,2026-01-16
|
|
90
|
+
DONE-44,Story,Medium,Optimize the recommendation engine for better response times,2026-01-13,2026-01-22
|
|
91
|
+
DONE-137,Bug,Low,Implement GDPR-compliant data deletion workflow for user accounts,2026-01-13,2026-01-28
|
|
92
|
+
DONE-142,Task,Low,Fix broken pagination on the search results listing page,2026-01-16,2026-02-02
|
|
93
|
+
DONE-17,Improvement,Low,Add support for multiple currency display in the pricing tables,2026-01-17,2026-01-23
|
|
94
|
+
DONE-109,Story,Medium,Implement automated database backup and point-in-time recovery,2026-01-17,2026-02-02
|
|
95
|
+
DONE-135,Bug,Highest,Refactor the notification service to use an event-driven pattern,2026-01-17,2026-01-26
|
|
96
|
+
DONE-85,Task,Medium,Fix incorrect date timezone handling in the scheduling module,2026-01-18,2026-01-31
|
|
97
|
+
DONE-52,Improvement,Lowest,Add comprehensive API documentation using OpenAPI specification,2026-01-21,2026-02-02
|
|
98
|
+
DONE-20,Story,Medium,Implement feature flag system for gradual feature rollouts,2026-01-22,2026-02-03
|
|
99
|
+
DONE-88,Bug,High,Resolve slow startup time caused by heavy dependency loading,2026-01-22,2026-02-06
|
|
100
|
+
DONE-19,Task,High,Add accessibility improvements to comply with WCAG 2.1 standards,2026-01-25,2026-02-13
|
|
101
|
+
DONE-45,Improvement,Medium,Implement soft-delete functionality across all resource endpoints,2026-01-25,2026-02-04
|
|
102
|
+
DONE-54,Story,Highest,Implement user authentication and session management for the API,2026-01-25,2026-01-27
|
|
103
|
+
DONE-91,Bug,Low,Fix performance regression in the data processing pipeline,2026-01-28,2026-02-11
|
|
104
|
+
DONE-14,Task,High,Refactor the legacy payment gateway integration module,2026-01-29,2026-02-02
|
|
105
|
+
DONE-62,Improvement,Medium,Add comprehensive end-to-end tests for the checkout flow,2026-01-29,2026-02-02
|
|
106
|
+
DONE-106,Story,Medium,Migrate database schema to support multi-tenancy architecture,2026-01-31,2026-02-14
|
|
107
|
+
DONE-118,Bug,Medium,Resolve memory leak in the background job processing worker,2026-01-31,2026-02-11
|
|
108
|
+
DONE-76,Task,Low,Implement real-time notifications using WebSockets,2026-02-03,2026-02-10
|
|
109
|
+
DONE-82,Improvement,Lowest,Improve search indexing performance for large datasets,2026-02-03,2026-02-05
|
|
110
|
+
DONE-90,Story,Low,Add support for OAuth2 single sign-on provider integration,2026-02-03,2026-02-20
|
|
111
|
+
DONE-116,Bug,Medium,Redesign the reporting dashboard with filterable date ranges,2026-02-06,2026-02-18
|
|
112
|
+
DONE-59,Task,Lowest,Optimize SQL queries causing slow response times in production,2026-02-09,2026-03-01
|
|
113
|
+
DONE-139,Improvement,High,Implement automated data export with configurable scheduling,2026-02-09,2026-02-13
|
|
114
|
+
DONE-4,Story,High,Add role-based access control to the admin management panel,2026-02-10,2026-02-27
|
|
115
|
+
DONE-69,Bug,Low,Fix intermittent timeout errors in the third-party API client,2026-02-10,2026-03-01
|
|
116
|
+
DONE-111,Task,High,Refactor authentication middleware to use JWT token validation,2026-02-10,2026-03-01
|
|
117
|
+
DONE-40,Improvement,Low,Create data migration scripts for the legacy customer records,2026-02-13,2026-02-19
|
|
118
|
+
DONE-89,Story,Medium,Implement pagination for the product catalogue endpoint,2026-02-13,2026-02-18
|
|
119
|
+
DONE-21,Bug,Lowest,Add audit logging for all user actions in the admin interface,2026-02-14,2026-02-15
|
|
120
|
+
DONE-46,Task,High,Fix race condition in the concurrent order processing service,2026-02-14,2026-03-03
|
|
121
|
+
DONE-138,Improvement,High,Improve error handling and retry logic in the email delivery service,2026-02-15,2026-03-07
|
|
122
|
+
DONE-134,Story,High,Implement bulk import feature for CSV product data uploads,2026-02-17,2026-03-01
|
|
123
|
+
DONE-100,Bug,Medium,Add internationalization support for the customer-facing UI,2026-02-18,2026-03-08
|
|
124
|
+
DONE-141,Task,Medium,Resolve CSS layout issues on mobile devices in Safari,2026-02-18,2026-02-27
|
|
125
|
+
DONE-43,Improvement,Medium,Implement two-factor authentication for privileged user accounts,2026-02-20,2026-02-25
|
|
126
|
+
DONE-51,Story,Medium,Optimize image processing pipeline to reduce storage costs,2026-02-21,2026-02-26
|
|
127
|
+
DONE-102,Bug,Medium,Add GraphQL API endpoint for the mobile application team,2026-02-21,2026-03-02
|
|
128
|
+
DONE-113,Task,High,Fix incorrect tax calculation for cross-border transactions,2026-02-21,2026-03-09
|
|
129
|
+
DONE-131,Improvement,Low,Implement webhook delivery with exponential backoff retry,2026-02-23,2026-03-07
|
|
130
|
+
DONE-63,Story,Low,Create dashboard for monitoring real-time system health metrics,2026-02-24,2026-03-15
|
|
131
|
+
DONE-41,Bug,Medium,Add support for custom fields in the customer profile section,2026-02-25,2026-03-14
|
|
132
|
+
DONE-47,Task,Low,Migrate from deprecated authentication library to current version,2026-02-25,2026-03-13
|
|
133
|
+
DONE-25,Improvement,Medium,Implement smart caching strategy for frequently accessed resources,2026-02-26,2026-02-28
|
|
134
|
+
DONE-27,Story,High,Fix data inconsistency bug in the inventory synchronization job,2026-02-26,2026-03-07
|
|
135
|
+
DONE-32,Bug,High,Add automated regression tests for the payment processing flow,2026-02-26,2026-03-16
|
|
136
|
+
DONE-87,Task,High,Refactor the monolithic reporting service into microservices,2026-02-26,2026-03-10
|
|
137
|
+
DONE-93,Improvement,High,Implement configurable rate limiting for the public REST API,2026-02-27,2026-03-02
|
|
138
|
+
DONE-130,Story,High,Fix security vulnerability in the file upload validation logic,2026-02-27,2026-03-03
|
|
139
|
+
WIP-15,Bug,High,Implement streaming data pipeline for real-time analytics processing,2026-02-27,
|
|
140
|
+
WIP-21,Task,Low,Refactor the monolithic authentication service into smaller modules,2026-02-27,
|
|
141
|
+
WIP-24,Improvement,Medium,Add machine learning model integration for predictive user behaviour,2026-02-27,
|
|
142
|
+
WIP-44,Story,High,Design and build the new multi-region deployment infrastructure,2026-02-27,
|
|
143
|
+
WIP-48,Bug,High,Migrate all frontend components from JavaScript to TypeScript,2026-02-27,
|
|
144
|
+
DONE-122,Task,Medium,Add dark mode support to the main application interface,2026-02-28,2026-03-17
|
|
145
|
+
DONE-133,Improvement,Low,Optimize the recommendation engine for better response times,2026-02-28,2026-03-06
|
|
146
|
+
WIP-40,Story,High,Implement distributed caching layer to handle increased traffic load,2026-02-28,
|
|
147
|
+
DONE-10,Bug,High,Implement GDPR-compliant data deletion workflow for user accounts,2026-03-01,2026-03-21
|
|
148
|
+
WIP-30,Task,Medium,Add comprehensive observability with distributed tracing support,2026-03-01,
|
|
149
|
+
DONE-18,Improvement,Medium,Fix broken pagination on the search results listing page,2026-03-02,2026-03-19
|
|
150
|
+
DONE-70,Story,Medium,Add support for multiple currency display in the pricing tables,2026-03-02,2026-03-12
|
|
151
|
+
DONE-83,Bug,High,Implement automated database backup and point-in-time recovery,2026-03-02,2026-03-07
|
|
152
|
+
DONE-71,Task,Lowest,Refactor the notification service to use an event-driven pattern,2026-03-03,2026-03-12
|
|
153
|
+
DONE-86,Improvement,Medium,Fix incorrect date timezone handling in the scheduling module,2026-03-03,2026-03-08
|
|
154
|
+
WIP-37,Story,Medium,Redesign the database schema to support hierarchical data structures,2026-03-03,
|
|
155
|
+
DONE-55,Bug,High,Add comprehensive API documentation using OpenAPI specification,2026-03-04,2026-03-08
|
|
156
|
+
WIP-20,Task,Medium,Implement automated canary deployment pipeline for safe releases,2026-03-04,
|
|
157
|
+
DONE-115,Improvement,Low,Implement feature flag system for gradual feature rollouts,2026-03-05,2026-03-22
|
|
158
|
+
DONE-110,Story,Medium,Resolve slow startup time caused by heavy dependency loading,2026-03-07,2026-03-09
|
|
159
|
+
WIP-41,Bug,Medium,Build the self-service onboarding wizard for new enterprise customers,2026-03-07,
|
|
160
|
+
DONE-74,Task,Lowest,Add accessibility improvements to comply with WCAG 2.1 standards,2026-03-09,2026-03-12
|
|
161
|
+
DONE-97,Improvement,Medium,Implement soft-delete functionality across all resource endpoints,2026-03-10,2026-03-16
|
|
162
|
+
WIP-23,Story,Medium,Refactor the legacy report generation engine for better performance,2026-03-10,
|
|
163
|
+
WIP-39,Bug,Low,Add support for pluggable storage backends in the file service,2026-03-10,
|
|
164
|
+
WIP-47,Task,Lowest,Implement event sourcing pattern for the order management domain,2026-03-10,
|
|
165
|
+
WIP-33,Improvement,High,Build a unified API gateway to consolidate all backend services,2026-03-11,
|
|
166
|
+
WIP-5,Story,Medium,Add deep-linking support for the single-page application router,2026-03-12,
|
|
167
|
+
WIP-12,Bug,High,Migrate the test suite from RSpec 2 to RSpec 3 and fix all failures,2026-03-13,
|
|
168
|
+
WIP-19,Task,Low,Implement A/B testing framework for the checkout funnel experiments,2026-03-13,
|
|
169
|
+
WIP-46,Improvement,Medium,Refactor the background job system to support priority queuing,2026-03-13,
|
|
170
|
+
WIP-25,Story,Medium,Build the new customer analytics reporting portal from scratch,2026-03-15,
|
|
171
|
+
WIP-50,Bug,Medium,Implement service mesh with mutual TLS for inter-service communication,2026-03-16,
|
|
172
|
+
WIP-3,Task,Medium,Add comprehensive end-to-end monitoring for the payment workflows,2026-03-17,
|
|
173
|
+
WIP-7,Improvement,Medium,Design the data warehouse schema for the business intelligence team,2026-03-17,
|
|
174
|
+
WIP-42,Story,Medium,Implement fine-grained authorization using attribute-based policies,2026-03-17,
|
|
175
|
+
WIP-14,Bug,Medium,Build automated load testing harness for the API performance suite,2026-03-18,
|
|
176
|
+
WIP-28,Task,Medium,Refactor legacy vendor integrations to use the new adapter pattern,2026-03-18,
|
|
177
|
+
WIP-4,Improvement,Highest,Add support for real-time collaborative editing in the document module,2026-03-19,
|
|
178
|
+
WIP-22,Story,Low,Implement the new subscription billing model with proration support,2026-03-19,
|
|
179
|
+
WIP-9,Bug,Medium,Build the self-healing infrastructure automation for cloud resources,2026-03-20,
|
|
180
|
+
WIP-11,Task,Low,Migrate from polling to event-driven architecture for data updates,2026-03-20,
|
|
181
|
+
WIP-17,Improvement,Lowest,Implement smart search with natural language processing capabilities,2026-03-21,
|
|
182
|
+
WIP-45,Story,High,Add comprehensive data lineage tracking for regulatory compliance,2026-03-22,
|
|
183
|
+
WIP-32,Bug,Low,Build the partner API portal with usage analytics and rate limiting,2026-03-23,
|
|
184
|
+
WIP-26,Task,Low,Refactor the codebase to eliminate circular dependency chains,2026-03-24,
|
|
185
|
+
WIP-2,Improvement,Medium,Implement the new onboarding email sequence with personalisation,2026-03-25,
|
|
186
|
+
WIP-36,Story,Low,Add support for custom branding and white-labelling for enterprise,2026-03-25,
|
|
187
|
+
WIP-29,Bug,Low,Implement serverless functions for the image transformation pipeline,2026-03-26,
|
|
188
|
+
WIP-38,Task,Medium,Build the configuration management service for dynamic feature flags,2026-03-27,
|
|
189
|
+
WIP-34,Improvement,Medium,Add support for importing data from legacy third-party CRM systems,2026-03-28,
|
|
190
|
+
WIP-31,Story,Low,Implement idempotent API endpoints to handle duplicate client requests,2026-04-01,
|
|
191
|
+
WIP-43,Bug,Medium,Refactor the notification dispatcher to support pluggable channels,2026-04-02,
|
|
192
|
+
WIP-13,Task,High,Build the comprehensive audit trail for the financial transactions,2026-04-04,
|
|
193
|
+
WIP-18,Improvement,Lowest,Implement chaos engineering tests for resilience validation,2026-04-05,
|
|
194
|
+
WIP-27,Story,Medium,Add multi-language support for the automated email templates,2026-04-05,
|
|
195
|
+
WIP-8,Bug,Low,Build the new incident management dashboard with on-call scheduling,2026-04-06,
|
|
196
|
+
WIP-10,Task,Medium,Implement the compliance reporting module for SOC2 certification,2026-04-06,
|
|
197
|
+
WIP-35,Improvement,Medium,Add support for versioned API contracts with backward compatibility,2026-04-06,
|
|
198
|
+
WIP-6,Story,High,Implement the new pricing engine with tiered discount calculations,2026-04-09,
|
|
199
|
+
WIP-1,Bug,High,Build the customer health score algorithm for the success team,2026-04-11,
|
|
200
|
+
WIP-16,Task,High,Refactor the data anonymisation pipeline for privacy compliance,2026-04-11,
|
|
201
|
+
WIP-49,Improvement,Low,Add intelligent alerting with anomaly detection for system metrics,2026-04-11,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PredictabilityEngine
|
|
4
|
+
module Agents
|
|
5
|
+
class Assistant
|
|
6
|
+
attr_reader :llm, :assistant, :tools
|
|
7
|
+
|
|
8
|
+
def initialize(data_manager)
|
|
9
|
+
# Using OpenAI as default. Requires OPENAI_API_KEY in .env
|
|
10
|
+
@llm = Langchain::LLM::OpenAI.new(api_key: ENV.fetch('OPENAI_API_KEY', nil))
|
|
11
|
+
@tools = [PredictabilityEngine::Agents::Tools.new(data_manager)]
|
|
12
|
+
|
|
13
|
+
@assistant = Langchain::Assistant.new(
|
|
14
|
+
llm: @llm,
|
|
15
|
+
tools: @tools,
|
|
16
|
+
instructions: "You are an expert in Actionable Agile Metrics and Daniel Vacanti's predictability methods.
|
|
17
|
+
Your job is to answer 'When will it be done?' questions based on historical data.
|
|
18
|
+
Always explain the statistical confidence (p85) to the user.
|
|
19
|
+
You can also analyze Cumulative Flow Diagrams for anomalies like growing WIP."
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def ask(question)
|
|
24
|
+
@assistant.add_message(question)
|
|
25
|
+
@assistant.run
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative '../visualizer'
|
|
4
|
+
|
|
5
|
+
module PredictabilityEngine
|
|
6
|
+
module Agents
|
|
7
|
+
class Tools
|
|
8
|
+
include Langchain::ToolDefinition
|
|
9
|
+
|
|
10
|
+
attr_reader :data_manager
|
|
11
|
+
|
|
12
|
+
def initialize(data_manager)
|
|
13
|
+
@data_manager = data_manager
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
desc 'Get average throughput for all work items'
|
|
17
|
+
define_method :get_throughput_average do
|
|
18
|
+
PredictabilityEngine::Calculators::Throughput.average(@data_manager.work_items)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
desc 'Get visual charts (ASCII art) for Aging WIP, Cycle Time, Throughput, and Forecasted CFD'
|
|
22
|
+
define_method :get_visual_charts do
|
|
23
|
+
{
|
|
24
|
+
aging_wip: PredictabilityEngine::Visualizer.aging_wip(@data_manager.work_items),
|
|
25
|
+
scatter_plot: PredictabilityEngine::Visualizer.cycle_time_scatter(@data_manager.work_items),
|
|
26
|
+
throughput_histogram: PredictabilityEngine::Visualizer.throughput_histogram(@data_manager.work_items),
|
|
27
|
+
cfd_plot: PredictabilityEngine::Visualizer.forecasted_cfd_plot(@data_manager.work_items)
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
desc 'Get current WIP aging data (age of items not yet completed)'
|
|
32
|
+
define_method :get_aging_data do
|
|
33
|
+
PredictabilityEngine::Calculators::Aging.item_age_data(@data_manager.work_items)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
desc 'Get forecasted CFD summary (probabilistic projections for current WIP)'
|
|
37
|
+
define_method :get_cfd_forecast do
|
|
38
|
+
PredictabilityEngine::Calculators::Cfd.forecast_summary(@data_manager.work_items)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
desc 'Get cycle time percentiles'
|
|
42
|
+
define_method :get_cycle_time_percentiles do
|
|
43
|
+
PredictabilityEngine::DEFAULT_PERCENTILES.to_h do |p|
|
|
44
|
+
[:"p#{p}", PredictabilityEngine::Calculators::CycleTime.percentile(@data_manager.work_items, p)]
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
desc 'Forecast when items will be done based on backlog size'
|
|
49
|
+
define_method :forecast_when_done do |backlog_count:|
|
|
50
|
+
historical = PredictabilityEngine::Calculators::Throughput.daily(@data_manager.work_items).values
|
|
51
|
+
results = PredictabilityEngine::Simulators::MonteCarlo.when_will_it_be_done(backlog_count.to_i, historical)
|
|
52
|
+
|
|
53
|
+
PredictabilityEngine::DEFAULT_PERCENTILES.to_h do |p|
|
|
54
|
+
[:"p#{p}_days", PredictabilityEngine::Simulators::MonteCarlo.percentile(results, p)]
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
desc 'Generate a full report in a specified format (html, pdf, md, etc)'
|
|
59
|
+
define_method :generate_report do |format: 'terminal'|
|
|
60
|
+
source = @data_manager.source || 'ai_report.csv'
|
|
61
|
+
PredictabilityEngine.run_report(source, format)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
desc 'Analyze Cumulative Flow Diagram for anomalies like growing WIP'
|
|
65
|
+
define_method :analyze_cfd do
|
|
66
|
+
cfd_data = PredictabilityEngine::Calculators::Cfd.calculate(@data_manager.work_items)
|
|
67
|
+
recent = cfd_data.last(30)
|
|
68
|
+
return { error: 'Not enough data' } if recent.empty?
|
|
69
|
+
|
|
70
|
+
perform_cfd_trend_analysis(recent)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
private
|
|
74
|
+
|
|
75
|
+
def perform_cfd_trend_analysis(recent)
|
|
76
|
+
wips = recent.map { |d| d[:wip] }
|
|
77
|
+
departures = recent.map { |d| d[:departed] }
|
|
78
|
+
|
|
79
|
+
growing_wip = wips.last > wips.first
|
|
80
|
+
stagnant_tp = (departures.last - departures.first) <= 1
|
|
81
|
+
|
|
82
|
+
build_cfd_analysis_response(wips.last, growing_wip, stagnant_tp, recent.size)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def build_cfd_analysis_response(current_wip, growing_wip, stagnant_tp, data_points)
|
|
86
|
+
summary = "Current WIP is #{current_wip}. WIP trend is #{growing_wip ? 'growing' : 'stable'}. " \
|
|
87
|
+
"Throughput is #{stagnant_tp ? 'stagnant' : 'active'}."
|
|
88
|
+
{
|
|
89
|
+
current_wip: current_wip,
|
|
90
|
+
wip_trend: growing_wip ? 'Growing' : 'Stable/Decreasing',
|
|
91
|
+
stagnant_throughput: stagnant_tp,
|
|
92
|
+
summary: summary,
|
|
93
|
+
recent_data_points: data_points
|
|
94
|
+
}
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PredictabilityEngine
|
|
4
|
+
module Calculators
|
|
5
|
+
class Aging
|
|
6
|
+
def self.current_wip(work_items, date = PredictabilityEngine.today)
|
|
7
|
+
work_items.select { |item| item.in_progress?(date) }
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def self.summary_metrics(work_items, date = PredictabilityEngine.today)
|
|
11
|
+
wip = current_wip(work_items, date)
|
|
12
|
+
return nil if wip.empty?
|
|
13
|
+
|
|
14
|
+
ages = wip.map { |item| item.age(date) }
|
|
15
|
+
{
|
|
16
|
+
count: wip.size,
|
|
17
|
+
avg_age: (ages.sum.to_f / ages.size).round(1),
|
|
18
|
+
max_age: ages.max
|
|
19
|
+
}
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def self.item_age_data(work_items, date = PredictabilityEngine.today)
|
|
23
|
+
data = current_wip(work_items, date).map do |item|
|
|
24
|
+
{
|
|
25
|
+
id: item.id,
|
|
26
|
+
title: item.title,
|
|
27
|
+
age: item.age(date),
|
|
28
|
+
start_date: item.start_date,
|
|
29
|
+
url: item.url
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
data.sort_by { |d| d[:age] }.reverse
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module PredictabilityEngine
|
|
6
|
+
module Calculators
|
|
7
|
+
module Cfd
|
|
8
|
+
def self.calculate(work_items, start_date: nil, end_date: nil)
|
|
9
|
+
events = collect_events(work_items)
|
|
10
|
+
return [] if events.empty?
|
|
11
|
+
|
|
12
|
+
results = process_events(events)
|
|
13
|
+
fill_daily_gaps(results, start_date, end_date)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.collect_events(work_items)
|
|
17
|
+
arrival_data = work_items.map do |i|
|
|
18
|
+
{ date: i.start_date || i.end_date || PredictabilityEngine.today, type: :arrived }
|
|
19
|
+
end
|
|
20
|
+
departure_data = work_items.select(&:completed?).map { |i| { date: i.end_date, type: :departed } }
|
|
21
|
+
(arrival_data + departure_data).sort_by { |e| [e[:date], e[:type] == :arrived ? 0 : 1] }
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.forecast_summary(items, **)
|
|
25
|
+
CfdForecaster.forecast_summary(items, **)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.forecast_series(items, **)
|
|
29
|
+
CfdForecaster.forecast_series(items, **)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.fill_daily_gaps(results, start_date, end_date)
|
|
33
|
+
start_date ||= results.first[:date]
|
|
34
|
+
end_date ||= results.last[:date]
|
|
35
|
+
|
|
36
|
+
data_map = results.to_h { |r| [r[:date], r] }
|
|
37
|
+
arrived = 0
|
|
38
|
+
departed = 0
|
|
39
|
+
|
|
40
|
+
(start_date..end_date).map do |date|
|
|
41
|
+
if data_map[date]
|
|
42
|
+
arrived = data_map[date][:arrived]
|
|
43
|
+
departed = data_map[date][:departed]
|
|
44
|
+
end
|
|
45
|
+
build_day_record(date, arrived, departed)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def self.build_day_record(date, arrived, departed)
|
|
50
|
+
{ date: date, arrived: arrived, departed: departed, wip: arrived - departed }
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def self.process_events(events)
|
|
54
|
+
arrived = 0
|
|
55
|
+
departed = 0
|
|
56
|
+
results = []
|
|
57
|
+
events.group_by { |e| e[:date] }.each do |date, day_events|
|
|
58
|
+
day_events.each { |e| e[:type] == :arrived ? arrived += 1 : departed += 1 }
|
|
59
|
+
results << build_day_record(date, arrived, departed)
|
|
60
|
+
end
|
|
61
|
+
results
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def self.with_forecast(work_items, percentiles: PredictabilityEngine::DEFAULT_PERCENTILES)
|
|
65
|
+
forecast = forecast_summary(work_items, percentiles: percentiles)
|
|
66
|
+
return yield(nil) unless forecast
|
|
67
|
+
|
|
68
|
+
yield({ summary: forecast, max_days: percentiles.map { |p| forecast[:"p#{p}"] }.max })
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def self.to_coordinates(cfd, start_date)
|
|
72
|
+
{ dates: cfd.map { |d| (d[:date] - start_date).to_i },
|
|
73
|
+
arrived: cfd.map { |d| d[:arrived] },
|
|
74
|
+
departed: cfd.map { |d| d[:departed] } }
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
private_class_method :process_events, :fill_daily_gaps, :build_day_record
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|