Skip to content

Commit

Permalink
Upgrade docusaurus (microsoft#1101)
Browse files Browse the repository at this point in the history
* Preparing content for MDX v3

* upgrade dcusarus to v3

* upgrade to v3

* merge main to branch

* space

* change node version to 18

* merge main

* change setup-node version

* bug fix: added escape when needed

* added escape characters in docstrings

* upgraded docusaurus to 3.0.1

* polishing

* restored commented out link

* rename file

* removed backtick

* Add support for MD files in Docusaurus

* Add support for MD files in Docusaurus

* Add support for MD files in Docusaurus

* polishing

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* merge with main and build scripts added

---------

Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
  • Loading branch information
4 people committed Jan 13, 2024
1 parent eef3239 commit 2018b2c
Show file tree
Hide file tree
Showing 12 changed files with 5,070 additions and 3,933 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
working-directory: website
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 18.x
- name: setup python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -60,9 +60,9 @@ jobs:
working-directory: website
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 18.x
- name: setup python
uses: actions/setup-python@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions autogen/oai/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def set_cache(cls, seed: Optional[int] = 41, cache_path_root: Optional[str] = ".
seed (int, Optional): The integer identifier for the pseudo seed.
Results corresponding to different seeds will be cached in different places.
cache_path (str, Optional): The root path for the cache.
The complete cache path will be {cache_path}/{seed}.
The complete cache path will be {cache_path_root}/{seed}.
"""
cls.cache_seed = seed
cls.cache_path = f"{cache_path_root}/{seed}"
Expand All @@ -145,7 +145,7 @@ def clear_cache(cls, seed: Optional[int] = None, cache_path_root: Optional[str]
seed (int, Optional): The integer identifier for the pseudo seed.
If omitted, all caches under cache_path_root will be cleared.
cache_path (str, Optional): The root path for the cache.
The complete cache path will be {cache_path}/{cache_seed}.
The complete cache path will be {cache_path_root}/{seed}.
"""
if seed is None:
shutil.rmtree(cache_path_root, ignore_errors=True)
Expand Down
9 changes: 9 additions & 0 deletions scripts/docs_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -e
set -x

cd website &&
yarn install --frozen-lockfile --ignore-engines &&
pydoc-markdown &&
yarn build
9 changes: 9 additions & 0 deletions scripts/docs_serve.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -e
set -x

cd website &&
yarn install --frozen-lockfile --ignore-engines &&
pydoc-markdown &&
yarn start
File renamed without changes.
2 changes: 1 addition & 1 deletion website/docs/Use-Cases/enhanced_inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ There are a number of benefits of using `autogen` to perform inference: performa

## Tune Inference Parameters (for openai<1)

Find a list of examples in this page: [Tune Inference Parameters Examples](../Examples.md#tune-inference-hyperparameters)
Find a list of examples in this page: [Tune Inference Parameters Examples](../Examples.md#inference-hyperparameters-tuning)

### Choices to optimize

Expand Down
3 changes: 3 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ module.exports = {
favicon: "img/ag.ico",
organizationName: "Microsoft", // Usually your GitHub org/user name.
projectName: "AutoGen", // Usually your repo name.
markdown: {
format: 'detect', // Support for MD files with .md extension
},
themeConfig: {
navbar: {
title: "AutoGen",
Expand Down
15 changes: 10 additions & 5 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,28 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "0.0.0-4193",
"@docusaurus/preset-classic": "0.0.0-4193",
"@docusaurus/core": "^3.1.0",
"@docusaurus/preset-classic": "^3.1.0",
"@easyops-cn/docusaurus-search-local": "^0.21.1",
"@mdx-js/react": "^1.6.21",
"@mdx-js/react": "^3.0.0",
"@svgr/webpack": "^5.5.0",
"antd": "^5.11.5",
"clsx": "^1.1.1",
"file-loader": "^6.2.0",
"hast-util-is-element": "1.1.0",
"joi": "17.6.0",
"minimatch": "3.0.5",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rehype-katex": "4",
"remark-math": "3",
"trim": "^0.0.3",
"url-loader": "^4.1.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.1.0",
"@docusaurus/types": "^3.1.0"
},
"browserslist": {
"production": [
">0.5%",
Expand Down
2 changes: 1 addition & 1 deletion website/pydoc-markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ renderer:
relative_sidebar_path: sidebar.json
sidebar_top_level_label: Reference
markdown:
escape_html_in_docstring: false
escape_html_in_docstring: true
1 change: 0 additions & 1 deletion website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
'Getting-Started',
'Installation',
{'Use Cases': [{type: 'autogenerated', dirName: 'Use-Cases'}]},
{'Examples': [{type: 'autogenerated', dirName: 'Examples'}]},
'Contribute',
'Research',
],
Expand Down
Loading

0 comments on commit 2018b2c

Please sign in to comment.