From 80fddcaf026cbcd8028a0c64e4482f538adbe6ba Mon Sep 17 00:00:00 2001 From: RenChu Wang Date: Fri, 11 Oct 2024 21:33:54 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=90=20Migrated=20to=20jupyter=20book.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This seems to be way better than mkdocs. --- .github/workflows/build.yaml | 23 +++++++++++++++-------- STRATEGY.md | 17 ----------------- docs/CODE_OF_CONDUCT.md | 3 ++- docs/LICENSE.md | 5 ++++- docs/README.md | 1 - docs/_config.yml | 16 ++++++++++++++++ docs/_toc.yml | 5 +++++ docs/index.md | 2 ++ mkdocs.yml | 20 -------------------- pyproject.toml | 3 +++ 10 files changed, 47 insertions(+), 48 deletions(-) delete mode 100644 STRATEGY.md mode change 120000 => 100644 docs/CODE_OF_CONDUCT.md mode change 120000 => 100644 docs/LICENSE.md delete mode 120000 docs/README.md create mode 100644 docs/_config.yml create mode 100644 docs/_toc.yml create mode 100644 docs/index.md delete mode 100644 mkdocs.yml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5924218..ca6eb46 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,18 +14,25 @@ jobs: python-version: "3.10" - name: ⬇️ Python PDM - uses: pdm-project/setup-pdm@v3 + uses: pdm-project/setup-pdm@v4 + with: + python-version: "3.10" + cache: true - name: ⬇️ Python Dependencies - run: pdm install + run: pdm install -G:all - name: 🚂 Activate environment run: echo "$(pdm venv --path in-project)/bin" >> $GITHUB_PATH - - name: 📰 Publish docs - run: | - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' + - name: 🚧 Jupyter build + run: jupyter book build docs - - name: ⬆️ MkDocs deploy - run: mkdocs gh-deploy --force + - name: 📰 Publish docs + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: ./docs/_build/html + git-config-name: "github-actions[bot]" + git-config-email: "github-actions[bot]@users.noreply.github.com" + commit-message: 🎉 Book deployed diff --git a/STRATEGY.md b/STRATEGY.md deleted file mode 100644 index 8196573..0000000 --- a/STRATEGY.md +++ /dev/null @@ -1,17 +0,0 @@ -# Current challenges and strategies - -1. `isinstance(fake, Tensor)` should be true to mimic a pytorch tensor. - - This should be doable. See Python's `unittest.mock`. Strategy: use an `Imposter` meta class. - -2. Calculation could be faster. - - Right now it runs in Python. Nothing is stopping me from using C++. - -3. Modularization wasn't good in v1 branches. - - Well it was a product of putting the MVP up there. So the quality should be improved. - -4. More documentation. - - Previously it's pretty lacking because I didn't have time to put it on. diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md deleted file mode 120000 index 0400d57..0000000 --- a/docs/CODE_OF_CONDUCT.md +++ /dev/null @@ -1 +0,0 @@ -../CODE_OF_CONDUCT.md \ No newline at end of file diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..1c46998 --- /dev/null +++ b/docs/CODE_OF_CONDUCT.md @@ -0,0 +1,2 @@ +```{include} ../CODE_OF_CONDUCT.md +``` diff --git a/docs/LICENSE.md b/docs/LICENSE.md deleted file mode 120000 index 7eabdb1..0000000 --- a/docs/LICENSE.md +++ /dev/null @@ -1 +0,0 @@ -../LICENSE.md \ No newline at end of file diff --git a/docs/LICENSE.md b/docs/LICENSE.md new file mode 100644 index 0000000..b6e36d7 --- /dev/null +++ b/docs/LICENSE.md @@ -0,0 +1,4 @@ +# License + +```{include} ../LICENSE.md +``` diff --git a/docs/README.md b/docs/README.md deleted file mode 120000 index 32d46ee..0000000 --- a/docs/README.md +++ /dev/null @@ -1 +0,0 @@ -../README.md \ No newline at end of file diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..6b46cdc --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,16 @@ +title: Koila +author: RenChu Wang +copyright: RenChu Wang, 2024 +logo: assets/koila.png + +exclude_patterns: [_build] +only_build_toc_files: true + +repository: + url: https://github.com/rentruewang/koila + +html: + use_repository_button: true + +execute: + execute_notebooks: force diff --git a/docs/_toc.yml b/docs/_toc.yml new file mode 100644 index 0000000..ca4d433 --- /dev/null +++ b/docs/_toc.yml @@ -0,0 +1,5 @@ +format: jb-article +root: index +sections: + - file: LICENSE + - file: CODE_OF_CONDUCT diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..451beda --- /dev/null +++ b/docs/index.md @@ -0,0 +1,2 @@ +```{include} ../README.md +``` diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index f02b3d4..0000000 --- a/mkdocs.yml +++ /dev/null @@ -1,20 +0,0 @@ -site_name: Koila -nav: - - "README.md" - - "LICENSE.md" - - "CODE_OF_CONDUCT.md" -theme: - name: material - font: - text: Open Sans - code: Fira Code - icon: - repo: material/github -edit_uri: "" -repo_name: rentruewang/koila -repo_url: https://github.com/rentruewang/koila -plugins: - - git-revision-date: - enabled_if_env: CI - - git-revision-date-localized: - type: date diff --git a/pyproject.toml b/pyproject.toml index 4c1a1f0..a10d12b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,9 @@ website = [ "mkdocs-git-revision-date-plugin>=0.3.2", "mkdocs-git-revision-date-localized-plugin>=1.2.2", "mkdocs-material>=9.5.3", + "jupyter>=1.1.1", + "jupyter-book>=1.0.3", + "myst-parser>=2.0.0", ] type = [ "mypy>=1.8.0",