forked from isaac-sim/IsaacLab
-
Notifications
You must be signed in to change notification settings - Fork 1
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
702 changed files
with
344,252 additions
and
35 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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Sync and Translate Documentation | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # 每天 UTC 时间午夜运行一次 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync-and-translate: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout user's repo (main branch) | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: fan-ziqi/IsaacLab | ||
ref: main | ||
|
||
- name: Configure Git user | ||
run: | | ||
git config --global user.name 'github-actions' | ||
git config --global user.email '[email protected]' | ||
- name: Add upstream repository | ||
run: git remote add upstream https://github.com/isaac-sim/IsaacLab.git | ||
|
||
- name: Merge upstream changes while keeping local changes | ||
run: | | ||
git fetch upstream | ||
git checkout main | ||
git merge upstream/main -X ours --allow-unrelated-histories | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools polib==1.2.0 openai==v1.3.6 python-dotenv==1.0.0 pytest==8.2.2 sphinx-intl sphinx-book-theme==1.0.1 myst-parser sphinxcontrib-bibtex==2.5.0 autodocsumm sphinx-copybutton sphinx-icon sphinx_design sphinxemoji numpy matplotlib warp-lang gymnasium | ||
- name: Generate gettext | ||
run: | | ||
pushd docs | ||
make gettext | ||
popd | ||
- name: Update translations | ||
run: | | ||
pushd docs | ||
sphinx-intl update -p _build/gettext -l zh_CN | ||
popd | ||
- name: Translate using custom script | ||
run: | | ||
pushd docs | ||
python po_translator.py --folder ./locale --lang zh_CN --folder-language --bulk | ||
popd | ||
- name: Build HTML with translations | ||
run: make -e SPHINXOPTS="-D language='zh_CN'" -C docs html | ||
|
||
- name: Copy generated HTML files to user repo | ||
run: | | ||
mkdir -p temp_html | ||
cp -r docs/_build/html/* temp_html/ | ||
- name: Commit and push gettext and po files to main branch | ||
run: | | ||
git add -f docs/_build/gettext/* | ||
git add -f docs/_build/html/* | ||
git add -f docs/locale/zh_CN/LC_MESSAGES/**/*.po | ||
git commit -m "Update gettext and po files" | ||
git push origin main | ||
- name: Commit and push changes to gh-pages-zhcn branch | ||
run: | | ||
git checkout --orphan gh-pages-zhcn | ||
git rm -rf . | ||
cp -r temp_html/* . | ||
rm -rf temp_html | ||
rm -rf docs | ||
git add . | ||
git commit -m "Update translated documentation" | ||
git push origin gh-pages-zhcn --force |
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
# in the case you need to load specific modules on the cluster, add them here | ||
# e.g., `module load eth_proxy` | ||
|
||
# create job script with compute demands | ||
### MODIFY HERE FOR YOUR JOB ### | ||
cat <<EOT > job.sh | ||
#!/bin/bash | ||
#PBS -l select=1:ncpus=8:mpiprocs=1:ngpus=1 | ||
#PBS -l walltime=01:00:00 | ||
#PBS -j oe | ||
#PBS -q gpu | ||
#PBS -N isaaclab | ||
#PBS -m bea -M "user@mail" | ||
# Pass the container profile first to run_singularity.sh, then all arguments intended for the executed script | ||
sh "$1/docker/cluster/run_singularity.sh" "$2" "${@:3}" | ||
EOT | ||
|
||
qsub job.sh | ||
rm job.sh |
File renamed without changes.
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
101 changes: 101 additions & 0 deletions
101
docs/_build/gettext/_sphinx_design_static/design-tabs.js
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,101 @@ | ||
// @ts-check | ||
|
||
// Extra JS capability for selected tabs to be synced | ||
// The selection is stored in local storage so that it persists across page loads. | ||
|
||
/** | ||
* @type {Record<string, HTMLElement[]>} | ||
*/ | ||
let sd_id_to_elements = {}; | ||
const storageKeyPrefix = "sphinx-design-tab-id-"; | ||
|
||
/** | ||
* Create a key for a tab element. | ||
* @param {HTMLElement} el - The tab element. | ||
* @returns {[string, string, string] | null} - The key. | ||
* | ||
*/ | ||
function create_key(el) { | ||
let syncId = el.getAttribute("data-sync-id"); | ||
let syncGroup = el.getAttribute("data-sync-group"); | ||
if (!syncId || !syncGroup) return null; | ||
return [syncGroup, syncId, syncGroup + "--" + syncId]; | ||
} | ||
|
||
/** | ||
* Initialize the tab selection. | ||
* | ||
*/ | ||
function ready() { | ||
// Find all tabs with sync data | ||
|
||
/** @type {string[]} */ | ||
let groups = []; | ||
|
||
document.querySelectorAll(".sd-tab-label").forEach((label) => { | ||
if (label instanceof HTMLElement) { | ||
let data = create_key(label); | ||
if (data) { | ||
let [group, id, key] = data; | ||
|
||
// add click event listener | ||
// @ts-ignore | ||
label.onclick = onSDLabelClick; | ||
|
||
// store map of key to elements | ||
if (!sd_id_to_elements[key]) { | ||
sd_id_to_elements[key] = []; | ||
} | ||
sd_id_to_elements[key].push(label); | ||
|
||
if (groups.indexOf(group) === -1) { | ||
groups.push(group); | ||
// Check if a specific tab has been selected via URL parameter | ||
const tabParam = new URLSearchParams(window.location.search).get( | ||
group | ||
); | ||
if (tabParam) { | ||
console.log( | ||
"sphinx-design: Selecting tab id for group '" + | ||
group + | ||
"' from URL parameter: " + | ||
tabParam | ||
); | ||
window.sessionStorage.setItem(storageKeyPrefix + group, tabParam); | ||
} | ||
} | ||
|
||
// Check is a specific tab has been selected previously | ||
let previousId = window.sessionStorage.getItem( | ||
storageKeyPrefix + group | ||
); | ||
if (previousId === id) { | ||
// console.log( | ||
// "sphinx-design: Selecting tab from session storage: " + id | ||
// ); | ||
// @ts-ignore | ||
label.previousElementSibling.checked = true; | ||
} | ||
} | ||
} | ||
}); | ||
} | ||
|
||
/** | ||
* Activate other tabs with the same sync id. | ||
* | ||
* @this {HTMLElement} - The element that was clicked. | ||
*/ | ||
function onSDLabelClick() { | ||
let data = create_key(this); | ||
if (!data) return; | ||
let [group, id, key] = data; | ||
for (const label of sd_id_to_elements[key]) { | ||
if (label === this) continue; | ||
// @ts-ignore | ||
label.previousElementSibling.checked = true; | ||
} | ||
window.sessionStorage.setItem(storageKeyPrefix + group, id); | ||
} | ||
|
||
document.addEventListener("DOMContentLoaded", ready, false); |
1 change: 1 addition & 0 deletions
1
...uild/gettext/_sphinx_design_static/sphinx-design.5ea377869091fd0449014c60fc090103.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
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,6 @@ | ||
img.emoji { | ||
height: 1em; | ||
width: 1em; | ||
margin: 0 .05em 0 .1em; | ||
vertical-align: -0.1em; | ||
} |
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,10 @@ | ||
function addEvent(element, eventName, fn) { | ||
if (element.addEventListener) | ||
element.addEventListener(eventName, fn, false); | ||
else if (element.attachEvent) | ||
element.attachEvent('on' + eventName, fn); | ||
} | ||
|
||
addEvent(window, 'load', function() { | ||
twemoji.parse(document.body, {'folder': 'svg', 'ext': '.svg'}); | ||
}); |
Oops, something went wrong.