# osio-stats

> Stats for OpenShift.io project(s) gathered from Planner

Latest version **0.0.4** (published 2018-09-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install osio-stats
pnpm add osio-stats
yarn add osio-stats
bun add osio-stats
```

Provides the command `osio-stats`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2018-09-14 |
| First published | 2018-08-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 13 |
| Unpacked size | 22.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Karel Piwko |
| Maintainers | kpiwko |
| Keywords | metrics |

## Links

- npm: https://www.npmjs.com/package/osio-stats
- Repository: https://github.com/openshiftio/openshiftio-stats
- Homepage: https://github.com/openshiftio/openshiftio-stats#readme
- Issues: https://github.com/openshiftio/openshiftio-stats/issues
- npm.io page: https://npm.io/package/osio-stats

## Dependencies (13)

- [flat](https://npm.io/package/flat.md) ^4.1.0
- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [yargs](https://npm.io/package/yargs.md) ^12.0.1
- [request](https://npm.io/package/request.md) ^2.88.0
- [json2csv](https://npm.io/package/json2csv.md) ^4.2.1
- [mustache](https://npm.io/package/mustache.md) ^2.3.2
- [bootstrap](https://npm.io/package/bootstrap.md) ^4.1.3
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.1
- [tty-table](https://npm.io/package/tty-table.md) ^2.6.8
- [valid-url](https://npm.io/package/valid-url.md) ^1.0.9
- [prettyjson](https://npm.io/package/prettyjson.md) ^1.2.1
- [@types/request](https://npm.io/package/@types/request.md) ^2.47.1
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.5

## Recent versions

- 0.0.4 (latest) — 2018-09-14
- 0.0.3 — 2018-09-11
- 0.0.2 — 2018-08-21

## README

# OSIO Stats

A tool to gather various statistics from OpenShift.io Planner

## Usage

Prerequities:
* Node.js 8 or newer

After cloning this repository, run following
```
npm install -g
osio-stats --help
```

## Examples

### Iterations

1. Get stats about iterations in a space (uses default space _Openshift_io_) in a tabular form

`osio-stats iterations`

2. Exploring what various columns mean
```
osio-stats iterations --help
usage: osio-stats iterations  [options]

Queries iterations in selected spaces and shows high level statistics
Available columns (select by providing [id] in --columns option):

[id]		  ID - ID of iteration
[pid]		  Parent ID - ID of iteration parent, if it exists
[name]		Name - Name of iteration
[total]		# Total WIs - Number of total workitems in iteration (including children and all workitem types)
[wis]		  # WIs - Number of workitems in iteration (direct items only and filtered by work item type)
[woSPs]		# WIs w/o SPs - Number of workitems in iteration without story points
[woACs]		# WIs w/o ACs - Number of workitems in iteration without acceptance criteria
[spCom]		SPs completed - Total story points completed in the iteration
[spTot]		SPs total - Total story points estimated in the iteration

Options:
  --space               Space (id) to work with  [default: OpenShift_io]
  --include-item-types  Filter any query by item type(s)  [array] [default: Include all item types]
  --tsv                 Print out query outcome in Tab Separated Value format  [default: false]
  --version             Show version number  [boolean]
  --columns             Columns  [array] [default: Include all columns: id, pid, name, total, wis, woSPs, woACs, spCom, spTot]
  --help                Show help  [boolean]
```
3. Filter items by particular type (focus on Stories here)

`osio-stats iterations --include-item-types Story`

4. Display only columns we are interested in

`osio-stats iterations --include-item-types Story --columns name wis woSPs`

5. Output as tab separated values
```
osio-metrics git:(master) ✗ osio-stats iterations --include-item-types Story --columns name wis woSPs --tsv
"Name"	"# WIs"	"# WIs w/o SPs"
"Jonquil"	18	12
"Knapweed"	2	2
...
```

6. Output as HTML
```
osio-metrics git:(master) ✗ osio-stats iterations --html
<html>
  <head>
    <title>OpenShift.io Iterations Statistics</title>
...    
```

TIP: Use can pipe output to `pbcopy` command for output to appear in your clipboard or you can redirect it to file via `> filename.html'

### Workitems

Experimental feature at this point

1. Get work items in the iteration

`osio-status work-items 'Sprint 152'`

2. Get work items of porticular type (_Story_) in the iteration

`osio-status work-items 'Sprint 152' --include-item-types Story`

---
_Source: https://npm.io/package/osio-stats · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
