Skip to content

Commit

Permalink
Docs: Add user-friendly contribution page instead of linking to repo …
Browse files Browse the repository at this point in the history
…file (#2)

* devops: Add basic build check CI action

* fix: Missing imports

* docs: Add "how to contribute" page

* docs: cosmetic changes to contributing

---------

Co-authored-by: Mathieu Bélanger <[email protected]>
  • Loading branch information
cvauclair and mateobelanger authored Jan 16, 2025
1 parent 1de91e4 commit 3344b9f
Show file tree
Hide file tree
Showing 13 changed files with 138 additions and 15 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Check

on:
pull_request:
branches:
- "**"
workflow_call:

# ensure that the workflow is only triggered once per PR, subsequent pushes to the PR will cancel
# and restart the workflow. See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build-check:
name: stable / build-check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build check
run: pnpm build
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"sharp": "^0.33.5"
},
"devDependencies": {
"@types/mdx": "^2.0.13",
"@types/node": "18.11.10",
"tailwindcss": "^3.4.15",
"typescript": "^4.9.5"
Expand Down
6 changes: 3 additions & 3 deletions pages/_meta.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Home, BookText, PocketKnife, CookingPot } from 'lucide-react'
import { Home, BookText, PocketKnife, CookingPot, SquareArrowOutUpRight, ExternalLink } from 'lucide-react'

