Need views in MyST

The MyST forms of the specimens on Need views, each rendered live by this page’s own Markdown parser. The views show the six specimen needs defined on that page, because a view selects needs from the whole project.

Tables

A needs table

```{needtable} The view specimens
:tags: ex-views
:columns: id, title, status, links as "Links to"
:sort: title
:style: datatables
:page_size: 5
```
The view specimens

ID

Title

Status

Links to

EX_IMPL_VIEWS_1

CSV reader

done

EX_TEST_VIEWS_1

CSV reader test

open

EX_REQ_VIEWS_2

Export a PDF report

open

EX_REQ_VIEWS_1

Import a CSV file

done

EX_SPEC_VIEWS_2

Lay out the pages

open

EX_SPEC_VIEWS_1

Read the header row

done

Lists

A needs list

```{needlist}
:tags: ex-views
:status: open
:show_status:
:sort_by: id
```

Extracts

An extract

```{needextract} EX_REQ_VIEWS_2
```
Requirement: Export a PDF report EX_REQ_VIEWS_2
status: open
tags: ex-views
duration: 3
completion: 20
links incoming: EX_SPEC_VIEWS_2

A user can save the report as a PDF file.

Flow diagrams

A flow diagram

```{needflow}
:tags: ex-views
```
needflow graphviz diagram

Sequence diagrams

A sequence diagram

```{needsequence} The CSV reader
:start: EX_IMPL_VIEWS_1
```

Pie charts

A pie chart

```{needpie} Needs by status
:tags: ex-views
:labels: open, done
:colors: "#DCB239, #BFD8D2"
:legend:

status == "open"
status == "done"
```
Needs by status

Bar charts

A bar chart

```{needbar} Needs by type and status
:tags: ex-views
:xlabels: Requirements, Specifications
:ylabels: open, done
:legend:

type == "req" and status == "open", type == "spec" and status == "open"
type == "req" and status == "done", type == "spec" and status == "done"
```
Needs by type and status

Gantt charts

A Gantt chart

```{needgantt} The import and export plan
:tags: ex-views
```

UML diagrams

A UML diagram and an architecture diagram

```{needuml}
{{flow("EX_IMPL_VIEWS_1")}}
{{flow("EX_REQ_VIEWS_1")}}
EX_IMPL_VIEWS_1 --> EX_REQ_VIEWS_1
```

````{impl} PDF writer
:id: EX_IMPL_VIEWS_MYST_ARCH
:status: open

```{needarch}
{{flow(need().id)}}
{{flow("EX_SPEC_VIEWS_2")}}
{{need().id}} --> EX_SPEC_VIEWS_2
```
````

@startuml

node "<size:12>Implementation</size>\n**CSV reader**\n<size:10>EX_IMPL_VIEWS_1</size>" as EX_IMPL_VIEWS_1 [[../authoring/needs/views.html#EX_IMPL_VIEWS_1]] #DF744A
node "<size:12>Requirement</size>\n**Import a CSV**\n**file**\n<size:10>EX_REQ_VIEWS_1</size>" as EX_REQ_VIEWS_1 [[../authoring/needs/views.html#EX_REQ_VIEWS_1]] #BFD8D2
EX_IMPL_VIEWS_1 --> EX_REQ_VIEWS_1
@enduml

Implementation: PDF writer EX_IMPL_VIEWS_MYST_ARCH
status: open

@startuml

node "<size:12>Implementation</size>\n**PDF writer**\n<size:10>EX_IMPL_VIEWS_MYST_ARCH</size>" as EX_IMPL_VIEWS_MYST_ARCH [[../authoring/needs/views_myst.html#EX_IMPL_VIEWS_MYST_ARCH]] #DF744A
node "<size:12>Specification</size>\n**Lay out the**\n**pages**\n<size:10>EX_SPEC_VIEWS_2</size>" as EX_SPEC_VIEWS_2 [[../authoring/needs/views.html#EX_SPEC_VIEWS_2]] #FEDCD2
EX_IMPL_VIEWS_MYST_ARCH --> EX_SPEC_VIEWS_2
@enduml