Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • 0.1.1
  • 0.1.0
3 results

requirements-manager

  • Clone with SSH
  • Clone with HTTPS
  • Volker Schukai's avatar
    Volker Schukai authored
    3801d61c
    History

    Requirements Manager

    This tool helps to manage requirements written in Markdown.

    Install

    Reqman is a binary file that must be stored in a directory. The files can be found here.

    For Linux, the execution bit must still be set.

    chmod u+x reqman

    Or here in a command:

    wget -O ~/.local/bin/reqman http://download.schukai.com/tools/reqman/reqman-$( uname -s | tr [:upper:] [:lower:])-$(echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`) && chmod u+x ~/.local/bin/reqman

    Commands

    General Parameters

    The date format for the output can be specified with the parameter --date-format.

    All confirguration values can also be specified in a configuration file. The configuration file can be specified with the --config parameter.

    If no path is specified, the configuration file config.yaml is first searched for in the working directory. If this is not found, the file is searched for in the home directory ~/.config/requirements-manager/config.yaml.

    Finally, we look for the configuration in the /etc/requirements-manager/config.yaml directory.

    The parameter path specifies the path.

    Help

    There is help on the command line for each individual command.

    reqman --help

    New Requirements

    A new request can be created with the following command.

    reqman requirements add --id 1425

    An entirely new file with a structure is created. The --id 1425 is both the file name and the ID of the request.

    All available fields are listed in the new file.

    Output a PDF

    A PDF can be created using the following command:

    reqman overview \
           print \
           --path=requirement/documents   \
           --column=ID \
           --column=Title  \
           --template=template/schukai.md  \
           --latex-template-path=requirement/template/schukai.latex \
           --output=report.pdf \
           --format=pdf

    In this case, the markdown files in the path requirement/documents are read.

    A table with all requirements is created in the file and the two columns ID and Title are used. Additional columns can be added using additional options --column.

    File template/schukai.md is used as a template.

    The LaTeX template requirement/template/schukai.latex is used for the design of the PDF.

    The output format is PDF and the filename of the PDF document is report.pdf.

    You can use a complete directory or a subdirectory as the path.

    Output of the tasks

    Tasks are used to document open points in the document itself.

    For example, if a description is still missing or a picture needs to be added.

    A task can be defined by the notation - [ ] task or - [] 2022-12-13 task with due date.

    Completed tasks should at best be deleted from the document. However, they can also be set as completed by writing [x] 2022-12-13 done task.

    example:

    - [ ] task 1
    - [ ] tast 2
    - [x] 2022-12-13 task 3 with due date

    The call is as follows:

    reqman tasks print --path=examples/

    The output is then of the type:

    AUFGABE BIS ERLEDIGT DATEI
    task 1 file.md
    tast 2 file.md
    task 3 with due date 2022-12-13 file.md

    Output of the items

    reqman requirements print --path examples/ --column ID --column Title

    The output is then of the type:

    ID TITEL
    A1 My requirement

    More columns can be added with --column.

    Output of privacy

    reqman privacy print --path=example/

    Output of requirements

    reqman requirements print --path=example/ --column=ID --column=

    The output is then of the type:

    ID GRUPPE NAME TYP BESCHREIBUNG BIS ERLEDIGT AM VON DATEI
    23423-Beistellung1 A1 Beistellung eines Bildes Bild Großes Logo 2022-12-12 2022-12-01 Me ./req1/002/002-01.md

    Output changelog

    reqman changelog print --path=example/

    The output is then of the type:

    ### 01.05.2022
    
    - Requirement (R2)
    
    ### 24.01.2022
    
    - Requirement (R1)
    

    Output report

    requirements report --grouped-by ID

    This command produces two tables:

    Anforderung Gesch TIME SPENT
    ID1 40 1
    ID2 40 1
    ID3 40 1
    ID4 40 1
    ID5 40 2
    ID6 40 2
    ID7 40 2
    ID8 40 2
    ID9 40 2
    ID10 40 2
    ID11 40 3
    ID12 40 3
    ID13 40 3
    ID14 40 3
    ID15 40 3
    ID16 40 3
    ID17 40 3
    ID18 40 4
    ID19 40 4
    ID20 40 4
    ID21 40 4
    ID22 40 5
    ID23 40 5
    ID24 40 6
    ID25 40 6
    1. Groups all estimates and adds up the estimate and the booked times. This allows you to see how much time you have spent.
    KEY PLANNED VALUE TIME SPENT RATIO
    ID1 1000 75h0m0s 7.50
    1. This table shows for each plan value the hours needed, the mean, the variance and the standard deviation.
    PLAN VALUE TIME SPENT MEAN VARIANCE STANDARD DEVIATION
    40 75h0m0s 3.00 2.08 1.44

    On average, we needed 3 hours in the example. However, we needed 6 hours for 2 requirements.

    The variance, or standard deviation, gives us a measure of how accurate we are. The smaller the standard deviation, the better.

    So, what decision can we derive? If a new requirement is estimated at 40, the hours offered should be between 3 and 5.

    Sync with GitLab

    You can synchronize the issues of a document with a GitLab server.

    reqman gitlab sync --path=example/

    If no ID is defined in the document, an issue is created,

    issues:
      - gitlab:
          title: "Issue 1"

    otherwise, the data is updated.

    issues:
      - gitlab:
          id: 1

    Structure

    The Text

    The individual requirements are Markdown files with integrated YAML structure. The YAML structure must be introduced with --- and closed with ....

    The data from the YAML block can be integrated in the text via placeholders.

    For example, the following statement can be used to include the items within the document.

    {{ if.Items }}
    **Items**
    
    | ID                 | Name         |        Delivery until |                              Provided on |
    |--------------------|--------------|----------------------:|-----------------------------------------:|
    {{ range.Items
    }}| {{ .ID }} | {{ .Name }} | {{ .DeliveryUntil.Format "02.Jan" }} | {{ .ProvidedOn.Format "02.Jan"  }} |
    {{ end }}
    
    {{ end }}

    If the PDF function is used, LaTeX commands can also be included in the text. For example, the LaTeX instruction ` /newline' leads to a line break.

    YAML

    > " ' >- >+ │- │+
    Spaces/newlines converted as:
    Trailing space → _ _ _ _ _ _
    Leading space → \n_ \n_ \n_ \n_ \n_ \n_
    Single newline → _ \n _ _ _ _ _ \n \n
    Double newline → \n \n\n \n \n \n \n \n \n\n \n\n
    Final newline → \n \n \n \n
    Final double newline → \n\n \n\n
    How to create a literal:
    Single quote ' ' ' ' '' ' ' ' '
    Double quote " " " \" " " " " "
    Backslash \ \ \ \\ \ \ \ \ \
    Other features
    In-line newlines with \n 🚫 🚫 🚫 🚫 🚫 🚫 🚫 🚫
    Spaceless newlines with \ 🚫 🚫 🚫 🚫 🚫 🚫 🚫 🚫
    # or : in value 🚫
    Can start on same line as key 🚫 🚫 🚫 🚫 🚫 🚫

    │ -> |

    Date

    If a date is expected as a parameter, it must be entered in a special format depending on the type. The following table provides information about the individual formats. The format can be looked up in the first column of the table below.

    Layout Java notation C notation Notes
    2006-01-02 yyyy-MM-dd %F ISO 8601
    20060102 yyyyMMdd %Y%m%d ISO 8601
    January 02, 2006 MMMM dd, yyyy %B %d, %Y
    02 January 2006 dd MMMM yyyy %d %B %Y
    02-Jan-2006 dd-MMM-yyyy %d-%b-%Y
    01/02/06 MM/dd/yy %D US
    01/02/2006 MM/dd/yyyy %m/%d/%Y US
    010206 MMddyy %m%d%y US
    Jan-02-06 MMM-dd-yy %b-%d-%y US
    Jan-02-2006 MMM-dd-yyyy %b-%d-%Y US
    06 yy %y
    Mon EEE %a
    Monday EEEE %A
    Jan-06 MMM-yy %b-%y

    Latex

    Individual LaTeX commands can be looked up here:

    Change Log

    • Version 1.0
      • Bug fixes
      • Added support for gitlab sync command
      • initial release