const iconStyle = {
width: '1rem',
Expand Down Expand Up @@ -26,13 +26,13 @@ const meta = {
"type": "page"
},
"apiReference": {
"title": "API Reference ↗",
"title": <>API Reference <ExternalLink style={iconStyle} /></>,
"type": "page",
"href": "https://docs.rs/rig-core",
"newWindow": true
},
"contact": {
"title": "Contact ↗",
"title": <>Contact <ExternalLink style={iconStyle} /></>,
"type": "page",
"href": "https://playgrounds.network",
"newWindow": true
Expand Down
3 changes: 0 additions & 3 deletions pages/about.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion pages/docs/1_why_rig.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: ❓Why Rig?
title: Why Rig?
description: This section contains the compelling reasons to use Rig for your next LLM project.
---

Expand Down
65 changes: 65 additions & 0 deletions pages/docs/7_how-to-contribute.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: How to Contribute?
description: This section contains the different areas where your help is most needed.
---

import { Callout } from 'nextra/components'
import { Hammer, Lightbulb, Book, MessageCircleQuestion } from 'lucide-react'


export const section_icon = { display: 'inline', size: '1rem', marginBottom: '0.25rem' }

<div className="section-title">How to Contribute?</div>

Rig is an open-source project and we welcome contributions from the community.
Whether you're a developer, designer, or writer, there are many ways to contribute to the project.
The section below outlines the different areas where your help is most needed.

<Callout type="info" emoji="👋">
**Prior to starting the work on a new feature or change**, make sure to search for existing issues and pull requests on the [GitHub repository](https://github.com/0xPlaygrounds/rig/issues) to discuss your ideas or changes. Open an issue if there is none.
</Callout>

## <><Hammer style={section_icon}/> Development </>
### Model Provider Integrations
Rig aims to support a wide range of language models from different providers.
If your favorite model provide is not supported, consider adding support for it in Rig and making a pull request for it!

Important information about model provider integrations:
- Each **model provider integration** is contained in its own module under [`rig-core/src/providers`](https://github.com/0xPlaygrounds/rig/tree/main/rig-core/src/providers).
- If the provider has an OpenAI compatible API, there is no need to write a new provider module since Rig already supports OpenAI.
Instead, you can simply add documentation indicating how you can use the existing [`openai`](https://github.com/0xPlaygrounds/rig/blob/main/rig-core/src/providers/openai.rs) integration to use the new provider.
- Make sure to follow the repository's [contribution guidelines](https://github.com/0xPlaygrounds/rig/blob/main/CONTRIBUTING.md).

<Callout type="warning" emoji="⚠️">
Model provider integrations should not require new dependencies that are not already included in the project.
</Callout>

### Vector Store Integrations
Rig aims to support a wide range of vector stores for storing and retrieving embeddings.
If your favorite vector store is not supported, consider adding support for it in Rig and making a pull request for it!

Important information about vector store integrations:
- Each vector store integration is contained in its own crate located in the root of the repository.
The naming convention for vector store crates is `rig-<store_name>` (e.g. [`rig-mongodb`](https://github.com/0xPlaygrounds/rig/tree/main/rig-mongodb)).
This is because vector store integrations often require many additional dependencies that are not needed otherwise.
- Consider adding an integration test for the integration! You can base yourself off of the existing vector store integration tests like this one for [Qdrant](https://github.com/0xPlaygrounds/rig/blob/main/rig-qdrant/tests/integration_tests.rs).
- Make sure to follow the repository's [contribution guidelines](https://github.com/0xPlaygrounds/rig/blob/main/CONTRIBUTING.md).

### Bug Fixes
If you find a bug in Rig, please open an issue for it on the [repository](https://github.com/0xPlaygrounds/rig/issues) and consider making a pull request to fix it.

Make sure to follow the repository's [contribution guidelines](https://github.com/0xPlaygrounds/rig/blob/main/CONTRIBUTING.md).

## <><Book style={section_icon}/> Documentation </>
### Guides and Tutorials
If you have experience with Rig and would like to share your knowledge with others, consider writing a guide or tutorial for the project!

If you would like your tutorial to be featured on this website, please open a pull request on the [docs repository](https://github.com/0xPlaygrounds/rig-docs).

### Other Documentation Improvements
If you find a typo or mistake in the documentation, or any section that could use improvement, please open an issue to report it or a pull request to fix it on the [docs repository](https://github.com/0xPlaygrounds/rig-docs).

## <><Lightbulb style={section_icon}/> Ideas and Feedback </>
If you have an idea for a new Rig feature or feedback on existing features, please let us know by opening an issue on the [GitHub repository](https://github.com/0xPlaygrounds/rig/issues)!

Make sure to checkout the existing issues first to make sure your idea is not already planned or in progress 😉.
5 changes: 3 additions & 2 deletions pages/docs/_meta.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Blocks, Lightbulb, CircleHelp, DraftingCompass, Landmark, Puzzle, Rocket, Unplug, MessageCircleQuestion } from "lucide-react";
import { Blocks, Lightbulb, CircleHelp, DraftingCompass, Landmark, Puzzle, Rocket, Unplug, MessageCircleQuestion, HeartHandshake } from "lucide-react";

const iconStyle = {
width: '1rem',
Expand All @@ -13,7 +13,8 @@ const meta = {
"3_architecture": {title: <><Landmark style={iconStyle} /> &nbsp; Architecture</>},
"4_concepts": {title: <><Puzzle style={iconStyle} /> &nbsp; Concepts</>},
"5_integrations": {title: <><Unplug style={iconStyle} /> &nbsp; Integrations</>},
"6_extensions": {title: <><Blocks style={iconStyle} /> &nbsp; Extensions</>}
"6_extensions": {title: <><Blocks style={iconStyle} /> &nbsp; Extensions</>},
"7_how-to-contribute": {title: <><HeartHandshake style={iconStyle} /> &nbsp; Contribute to Rig</>}
}

export default meta;
12 changes: 11 additions & 1 deletion pages/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Overview
description: This section contains the high-level documentation for Rig.
---

import { CircleHelp, Landmark, Plug } from 'lucide-react'
import { Blocks, CircleHelp, Landmark, Plug, HeartHandshake } from 'lucide-react'
import { Cards } from 'nextra/components'

# Docs
Expand Down Expand Up @@ -56,5 +56,15 @@ This section contains the high-level documentation for Rig.
</div>
}
/>
<Cards.Card
title="How to Contribute?"
icon={<HeartHandshake />}
href="/docs/7_how-to-contribute"
children={ <div style={{ fontSize: '0.9em', color: '#666', whiteSpace: 'normal', wordWrap: 'break-word' }}>
How to contribute to Rig.
</div>
}
/>
</Cards>


4 changes: 3 additions & 1 deletion pages/examples/0_model_providers/anthropic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ title: Anthropic (Claude)
description: This section describes the Anthropic API (Claude) integration.
---

# Anthropic API (Claude) Integration
# Anthropic API (Claude) Integration

Coming soon™️...
6 changes: 5 additions & 1 deletion pages/examples/0_model_providers/openai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ title: OpenAI
description: This section describes the OpenAI API integration.
---

# OpenAI API Integration
# OpenAI API Integration

Coming soon™️...


1 change: 1 addition & 0 deletions pages/examples/_meta.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default {
"index": "Get Started",
"0_model_providers": "Model Providers",
"1_rag": "RAG",
"2_basics": "Basic",
"3_advanced": "Advanced"
Expand Down
6 changes: 3 additions & 3 deletions pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Cards } from 'nextra/components'
import { WalletCards, Rocket } from 'lucide-react'
import { Blocks, WalletCards, Rocket, BrainCircuit, Lightbulb } from 'lucide-react'

# Get Started with `cargo add rig-core{:bash}`
Rig is a Rust library for building portable, modular, and lightweight Fullstack AI Agents. You can find API documentation on [docs.rs](https://docs.rs/rig-core).
Expand Down Expand Up @@ -59,8 +59,8 @@ Note: Rig does not support WASM (yet), but we're working on it!
}
/>
<Cards.Card
title="🤝 Contributing"
href="https://github.com/0xPlaygrounds/rig/blob/main/CONTRIBUTING.md"
title="🤝 How to Contribute?"
href="/docs/7_how-to-contribute"
children={ <div style={{ fontSize: '0.9em', color: '#666', whiteSpace: 'normal', wordWrap: 'break-word' }}>
Learn how to contribute to the Rig project.
</div>
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3344b9f

Please sign in to comment.