changeset 651: |
af486e0a40c9 |
parent: |
f58f3b88c49e
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Sat, 14 Sep 2024 22:13:06 -0400 |
permissions: |
-rw-r--r-- |
description: |
multi-binaries, working on removing x.lisp |
1 ;;; scrum.el --- Scrum-like Planning and Roadmaps in Org -*- lexical-binding: t; -*- 3 ;; Copyright (C) 2024 Richard Westhaver 5 ;; Author: Richard Westhaver <richard.westhaver@gmail.com> 8 ;; This program is free software; you can redistribute it and/or modify 9 ;; it under the terms of the GNU General Public License as published by 10 ;; the Free Software Foundation, either version 3 of the License, or 11 ;; (at your option) any later version. 13 ;; This program is distributed in the hope that it will be useful, 14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ;; GNU General Public License for more details. 18 ;; You should have received a copy of the GNU General Public License 19 ;; along with this program. If not, see <https://www.gnu.org/licenses/>. 23 ;; The point of this package is to enable an Emacs-native scrum 24 ;; workflow. Many years ago I used to use the org-jira package and 25 ;; mirror an external scrum/agile system (Jira). 27 ;; Mind you, I wouldn't dare take a shot at Jira. As far as Products 28 ;; go, when you need to work with hundreds of humans on software and 29 ;; are given a short list you must choose from, it's often the best of 32 ;; The problem is however, that we don't need Products. What we need, 33 ;; is a plan. How we achieve that end should be via the best and most 34 ;; powerful tools possible. 36 ;; In my opinion, Emacs Org Mode is the most powerful tool 37 ;; available. It is not quite the best tool for the job, but this 38 ;; isn't a problem because it is not a Product. We are given the 39 ;; opportunity to make it the best tool possible, in the only way 40 ;; possible - by doing it ourselves. 42 ;; And yes, the aura of NIH syndrome may be strong here. Most of the 43 ;; time you need to work with lots of folks who don't have the need or 44 ;; patience to learn Org-mode. This package isn't for them. It's for 45 ;; small groups of like-minded Lispers :). 48 ;; scrum: https://www.scrum.org/resources/what-scrum-module 50 ;; roadmap: https://compiler.company/plan/roadmap.html 52 ;; tasks: https://compiler.company/plan/tasks 56 ;; The API is still very much a WIP. Assume everything below to be 59 ;; - task dependencies 60 ;; - refer to org-depend.el for implementation details 61 ;; - org-trigger-hook and org-blocker-hook 62 ;; - org-todo-state-tags-triggers 73 "CC Scrum Framework.") 75 (defvar scrum-properties '("SPRINT" "EPIC" "RELEASE" "TASKID" "PROJECT" "COMMIT" "GOAL")) 77 (defvar scrum-tags '("demo" "mvp" "release" "major-release" "ua" "qa")) 79 (defun org-dblock-write:scrumboard () 80 "Generate a 'scrumboard'.") 82 ;; TODO 2024-09-06: eplot 83 (defun org-dblock-write:burndown () 84 "Generate a 'burndown' chart in the current buffer.") 87 ;; defining 'project' machinery here because we don't have a better 88 ;; place to put it. These functions are intended to map projects 89 ;; from 'skel' and 'project.el' into our task-based org system. 91 ;; Projects can contain many subprojects, which are identified by org 92 ;; headings with a 'PROJECT' todo keyword. Projects and sub-projects 93 ;; all have a 'VERSION' property assigned which can't be 94 ;; inherited. The 'PROJECT' property itself can be inherited. 97 (defcustom org-project-info-order '(details status tasks churn log files) 98 "Order in which sections of the 'project-info' dblock will appear." 102 (defun org-dblock-write:project-info (params) 103 "Generate a project-info section. 105 The following keyword parameters can be passed to the info dynamic block: 107 :location Set or override the project location which is inferred by 108 checking for a LOCATION property in the current tree, followed 109 by the value of the `project-current' function. 111 :branch Set or override the project branch to display info for. Default 112 branch name is 'default'. 114 :files When nil don't include the files table. 115 :churn When nil don't include the vc churn report. 116 :log when nil don't include the vc log. 117 :status when nil don't include vc status. 118 :details When nil don't include the project details section." 119 (let ((location (or (when-let ((param (plist-get params :location))) 120 (cl-coerce param 'string)) 121 (org-entry-get (point) "LOCATION") 122 (when-let ((kw (org-collect-keywords '("LOCATION")))) 124 (project-root (project-current)))) 126 (files (if-let ((val (plist-member params :files))) 129 (churn (if-let ((val (plist-member params :churn))) 132 (status (if-let ((val (plist-member params :log))) 135 (log (if-let ((val (plist-member params :status))) 138 (tasks (if-let ((val (plist-member params :tasks))) 141 (details (if-let ((val (plist-member params :details))) 144 (message "Generating info for project: %s" location) 145 (let* ((project (project-current nil location)) 146 (project-name (project-name project)) 147 (project-root (project-root project))) 148 (dolist (i org-project-info-order) 150 ('details (when details 151 (message "building project details...") 152 (insert "#+CALL: project-details() :dir " project-root "\n") 153 (org-babel-execute-maybe) 155 ('status (when status 156 (message "building project status...") 157 (insert "#+CALL: hg-status() :dir " project-root "\n"))) 159 (message "building project tasks...") 160 (insert "#+CALL: project-tasks() :dir " project-root "\n"))) 162 (message "building project vc churn...") 163 (insert "#+CALL: hg-churn() :dir " project-root "\n"))) 165 (message "building project vc log..."))) 167 (message "building project file table...") 168 (insert "#+CALL: project-files() :dir " project-root "\n"))))) 169 (org-babel-execute-region point (point))))) 171 (defun org-project-info () 172 "Insert or update a project-info dblock." 174 (if (re-search-forward (rx bol "#+BEGIN:" (+ space) "project-info") nil t) 176 (if (fboundp 'org-fold-show-entry) 177 (org-fold-show-entry) 178 (with-no-warnings (org-show-entry))) 180 (org-create-dblock (list :name "project-info"))) 184 ;;; scrum.el ends here