Skip to content

Commit

Permalink
feat: initial version of the docs site
Browse files Browse the repository at this point in the history
  • Loading branch information
claymcleod committed Feb 17, 2025
1 parent 675f2f9 commit 475a896
Show file tree
Hide file tree
Showing 8 changed files with 1,767 additions and 2 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Project Docs CI

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "latest"
- run: cd docs && npm install && npm run docs:build
- uses: actions/upload-pages-artifact@v3
with:
name: "Project Documentation"
path: "docs/.vitepress/dist"
deploy:
needs: build
if: success() && github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: "Project Documentation"
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img style="margin: 0px" alt="Repository Header Image" src="./.github/assets/repo-header.png" />
<img style="margin: 0px" alt="Repository Header Image" src="https://stjude-rust-labs.github.io/crankshaft/header.png" />
<hr/>

<div align="center">
Expand Down Expand Up @@ -74,7 +74,7 @@ cargo add crankshaft
```

Once you've added `crankshaft` to your dependencies, you should head over to the
[`examples`](./examples) to see how you can use the library in your projects.
[`examples`] to see how you can use the library in your projects.

## 🖥️ Development

Expand Down Expand Up @@ -125,6 +125,7 @@ crates and command line tools made available by St. Jude Rust Labs.

Copyright © 2024-Present [St. Jude Children's Research Hospital](https://github.com/stjude).

[`examples`]: https://github.com/stjude-rust-labs/crankshaft/tree/main/examples
[license-apache]: https://github.com/stjude-rust-labs/crankshaft/blob/main/LICENSE-APACHE
[license-mit]: https://github.com/stjude-rust-labs/crankshaft/blob/main/LICENSE-MIT
[`sprocket`]: https://github.com/stjude-rust-labs/sprocket
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
.vitepress/cache
.vitepress/dist
24 changes: 24 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { defineConfig } from "vitepress";

export default defineConfig({
title: "Crankshaft",
description: "Documentation related to the Crankshaft project.",
base: "/crankshaft/",
themeConfig: {
nav: [{ text: "Home", link: "/" }],
sidebar: [
{
text: "Overview",
link: "/",
},
{},
],

socialLinks: [
{
icon: "github",
link: "https://github.com/stjude-rust-labs/crankshaft",
},
],
},
});
131 changes: 131 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
<img style="margin: 0px" alt="Repository Header Image" src="https://stjude-rust-labs.github.io/crankshaft/header.png" />
<hr/>

<div align="center">
<p style="display: flex; align-items: center; justify-content: center;">
<a href="https://github.com/stjude-rust-labs/crankshaft/actions/workflows/CI.yml"
target="_blank"
style="margin-inline-start: 2px; margin-inline-end: 2px; text-decoration: none;">
<img alt="CI: Status" src="https://github.com/stjude-rust-labs/crankshaft/actions/workflows/CI.yml/badge.svg" />
</a>
<a href="https://crates.io/crates/crankshaft"
target="_blank"
style="margin-inline-start: 2px; margin-inline-end: 2px; text-decoration: none;">
<img alt="crates.io version" src="https://img.shields.io/crates/v/crankshaft">
</a>
<a href="https://rustseq.zulipchat.com"
target="_blank"
style="margin-inline-start: 2px; margin-inline-end: 2px; text-decoration: none;">
<img alt="CI: Status" src="https://img.shields.io/badge/chat-%23workflows--lib--crankshaft-blue?logo=zulip&logoColor=f6f6f6" />
</a>
<img alt="crates.io downloads"
src="https://img.shields.io/crates/d/crankshaft"
style="margin-inline-start: 2px; margin-inline-end: 2px; text-decoration: none;">
</p>

<p align="center">
A headless task execution framework that supports local, cloud, and HPC.
<br />
<br />
<a href="https://github.com/stjude-rust-labs/crankshaft/issues/new?assignees=&title=Descriptive%20Title&labels=enhancement">Request Feature</a>
·
<a href="https://github.com/stjude-rust-labs/crankshaft/issues/new?assignees=&title=Descriptive%20Title&labels=bug">Report Bug</a>
·
⭐ Consider starring the repo! ⭐
<br />
</p>
</div>

## Overview

`crankshaft` is a headless task execution framework written in Rust: it's being
developed in coordination with the [`sprocket`] project with the goal of enabling
large-scale bioinformatics analyses. There is no associated `crankshaft` command line
tool—the end user is really engine _developers_ who want to include it as a core task
execution library in their own command line tools.

## Guiding Principles

- `crankshaft` aims to be a **high-performance** task execution framework
capable of concurrently managing and executing upwards of 20,000 concurrent
tasks. The core focus is enabling middle- to large-scale bioinformatics
analyses, though it can also be used to design smaller scale execution
engines.
- `crankshaft` is **headless**, which means that it doesn't do anything on its
own; in fact, it _must_ be driven by some external orchestration code. This
allows the `crankshaft` library itself to focus on performance improvements
that can be enjoyed across the entire community.
- `crankshaft` is developed **independently of any particular workflow
language**. Though it's part of the Sprocket project, it's not based on WDL,
and, in theory, multiple frontends based on different workflow
languages can exist (and we hope this is the case)!

## 📚 Getting Started

### Installation

To use `crankshaft`, you'll need to install [Rust](https://www.rust-lang.org/).
We recommend using [rustup](https://rustup.rs/) to accomplish this. Once Rust is
installed, you can create a new project and add the latest version of
`crankshaft` using the following command.

```bash
cargo add crankshaft
```

Once you've added `crankshaft` to your dependencies, you should head over to the
[`examples`] to see how you can use the library in your projects.

## 🖥️ Development

To bootstrap a development environment, please use the following commands.

```bash
# Clone the repository
git clone [email protected]:stjude-rust-labs/crankshaft.git
cd crankshaft

# Build the crate in release mode
cargo build --release
```

## 🚧️ Tests

Before submitting any pull requests, please make sure the code passes the
following checks (from the root directory).

```bash
# Run the project's tests.
cargo test --all-features

# Run the tests for the examples.
cargo test --examples --all-features

# Ensure the project doesn't have any linting warnings.
cargo clippy --all-features

# Ensure the project passes `cargo fmt`.
cargo fmt --check

# Ensure the docs build.
cargo doc
```

## 🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to check
[issues page](https://github.com/stjude-rust-labs/crankshaft/issues).

## 📝 License

This project is licensed as either [Apache 2.0][license-apache] or
[MIT][license-mit] at your discretion. Additionally, please see [the
disclaimer](https://github.com/stjude-rust-labs#disclaimer) that applies to all
crates and command line tools made available by St. Jude Rust Labs.

Copyright © 2024-Present [St. Jude Children's Research Hospital](https://github.com/stjude).

[`examples`]: https://github.com/stjude-rust-labs/crankshaft/tree/main/examples
[license-apache]: https://github.com/stjude-rust-labs/crankshaft/blob/main/LICENSE-APACHE
[license-mit]: https://github.com/stjude-rust-labs/crankshaft/blob/main/LICENSE-MIT
[`sprocket`]: https://github.com/stjude-rust-labs/sprocket
18 changes: 18 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "docs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"vitepress": "^1.6.3"
}
}
Loading

0 comments on commit 475a896

Please sign in to comment.