-
Notifications
You must be signed in to change notification settings - Fork 482
Mistobaan/add docwebsite #274
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
Open
Mistobaan
wants to merge
1
commit into
CarperAI:main
Choose a base branch
from
Mistobaan:Mistobaan/add-docwebsite
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,54 @@ | ||
| name: docs_pages_workflow | ||
|
|
||
| on: [pull_request] | ||
|
|
||
| permissions: | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| build_docs_job: | ||
| permissions: write-all | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: 3.8 | ||
|
|
||
| - name: Get pip cache dir | ||
| id: pip-cache | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| echo "dir={$(pip cache dir)}" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: pip cache | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ steps.pip-cache.outputs.dir }} | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/docs/requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
|
|
||
| - name: Install docs requirements | ||
| run: | | ||
| python -m pip install -r docs/requirements.txt | ||
|
|
||
| - name: make the sphinx docs | ||
| run: | | ||
| make -C docs clean | ||
| make -C docs html | ||
|
|
||
| - uses: readthedocs/actions/preview@v1 | ||
| with: | ||
| project-slug: "trlx" | ||
| project-language: "en" | ||
| # see: https://github.com/readthedocs/actions/tree/main/preview | ||
| # message-template (optional): Text message to be injected by the action in the Pull Request description. It supports the following placeholders to be replaced: | ||
| # {docs-pr-index-url}: URL to the root of the documentation for the Pull Request preview. | ||
| # platform (optional): Read the Docs Community (community) or Read the Docs for Business (business). (default: community) | ||
| # single-version (optional): Set this to 'true' if your project is single version, so we can link to the correct URL. (default: 'false') |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,9 +1,25 @@ | ||
| # .readthedocs.yml | ||
| # Read the Docs configuration file | ||
| # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
|
||
| # Required | ||
| version: 2 | ||
|
|
||
| build: | ||
| os: "ubuntu-20.04" | ||
| tools: | ||
| python: "3.8" | ||
|
|
||
| # Build documentation in the docs/ directory with Sphinx | ||
| sphinx: | ||
| configuration: docs/source/conf.py | ||
| configuration: docs/conf.py | ||
| fail_on_warning: false | ||
|
|
||
| # Optionally build your docs in additional formats such as PDF and ePub | ||
| formats: | ||
| - htmlzip | ||
|
|
||
| # Optionally set the version of Python and requirements required to build your docs | ||
| python: | ||
| version: 3.9 | ||
| install: | ||
| - requirements: docs/requirements.txt | ||
| - requirements: docs/requirements.txt |
This file contains hidden or 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,11 @@ | ||
| gendoc: | ||
| docker build -t trlxgendocs -f docker/docs/Dockerfile . | ||
| run: | ||
| docker run --rm -it \ | ||
| -p 8000:8000 \ | ||
| --entrypoint python trlxgendocs -m http.server 8000 --directory build/docs/build/html | ||
|
|
||
| sh: | ||
| docker run --rm -it \ | ||
| -p 8000:8000 \ | ||
| --entrypoint /bin/bash trlxgendocs |
This file contains hidden or 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,2 @@ | ||
| rouge | ||
| sart | ||
This file contains hidden or 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,18 @@ | ||
| FROM python:3.8-slim | ||
|
|
||
| # pip install -r docs/requirements.txt | ||
| # sphinx-build -b html docs docs/build/html -j auto | ||
| # sphinx-build -b html -D nb_execution_mode=off docs docs/build/html -j auto | ||
|
|
||
| RUN python -m pip install --upgrade --no-cache-dir pip | ||
| ADD docs/requirements.txt /tmp/requirements.txt | ||
| RUN python -m pip install --exists-action=w --no-cache-dir -r /tmp/requirements.txt | ||
| RUN apt-get update && apt-get install make imagemagick -y --no-install-recommends \ | ||
| git \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| RUN mkdir /build | ||
| WORKDIR /build/ | ||
| ADD . . | ||
| RUN python -m pip install -e . | ||
| RUN cd docs && make html | ||
| ENTRYPOINT [ "python", "-m", "http.server", "8000" ] |
This file contains hidden or 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 hidden or 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,5 @@ | ||
| # How To build the documentation | ||
Mistobaan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ```bash | ||
| make html | ||
| ``` | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains hidden or 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,23 @@ | ||
| :root { | ||
| --block-bg-opacity: 0.5; | ||
| } | ||
|
|
||
| .wy-side-nav-search { | ||
| background-color: #fff; | ||
| } | ||
|
|
||
| .getting-started { | ||
| background-color: rgba(78, 150, 253, var(--block-bg-opacity)); | ||
| } | ||
|
|
||
| .user-guides { | ||
| background-color: rgba(0, 169, 154, var(--block-bg-opacity)); | ||
| } | ||
|
|
||
| .developer-docs { | ||
| background-color: rgba(171, 0, 182, var(--block-bg-opacity)); | ||
| } | ||
|
|
||
| .key-ideas { | ||
| border: 0px; | ||
| } |
This file contains hidden or 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,2 @@ | ||
| {% extends "!layout.html" %} | ||
| {% set css_files = css_files + ["_static/style.css"] %} |
This file contains hidden or 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 @@ | ||
| #!/bin/bash | ||
|
|
||
| `which sphinx-build` -T -E -b html -d _build/doctrees-readthedocs -D language=en . _build/html |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.