diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 6543c57..136b42f 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -6,10 +6,15 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - name: Build HTML - uses: ammaraskar/sphinx-action@master + - name: Setup Rye + uses: eifinger/setup-rye@v4 with: - docs-folder: "docs/" + enable-cache: true + working-directory: 'docs/' + - name: Sync dependencies + run: rye sync + - name: Build HTML + run: make -C docs SPHINXBUILD="rye run sphinx-build" html - name: Upload artifacts uses: actions/upload-artifact@v4 with: diff --git a/.gitignore b/.gitignore index 148f5d9..f39bfe9 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ lib/lunarml/ml/mlyacc-lib/ lib/lunarml/ml/smlnj-lib/ package/npm/lunarml.mjs package/npm/lib/ +docs/_build/ *.bak diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..ae8554d --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,10 @@ +# python generated files +__pycache__/ +*.py[oc] +build/ +dist/ +wheels/ +*.egg-info + +# venv +.venv diff --git a/docs/.python-version b/docs/.python-version new file mode 100644 index 0000000..455808f --- /dev/null +++ b/docs/.python-version @@ -0,0 +1 @@ +3.12.4 diff --git a/docs/pyproject.toml b/docs/pyproject.toml new file mode 100644 index 0000000..61953b7 --- /dev/null +++ b/docs/pyproject.toml @@ -0,0 +1,17 @@ +[project] +name = "lunarml-docs" +version = "0.1.0" +description = "The documentation of LunarML" +authors = [ + { name = "ARATA Mizuki", email = "minorinoki@gmail.com" } +] +dependencies = [ + "sphinx-rtd-theme>=2.0.0", + "sphinx==7.*", +] +requires-python = ">= 3.8" + +[tool.rye] +managed = true +virtual = true +dev-dependencies = [] diff --git a/docs/requirements-dev.lock b/docs/requirements-dev.lock new file mode 100644 index 0000000..e007490 --- /dev/null +++ b/docs/requirements-dev.lock @@ -0,0 +1,58 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false +# universal: false + +alabaster==0.7.16 + # via sphinx +babel==2.15.0 + # via sphinx +certifi==2024.7.4 + # via requests +charset-normalizer==3.3.2 + # via requests +docutils==0.20.1 + # via sphinx + # via sphinx-rtd-theme +idna==3.7 + # via requests +imagesize==1.4.1 + # via sphinx +jinja2==3.1.4 + # via sphinx +markupsafe==2.1.5 + # via jinja2 +packaging==24.1 + # via sphinx +pygments==2.18.0 + # via sphinx +requests==2.32.3 + # via sphinx +snowballstemmer==2.2.0 + # via sphinx +sphinx==7.4.7 + # via sphinx-rtd-theme + # via sphinxcontrib-jquery +sphinx-rtd-theme==2.0.0 +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx +sphinxcontrib-jquery==4.1 + # via sphinx-rtd-theme +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx +urllib3==2.2.2 + # via requests diff --git a/docs/requirements.lock b/docs/requirements.lock new file mode 100644 index 0000000..e007490 --- /dev/null +++ b/docs/requirements.lock @@ -0,0 +1,58 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false +# universal: false + +alabaster==0.7.16 + # via sphinx +babel==2.15.0 + # via sphinx +certifi==2024.7.4 + # via requests +charset-normalizer==3.3.2 + # via requests +docutils==0.20.1 + # via sphinx + # via sphinx-rtd-theme +idna==3.7 + # via requests +imagesize==1.4.1 + # via sphinx +jinja2==3.1.4 + # via sphinx +markupsafe==2.1.5 + # via jinja2 +packaging==24.1 + # via sphinx +pygments==2.18.0 + # via sphinx +requests==2.32.3 + # via sphinx +snowballstemmer==2.2.0 + # via sphinx +sphinx==7.4.7 + # via sphinx-rtd-theme + # via sphinxcontrib-jquery +sphinx-rtd-theme==2.0.0 +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx +sphinxcontrib-jquery==4.1 + # via sphinx-rtd-theme +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx +urllib3==2.2.2 + # via requests diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index cfd34e7..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,23 +0,0 @@ -alabaster==0.7.16 -Babel==2.14.0 -certifi==2024.2.2 -charset-normalizer==3.3.2 -docutils==0.20.1 -idna==3.6 -imagesize==1.4.1 -Jinja2==3.1.3 -MarkupSafe==2.1.5 -packaging==23.2 -Pygments==2.17.2 -requests==2.31.0 -snowballstemmer==2.2.0 -Sphinx==7.2.6 -sphinx-rtd-theme==2.0.0 -sphinxcontrib-applehelp==1.0.8 -sphinxcontrib-devhelp==1.0.6 -sphinxcontrib-htmlhelp==2.0.5 -sphinxcontrib-jquery==4.1 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.7 -sphinxcontrib-serializinghtml==1.1.10 -urllib3==2.2.1