Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate HTML documentation from usage #204

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}

dependencies {
classpath "org.asciidoctor:asciidoctor-gradle-jvm:3.3.2"
}
}

plugins {
id 'java'
id 'application'
Expand Down Expand Up @@ -121,3 +135,28 @@ configurations.all {
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}

project.ext {
mainClassName = "io.seqera.tower.cli.Tower"
}

task generateManpageAsciiDoc(type: JavaExec) {
dependsOn(classes)
group = "Documentation"
description = "Generate AsciiDoc manpage"
classpath(configurations.compileClasspath, configurations.annotationProcessor, sourceSets.main.runtimeClasspath)
main 'picocli.codegen.docgen.manpage.ManPageGenerator'
args project.ext.mainClassName, "--outdir=${project.buildDir}/generated-picocli-docs", "-v"
}

apply plugin: 'org.asciidoctor.jvm.convert'
asciidoctor {
dependsOn(generateManpageAsciiDoc)
sourceDir = file("${project.buildDir}/generated-picocli-docs")
outputDir = file("${project.buildDir}/generated-picocli-docs-xml")
logDocuments = true
outputOptions {
backends = ['docbook']
}
}

10 changes: 10 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SHELL := /bin/bash

DOCKER ?= squidfunk/mkdocs-material:7.1.2

build:
./build.sh
docker run --rm -it -p 8000:8000 -u $(shell id -u) -v ${PWD}/../build:/docs $(DOCKER) build

serve:
docker run --rm -it -p 8000:8000 -u $(shell id -u) -v ${PWD}/../build:/docs $(DOCKER)
11 changes: 11 additions & 0 deletions docs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

cd ..
./gradlew asciidoctor
mkdir -p build/docs
cd build/generated-picocli-docs-xml
ls *.xml | awk '{system("pandoc -f docbook -t markdown_strict "$1" -o ../docs/"$1".md")}'
cd ../docs
ls *.md | awk '{system("sed -i 's/\.xml/\.xml\.md/g' "$1)}'
cd ..
cp -r ../docs/* .
127 changes: 127 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
site_name: 'Tower CLI command line reference'
site_author: Seqera Labs
repo_name: tower-cli
repo_url: https://github.com/seqeralabs/tower-cli

site_dir: public

plugins:
- search

theme:
language: en
name: material
custom_dir: overrides
palette:
scheme: default
primary: white
favicon: _favicons/favicon.ico
logo: _logos/nf-tower-icon-black.svg
features:
- navigation.instant
- navigation.tracking
- navigation.top
- search.suggest
- search.highlight
- search.share
font: false
icon:
admonition:
note: fontawesome/solid/sticky-note
abstract: fontawesome/solid/book
info: fontawesome/solid/info-circle
tip: fontawesome/solid/bullhorn
success: fontawesome/solid/check
question: fontawesome/solid/question-circle
warning: fontawesome/solid/exclamation-triangle
failure: fontawesome/solid/bomb
danger: fontawesome/solid/skull
bug: fontawesome/solid/robot
example: fontawesome/solid/flask
quote: fontawesome/solid/quote-left

extra_css:
- stylesheets/fonts.css
- stylesheets/overrides.css
- stylesheets/extra.css # 2022-04-01 Added by Graham to get more space above bullets.


extra:
homepage: /
version:
provider: mike

markdown_extensions:
- toc:
permalink: "#"
- attr_list
- admonition
- pymdownx.superfences
- pymdownx.highlight:
linenums: true
- pymdownx.snippets
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg

nav:
- 'Home': 'tw.xml.md'
- 'Actions':
- 'Add':
- 'Github': 'tw-actions-add-github.xml.md'
- 'Tower': 'tw-actions-add-tower.xml.md'
- 'Core Concepts': 'core-concepts/definitions.md'
- 'Users & Workspaces':
- 'Overview': 'orgs-and-teams/overview.md'
- 'Organizations': 'orgs-and-teams/organizations.md'
- 'Workspace Management': 'orgs-and-teams/workspace-management.md'
- 'Shared Workspaces' : 'orgs-and-teams/shared-workspaces.md'
- 'Launching Pipelines':
- 'Launchpad': 'launch/launchpad.md'
- 'Launch Form': 'launch/launch.md'
- 'Advanced Options': 'launch/advanced.md'
- 'Relaunch': 'launch/relaunch.md'
- 'Notifications': 'launch/notifications.md'
- 'Monitoring Pipelines':
- 'Overview': 'monitoring/overview.md'
- 'Execution details & logs': 'monitoring/execution.md'
- 'Summary & status': 'monitoring/summary.md'
- 'Processes': 'monitoring/processes.md'
- 'Aggregate stats & load': 'monitoring/aggregate_stats.md'
- 'Tasks & metrics': 'monitoring/tasks.md'
# - 'Sharing pipelines': 'monitoring/sharing.md'
- 'Compute Environments':
- 'Overview': 'compute-envs/overview.md'
- 'AWS Batch': 'compute-envs/aws-batch.md'
- 'Azure Batch': 'compute-envs/azure-batch.md'
- 'Google Cloud Life Sciences': 'compute-envs/google-cloud.md'
- 'Altair Grid Engine': 'compute-envs/altair-grid-engine.md'
- 'Altair PBS Pro': 'compute-envs/altair-pbs-pro.md'
- 'IBM LSF': 'compute-envs/lsf.md'
- 'Slurm': 'compute-envs/slurm.md'
- 'Kubernetes': 'compute-envs/k8s.md'
- 'Amazon EKS': 'compute-envs/eks.md'
- 'Google GKE': 'compute-envs/gke.md'
- 'Credentials':
- 'Overview': 'credentials/overview.md'
- 'Datasets': 'datasets/overview.md'
- 'Pipeline Secrets': 'secrets/overview.md'
- 'Pipeline Reports': 'reports/overview.md'
- 'Git Integration':
- 'Overview': 'git/overview.md'
- 'Private Git repositories': 'git/private_repositories.md'
- 'Public Git repositories': 'git/public_repositories.md'
- 'Automation':
- 'Pipeline Actions': 'pipeline-actions/pipeline-actions.md'
- 'Pipeline Schema': 'pipeline-schema/overview.md'
- 'Installation':
- 'System deployment': 'installation/system-deployment.md'
- 'CLI': 'cli.md'
- 'API':
- 'Overview': 'api/overview.md'
- 'Endpoints': 'api/endpoints.md'
- 'OpenAPI schema': 'api/openapi.md'
#- 'Functionality Matrix': 'functionality_matrix.md'
- 'Frequently asked questions' : faqs.md

copyright: Copyright © 2019 - 2022 Seqera Labs, S.L.
Binary file not shown.
Loading