Skip to content

Commit ffbbc05

Browse files
Copilotchefgs
andcommitted
Update docs for scaffold unittest v0.4.0: README, QUICKSTART, hugo reference and getting-started
Co-authored-by: chefgs <7605658+chefgs@users.noreply.github.com>
1 parent dd85518 commit ffbbc05

4 files changed

Lines changed: 147 additions & 18 deletions

File tree

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[![CI](https://github.com/cloudengine-labs/devops_os/actions/workflows/ci.yml/badge.svg)](https://github.com/cloudengine-labs/devops_os/actions/workflows/ci.yml)
88
[![Sanity Tests](https://github.com/cloudengine-labs/devops_os/actions/workflows/sanity.yml/badge.svg)](https://github.com/cloudengine-labs/devops_os/actions/workflows/sanity.yml)
9-
[![Version](https://img.shields.io/badge/version-0.2.0-blue)](CHANGELOG.md)
9+
[![Version](https://img.shields.io/badge/version-0.4.0-blue)](CHANGELOG.md)
1010
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue?logo=python&logoColor=white)](https://www.python.org/)
1111
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
1212
[![Open Source](https://img.shields.io/badge/open%20source-%E2%9D%A4-red)](https://github.com/cloudengine-labs/devops_os)
@@ -29,6 +29,7 @@ DevOps-OS is an open-source DevOps automation platform that scaffolds production
2929
| 🚀 **CI/CD Generators** | One-command scaffolding for GitHub Actions, GitLab CI, and Jenkins pipelines |
3030
| ☸️ **GitOps Config Generator** | Kubernetes manifests, ArgoCD Applications, and Flux CD Kustomizations |
3131
| 📊 **SRE Config Generator** | Prometheus alert rules, Grafana dashboards, and SLO manifests |
32+
| 🧪 **Unit Test Scaffold** | Generate pytest, Jest, Vitest, Mocha, or Go test configs with one command |
3233
| 🤖 **MCP Server** | Plug DevOps-OS tools into Claude or ChatGPT as native AI skills |
3334
| 🛠️ **Dev Container** | Pre-configured multi-language environment (Python · Java · Go · JavaScript) |
3435
| 🔄 **Process-First** | Built-in education on the Process-First SDLC philosophy and how it maps to every DevOps-OS tool |
@@ -174,6 +175,13 @@ python -m cli.devopsos scaffold sre --name my-app --team platform --slo-target 9
174175
# Dev container configuration → .devcontainer/devcontainer.json + .devcontainer/devcontainer.env.json
175176
python -m cli.devopsos scaffold devcontainer --languages python,go --cicd-tools docker,terraform --kubernetes-tools k9s,flux
176177

178+
# Unit test configs + sample stubs (Python, JS, Go, TypeScript)
179+
python -m cli.devopsos scaffold unittest --name my-app --languages python
180+
python -m cli.devopsos scaffold unittest --name my-app --languages python,javascript,go
181+
182+
# Combined GitHub Actions + Jenkins in one step
183+
python -m cli.devopsos scaffold cicd --name my-app --type build --languages python --github --jenkins
184+
177185
# Kubernetes manifests
178186
python kubernetes/k8s-config-generator.py --name my-app --image ghcr.io/myorg/my-app:v1
179187
```
@@ -218,7 +226,7 @@ git clone https://github.com/cloudengine-labs/devops_os.git && cd devops_os
218226
pip install -r cli/requirements.txt
219227

220228
# ── Check version ──────────────────────────────────────────────────────────
221-
python -m cli.devopsos --version # → devopsos version 0.2.0
229+
python -m cli.devopsos --version # → devopsos version 0.4.0
222230

223231
# ── Interactive project wizard ─────────────────────────────────────────────
224232
python -m cli.devopsos init # guided setup for any project
@@ -247,6 +255,10 @@ python -m cli.devopsos scaffold devcontainer --languages python,go --cicd-tools
247255
# ── Combined CI/CD (GHA + Jenkins in one step) ────────────────────────────
248256
python -m cli.devopsos scaffold cicd --name my-app --type build --languages python --github --jenkins
249257

258+
# ── Unit Tests ─────────────────────────────────────────────────────────────
259+
python -m cli.devopsos scaffold unittest --name my-app --languages python
260+
python -m cli.devopsos scaffold unittest --name my-app --languages python,javascript,go
261+
250262
# ── Process-First philosophy ───────────────────────────────────────────────
251263
python -m cli.devopsos process-first # full overview
252264
python -m cli.devopsos process-first --section mapping # which tool for which goal
@@ -268,7 +280,7 @@ python -m cli.devopsos scaffold gha --help
268280
devops_os/
269281
├── .devcontainer/ # Dev container config (Dockerfile, devcontainer.json, setup scripts)
270282
├── .github/workflows/ # CI, Sanity Tests, and GitHub Pages workflows
271-
├── cli/ # CLI scaffold tools (scaffold_gha, gitlab, jenkins, argocd, sre, devopsos)
283+
├── cli/ # CLI scaffold tools (scaffold_gha, gitlab, jenkins, argocd, sre, unittest, devopsos)
272284
├── kubernetes/ # Kubernetes manifest generator
273285
├── mcp_server/ # MCP server for AI assistant integration (Claude, ChatGPT)
274286
├── skills/ # Claude & OpenAI tool/function definitions
@@ -291,7 +303,7 @@ pip install -r cli/requirements.txt -r mcp_server/requirements.txt pytest pytest
291303
python -m pytest cli/test_cli.py mcp_server/test_server.py tests/test_comprehensive.py -v
292304
```
293305

294-
**Latest results:**162 passed · ⚠️ 3 xfailed (known tracked bugs) · ❌ 0 failed
306+
**Latest results:**260 passed · ⚠️ 2 xfailed (known tracked bugs) · ❌ 0 failed
295307

296308
| Report | Description |
297309
|--------|-------------|
@@ -346,7 +358,7 @@ You can also customize `.devcontainer/devcontainer.env.json` directly to enable
346358
|-------|-------------|
347359
| [🚀 Getting Started](docs/GETTING-STARTED.md) | Easy step-by-step guide — **start here** |
348360
| [📖 CLI Commands Reference](docs/CLI-COMMANDS-REFERENCE.md) | **Complete reference** — every option, input file, and output location |
349-
| [🖥️ CLI Test Report](docs/CLI-TEST-REPORT.md) | v0.2.0 CLI revamp test results — 52 tests, all passing |
361+
| [🖥️ CLI Test Report](docs/CLI-TEST-REPORT.md) | v0.4.0 CLI test results — 62 tests, all passing |
350362
| [🔄 Process-First Philosophy](docs/PROCESS-FIRST.md) | What Process-First means, how it maps to DevOps-OS, and AI learning tips |
351363
| [📦 Dev Container Setup](docs/DEVOPS-OS-README.md) | Set up and customize the dev container |
352364
| [⚡ Quick Start Reference](docs/DEVOPS-OS-QUICKSTART.md) | Essential CLI commands for all features |
@@ -355,6 +367,7 @@ You can also customize `.devcontainer/devcontainer.env.json` directly to enable
355367
| [🔧 Jenkins Pipeline Generator](docs/JENKINS-PIPELINE-README.md) | Generate and customize Jenkins pipelines |
356368
| [🔄 ArgoCD / Flux GitOps](docs/ARGOCD-README.md) | Generate ArgoCD Applications and Flux Kustomizations |
357369
| [📊 SRE Configuration](docs/SRE-CONFIGURATION-README.md) | Prometheus rules, Grafana dashboards, SLO manifests |
370+
| [🧪 Unit Test Scaffold](docs/CLI-COMMANDS-REFERENCE.md#devopsos-scaffold-unittest--unit-test-scaffold-generator) | Generate pytest, Jest, Vitest, Mocha, or Go test configs |
358371
| [☸️ Kubernetes Deployments](docs/KUBERNETES-DEPLOYMENT-README.md) | Generate and manage Kubernetes deployment configs |
359372
| [🤖 MCP Server](mcp_server/README.md) | Connect DevOps-OS tools to Claude or ChatGPT |
360373
| [🧠 AI Skills](skills/README.md) | Use DevOps-OS with the Anthropic API or OpenAI function calling |

docs/DEVOPS-OS-QUICKSTART.md

Lines changed: 78 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This guide provides the essential CLI commands for using all functionalities of
1313
- [GitOps / ArgoCD & Flux CD](#gitops--argocd--flux-cd)
1414
- [SRE Configuration](#sre-configuration)
1515
- [Container Configuration](#container-configuration)
16+
- [Unit Test Scaffold](#unit-test-scaffold)
1617
- [Common Options for All Generators](#common-options-for-all-generators)
1718
- [Troubleshooting](#troubleshooting)
1819

@@ -365,19 +366,84 @@ cat > .devcontainer/devcontainer.env.json << EOF
365366
EOF
366367
```
367368

369+
## Unit Test Scaffold
370+
371+
Generate ready-to-use unit test configuration files and sample test stubs for Python, JavaScript/TypeScript, and Go.
372+
373+
### Python (pytest)
374+
375+
```bash
376+
# Generate pytest.ini, conftest.py, and a sample test file
377+
python -m cli.devopsos scaffold unittest --name my-api --languages python
378+
379+
# Without coverage configuration
380+
python -m cli.devopsos scaffold unittest --name my-api --languages python --no-coverage
381+
```
382+
383+
**Output:** `pytest.ini`, `conftest.py`, `tests/__init__.py`, `tests/test_sample.py`
384+
385+
### JavaScript / TypeScript
386+
387+
```bash
388+
# JavaScript with Jest (default)
389+
python -m cli.devopsos scaffold unittest --name my-app --languages javascript --framework jest
390+
391+
# JavaScript with Mocha
392+
python -m cli.devopsos scaffold unittest --name my-app --languages javascript --framework mocha
393+
394+
# TypeScript with Vitest
395+
python -m cli.devopsos scaffold unittest --name my-app --languages typescript --framework vitest
396+
```
397+
398+
**Output (Jest):** `jest.config.js`, `tests/sample.test.js`
399+
**Output (Vitest):** `vitest.config.js`, `tests/sample.test.ts`
400+
**Output (Mocha):** `.mocharc.js`, `tests/sample.test.js`
401+
402+
### Go
403+
404+
```bash
405+
# Generate a table-driven Go test file + Makefile
406+
python -m cli.devopsos scaffold unittest --name my-service --languages go
407+
```
408+
409+
**Output:** `my_service_test.go`, `Makefile.test`
410+
411+
### Multi-stack (all three in one command)
412+
413+
```bash
414+
python -m cli.devopsos scaffold unittest --name my-platform --languages python,javascript,go
415+
```
416+
417+
### All options
418+
419+
```bash
420+
# Show all available options
421+
python -m cli.devopsos scaffold unittest --help
422+
```
423+
424+
| Option | Env var | Default | Description |
425+
|--------|---------|---------|-------------|
426+
| `--name NAME` | `DEVOPS_OS_UNITTEST_NAME` | `my-app` | Project name |
427+
| `--languages LANGS` | `DEVOPS_OS_UNITTEST_LANGUAGES` | `python` | Comma-separated: `python`, `javascript`, `typescript`, `go` |
428+
| `--framework FW` | `DEVOPS_OS_UNITTEST_FRAMEWORK` | _(auto)_ | JS/TS override: `jest` \| `mocha` \| `vitest` |
429+
| `--coverage` / `--no-coverage` | `DEVOPS_OS_UNITTEST_COVERAGE` | `true` | Include or exclude coverage config |
430+
| `--output-dir DIR` | `DEVOPS_OS_UNITTEST_OUTPUT_DIR` | `.` | Root output directory |
431+
432+
---
433+
368434
## Common Options for All Generators
369435

370-
| Option | `scaffold gha` | `scaffold gitlab` | `scaffold jenkins` | `scaffold argocd` | `scaffold sre` | `scaffold devcontainer` | Description |
371-
|--------|:-:|:-:|:-:|:-:|:-:|:-:|-------------|
372-
| `--name` ||||||| Name of the workflow/pipeline/app |
373-
| `--type` ||||||| Type of workflow/pipeline |
374-
| `--languages` ||||||| Languages to enable |
375-
| `--kubernetes` ||||||| Include K8s deployment steps |
376-
| `--k8s-method` ||||||| K8s deployment method |
377-
| `--output` ||||||| Output file path |
378-
| `--output-dir` ||||||| Output directory |
379-
| `--custom-values` ||||||| Custom configuration JSON file |
380-
| `--image` ||||||| Container image to use |
436+
| Option | `scaffold gha` | `scaffold gitlab` | `scaffold jenkins` | `scaffold argocd` | `scaffold sre` | `scaffold devcontainer` | `scaffold unittest` | Description |
437+
|--------|:-:|:-:|:-:|:-:|:-:|:-:|:-:|-------------|
438+
| `--name` ||||||| | Name of the workflow/pipeline/app |
439+
| `--type` ||||||| | Type of workflow/pipeline |
440+
| `--languages` ||||||| | Languages to enable |
441+
| `--kubernetes` ||||||| | Include K8s deployment steps |
442+
| `--k8s-method` ||||||| | K8s deployment method |
443+
| `--output` ||||||| | Output file path |
444+
| `--output-dir` ||||||| | Output directory |
445+
| `--custom-values` ||||||| | Custom configuration JSON file |
446+
| `--image` ||||||| | Container image to use |
381447

382448
## Troubleshooting
383449

@@ -389,6 +455,7 @@ python -m cli.devopsos scaffold jenkins --help
389455
python -m cli.devopsos scaffold argocd --help
390456
python -m cli.devopsos scaffold sre --help
391457
python -m cli.devopsos scaffold devcontainer --help
458+
python -m cli.devopsos scaffold unittest --help
392459

393460
# Verify generated output locations
394461
ls -la .github/workflows/ # GitHub Actions

hugo-docs/content/docs/getting-started/_index.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ DevOps-OS is a toolkit that generates production-ready CI/CD pipelines, Kubernet
2020
| GitOps / Deploy | ArgoCD, Flux CD, kubectl, Kustomize |
2121
| Containers | Docker, Helm |
2222
| SRE / Observability | Prometheus alert rules, Grafana dashboards, SLO configs |
23+
| Unit Testing | pytest, Jest, Vitest, Mocha, Go test |
2324
| AI Integration | Claude (MCP Server), OpenAI (function calling) |
2425

2526
---
@@ -141,7 +142,27 @@ python -m cli.devopsos scaffold sre --name my-app --team platform
141142

142143
---
143144

144-
## 6 — Interactive wizard (all-in-one)
145+
## 6 — Generate unit test configs
146+
147+
```bash
148+
# Python — generates pytest.ini, conftest.py, and a sample test file
149+
python -m cli.devopsos scaffold unittest --name my-app --languages python
150+
151+
# JavaScript with Jest
152+
python -m cli.devopsos scaffold unittest --name my-app --languages javascript --framework jest
153+
154+
# TypeScript with Vitest
155+
python -m cli.devopsos scaffold unittest --name my-app --languages typescript --framework vitest
156+
157+
# Multi-stack (Python + JavaScript + Go) in one command
158+
python -m cli.devopsos scaffold unittest --name my-platform --languages python,javascript,go
159+
```
160+
161+
See [CLI Reference]({{< relref "/docs/reference" >}}) for all options and output file paths.
162+
163+
---
164+
165+
## 7 — Interactive wizard (all-in-one)
145166

146167
```bash
147168
python -m cli.devopsos init # interactive project configurator
@@ -150,11 +171,13 @@ python -m cli.devopsos scaffold gitlab # scaffold GitLab CI
150171
python -m cli.devopsos scaffold jenkins # scaffold Jenkins
151172
python -m cli.devopsos scaffold argocd # scaffold ArgoCD / Flux
152173
python -m cli.devopsos scaffold sre # scaffold SRE configs
174+
python -m cli.devopsos scaffold cicd # scaffold GHA + Jenkins in one step
175+
python -m cli.devopsos scaffold unittest # scaffold unit test configs
153176
```
154177

155178
---
156179

157-
## 7 — Use with an AI assistant
180+
## 8 — Use with an AI assistant
158181

159182
```bash
160183
pip install -r mcp_server/requirements.txt

hugo-docs/content/docs/reference/_index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Complete reference for every DevOps-OS CLI command: options, default values, env
2121
| Flux CD | `python -m cli.devopsos scaffold argocd --method flux` | `flux/` directory |
2222
| SRE configs | `python -m cli.devopsos scaffold sre` | `sre/` directory |
2323
| Dev Container | `python -m cli.devopsos scaffold devcontainer` | `.devcontainer/` directory |
24+
| Combined CI/CD | `python -m cli.devopsos scaffold cicd` | `.github/workflows/` + `Jenkinsfile` |
25+
| Unit Tests | `python -m cli.devopsos scaffold unittest` | varies by language (see below) |
2426
| Interactive wizard | `python -m cli.devopsos init` | varies |
2527
| Process-First guide | `python -m cli.devopsos process-first` | stdout (educational content) |
2628

@@ -172,6 +174,28 @@ python -m cli.devopsos scaffold devcontainer [options]
172174

173175
---
174176

177+
## scaffold unittest — Unit Test Scaffold
178+
179+
```bash
180+
python -m cli.devopsos scaffold unittest [options]
181+
```
182+
183+
| Option | Env var | Default | Description |
184+
|--------|---------|---------|-------------|
185+
| `--name NAME` | `DEVOPS_OS_UNITTEST_NAME` | `my-app` | Project name |
186+
| `--languages LANGS` | `DEVOPS_OS_UNITTEST_LANGUAGES` | `python` | Comma-separated: `python`, `javascript`, `typescript`, `go` |
187+
| `--framework FW` | `DEVOPS_OS_UNITTEST_FRAMEWORK` | _(auto)_ | JS/TS framework: `jest` \| `mocha` \| `vitest` |
188+
| `--coverage` / `--no-coverage` | `DEVOPS_OS_UNITTEST_COVERAGE` | `true` | Include or exclude coverage config |
189+
| `--output-dir DIR` | `DEVOPS_OS_UNITTEST_OUTPUT_DIR` | `.` | Root output directory |
190+
191+
**Output (Python):** `pytest.ini`, `conftest.py`, `tests/__init__.py`, `tests/test_sample.py`
192+
**Output (JS/TS Jest):** `jest.config.js`, `tests/sample.test.{js,ts}`
193+
**Output (JS/TS Vitest):** `vitest.config.js`, `tests/sample.test.{js,ts}`
194+
**Output (JS/TS Mocha):** `.mocharc.js`, `tests/sample.test.{js,ts}`
195+
**Output (Go):** `<name>_test.go`, `Makefile.test`
196+
197+
---
198+
175199
## devopsos — Unified CLI
176200

177201
```bash
@@ -193,6 +217,8 @@ python -m cli.devopsos scaffold jenkins # Jenkins
193217
python -m cli.devopsos scaffold argocd # ArgoCD / Flux
194218
python -m cli.devopsos scaffold sre # SRE configs
195219
python -m cli.devopsos scaffold devcontainer # Dev container
220+
python -m cli.devopsos scaffold cicd # Combined GHA + Jenkins
221+
python -m cli.devopsos scaffold unittest # Unit test configs
196222
```
197223

198224
### process-first command

0 commit comments

Comments
 (0)