Skip to content

v0.7.0: holiday calendars, weekend/overtime work patterns, float in XML, cpm + Monte Carlo risk - #7

Merged
cruiseliner merged 1 commit into
mainfrom
feature/calendars-holidays-risk
Oct 17, 2026
Merged

cruiseliner merged 1 commit into
mainfrom
feature/calendars-holidays-risk

Conversation

@cruiseliner

Copy link
Copy Markdown
Owner

v0.7.0: calendars, holidays, float and schedule risk

Holiday calendars (--holidays, --years, --holiday-file)

  • Built-in rule tables (no data files, no new dependencies). US federal: all 11 holidays, with the observed-date rule (Sat→Fri, Sun→Mon, so New Year's Day 2028 is observed Fri 2027-12-31). Juneteenth applies from 2021. Also CA, GB (England & Wales, with substitute days), AU, DE, FR, IN (fixed-date only) and MX. Countries can be combined (US,CA).
  • --holiday-file: CSV lines date[..date],name[,hours] for shutdowns (non-working days) or working exceptions such as overtime Saturdays and make-up days.
  • New holidays --country US --years 2026-2028 [--csv|--json] lists them (--country list shows the supported countries).

Work weeks and overtime

  • --work-days mon-sat|all|…, --hours 06:00-11:00,11:30-16:30 (shift hours), and repeatable --day sat=07:00-12:00 / mon-thu=06:00-16:30 / fri=off. --hours-per-day sets the length of a duration day.
  • Everything is written to the MSPDI calendar: WeekDays, plus an Exception for every holiday or custom day in the plan's years.

from-csv

  • Scheduling now runs on a working-minute axis, and dates move around all non-working time.
  • Writes TotalSlack and FreeSlack (in tenths of a minute), so the DCMA float checks (6, 7, 13) now run on CSV plans.
  • With no calendar options the output is byte-identical to v0.6.1, apart from the new slack elements (checked by diffing plan.csv and team.csv against main).

cpm and risk on any schedule

  • They run on .mpp, .mpx, MSPDI, XER, P6 XML, CSV plans, and a JSON task list (tasks --json output).
  • Imported files are rescheduled on their project calendar, using remaining durations and progress anchoring.
  • risk: PERT-beta Monte Carlo (built-in, reproducible RNG) giving P10/P50/P80/P90, P(meet deterministic finish), the mean, and a per-task criticality index. This ports ppa/tools/montecarlo.py and adds calendar awareness.

Docs

  • README section on calendars and risk, plus updated limitations.
  • States plainly that the XML output is not yet verified in real Microsoft Project: read it back with mpptool tasks before importing. There is no XER writer: import the MSP XML into P6 and verify it on your P6 version.
  • CHANGELOG updated and version bumped to 0.7.0.

Tests

  • cargo fmt --check, cargo clippy --all-targets -D warnings and cargo test all pass: 33 unit, 14 cli, 8 p6, 14 reports and 1 doc test.
  • Corpus: 606 MPP converted, read_failures=3 (password-protected), xml_not_wellformed=0, roundtrip_mismatch=0. P6: 12/12, 0 mismatches. Features: 761 files, 0 failures.
  • risk over 635 corpus files: 475 OK, 0 panics. The 160 errors are expected: 156 have no tasks, 3 are password-protected and 1 needs the de locale.

Known gaps

  • No task or resource calendars in cpm/risk.
  • Only SNET/MSO constraints are honored, and there is no leveling, so dates can differ from Project/P6.
  • No separate overtime work or cost fields.
  • Regional and one-off holidays aren't built in (use --holiday-file).
  • compare/variance slip still counts Mon–Fri days.
  • Monte Carlo has no correlation and no discrete risk events.

@cruiseliner
cruiseliner merged commit 839910a into main Oct 17, 2026
5 checks passed
cruiseliner added a commit that referenced this pull request Oct 17, 2026
…eveling

v0.8.0 (draft, stacked on #7): risk events, uncertainty classes, sensitivity, progress updates, leveling, DCMA options
@cruiseliner
cruiseliner deleted the feature/calendars-holidays-risk branch October 17, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant