-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
162 changed files
with
9,030 additions
and
1,129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- "main" | ||
- "develop" | ||
pull_request: | ||
|
||
concurrency: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Clean up PR documentation | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
concurrency: distilabel-docs | ||
|
||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout merged branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.base.ref }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: pip install -e .[docs] | ||
|
||
- name: Set git credentials | ||
run: | | ||
git config --global user.name "${{ github.actor }}" | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
- name: Remove PR documentation | ||
run: | | ||
PR_NUMBER=${{ github.event.pull_request.number }} | ||
mike delete pr-$PR_NUMBER --push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Publish PR documentation | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
concurrency: distilabel-docs | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout docs-site | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# Looks like it's not working very well for other people: | ||
# https://github.com/actions/setup-python/issues/436 | ||
# cache: "pip" | ||
# cache-dependency-path: pyproject.toml | ||
|
||
- uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-docs-pr-v00 | ||
|
||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: pip install -e .[docs] | ||
|
||
- name: Set git credentials | ||
run: | | ||
git config --global user.name "${{ github.actor }}" | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
- name: Deploy hidden docs for PR | ||
run: | | ||
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') | ||
mike deploy pr-$PR_NUMBER --prop-set hidden=true --push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Comment PR with docs link | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const pr_number = context.payload.pull_request.number; | ||
const owner = context.repo.owner; | ||
const repo = context.repo.repo; | ||
// Check if a comment already exists | ||
const comments = await github.rest.issues.listComments({ | ||
issue_number: pr_number, | ||
owner: owner, | ||
repo: repo | ||
}); | ||
const botComment = comments.data.find(comment => | ||
comment.user.type === 'Bot' && | ||
comment.body.includes('Documentation for this PR has been built') | ||
); | ||
if (!botComment) { | ||
// Post new comment only if it doesn't exist | ||
await github.rest.issues.createComment({ | ||
issue_number: pr_number, | ||
owner: owner, | ||
repo: repo, | ||
body: `Documentation for this PR has been built. You can view it at: https://distilabel.argilla.io/pr-${pr_number}/` | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: distilabel.mixins.requirements.RequirementsMixin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: distilabel.mixins.runtime_parameters.RuntimeParametersMixin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# StepResources | ||
|
||
::: distilabel.steps.base.StepResources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.