From 3aaf33bc657097fd4727cb0f56c5e905e284f421 Mon Sep 17 00:00:00 2001 From: HavenDV Date: Mon, 19 Aug 2024 18:01:38 +0400 Subject: [PATCH] docs: Added docs and releases. --- .github/workflows/dotnet.yml | 27 ++++- .github/workflows/mkdocs.yml | 54 ++++++++++ .github/workflows/pull-request.yml | 6 +- DeepInfra.sln | 7 ++ docs/css/extra.css | 102 ++++++++++++++++++ docs/media/icon128.png | Bin 0 -> 13498 bytes mkdocs.yml | 108 +++++++++++++++++++ src/helpers/GenerateDocs/GenerateDocs.csproj | 9 ++ src/helpers/GenerateDocs/Program.cs | 37 +++++++ 9 files changed, 343 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/mkdocs.yml create mode 100644 docs/css/extra.css create mode 100644 docs/media/icon128.png create mode 100644 mkdocs.yml create mode 100644 src/helpers/GenerateDocs/GenerateDocs.csproj create mode 100644 src/helpers/GenerateDocs/Program.cs diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 1e14562..22dc061 100755 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,4 +1,4 @@ -name: Build, test and publish +name: Publish on: push: branches: @@ -6,9 +6,12 @@ on: tags: - v** +permissions: + contents: write + jobs: - build-test-publish: - name: Build, test and publish + publish: + name: Publish uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main with: generate-build-number: false @@ -16,4 +19,20 @@ jobs: enable-caching: false additional-test-arguments: '--logger GitHubActions' secrets: - nuget-key: ${{ secrets.NUGET_KEY }} \ No newline at end of file + nuget-key: ${{ secrets.NUGET_KEY }} + + release: + name: Release + runs-on: ubuntu-latest + needs: [publish] + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Create release + run: gh release create ${{ github.ref_name }} + --title "${{ github.ref_name }}" + --generate-notes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml new file mode 100644 index 0000000..5c80b98 --- /dev/null +++ b/.github/workflows/mkdocs.yml @@ -0,0 +1,54 @@ +name: MKDocs Deploy +on: + push: + branches: + - main + paths: + - 'docs/**' + - 'mkdocs.yml' + - 'examples/**' + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Install dependencies + run: pip install mkdocs-material + + - name: Generate docs + run: dotnet run --project src/helpers/GenerateDocs/GenerateDocs.csproj . + + - name: Build with MkDocs + run: mkdocs build -d ./_site + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 78597c5..ae5a1e4 100755 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,12 +1,12 @@ -name: Build and test +name: Test on: pull_request: branches: - main jobs: - build-test: - name: Build and test + test: + name: Test uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main with: generate-build-number: false diff --git a/DeepInfra.sln b/DeepInfra.sln index 9e06564..1dccb1d 100755 --- a/DeepInfra.sln +++ b/DeepInfra.sln @@ -33,6 +33,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrimmingHelper", "src\helpe EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeepInfra.IntegrationTests", "src\tests\DeepInfra.IntegrationTests\DeepInfra.IntegrationTests.csproj", "{A3F06E45-DFA8-4236-BFF5-425091762548}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenerateDocs", "src\helpers\GenerateDocs\GenerateDocs.csproj", "{76B1F623-DFAE-4A87-BF5C-7A6E419443E6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +57,10 @@ Global {A3F06E45-DFA8-4236-BFF5-425091762548}.Debug|Any CPU.Build.0 = Debug|Any CPU {A3F06E45-DFA8-4236-BFF5-425091762548}.Release|Any CPU.ActiveCfg = Release|Any CPU {A3F06E45-DFA8-4236-BFF5-425091762548}.Release|Any CPU.Build.0 = Release|Any CPU + {76B1F623-DFAE-4A87-BF5C-7A6E419443E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {76B1F623-DFAE-4A87-BF5C-7A6E419443E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {76B1F623-DFAE-4A87-BF5C-7A6E419443E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {76B1F623-DFAE-4A87-BF5C-7A6E419443E6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -64,6 +70,7 @@ Global {594DCFD8-E707-4232-B878-90FA3D880474} = {1A008ECD-2300-4BE4-A302-49DDF8BE0D54} {9F7DC3A1-B113-4577-875D-73B2DDD6647A} = {1A008ECD-2300-4BE4-A302-49DDF8BE0D54} {A3F06E45-DFA8-4236-BFF5-425091762548} = {AAA11B78-2764-4520-A97E-46AA7089A588} + {76B1F623-DFAE-4A87-BF5C-7A6E419443E6} = {1A008ECD-2300-4BE4-A302-49DDF8BE0D54} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CED9A020-DBA5-4BE6-8096-75E528648EC1} diff --git a/docs/css/extra.css b/docs/css/extra.css new file mode 100644 index 0000000..f217483 --- /dev/null +++ b/docs/css/extra.css @@ -0,0 +1,102 @@ +/* Logo title */ +.md-header__topic:first-child { + font-weight: initial !important; +} + +/* Code font size in
*/ +details .linenos, details code { + font-size: inherit !important; +} + +/* Code block / tab in details */ +details > summary + .highlight:last-child, details > summary + .tabbed-set:last-child { margin: 0 -0.6rem !important; } +details > summary + .highlight:last-child > .highlighttable { margin: 0 !important; } + +/* Table full width */ +.md-typeset__table { display: block !important; } +.md-typeset table:not(.highlighttable) { display: table !important; } + +.md-typeset table:not([class]) th { + min-width: 0rem; +} + +.headerlink { transform: translateY(-2.5px); } + +.md-nav__link[for=__toc] .md-icon { margin-left: auto !important; } + +blockquote.page-time { + margin: 20px 0 !important; + border-left-color: #64b5f6 !important; /* Just change the color value and that's it*/ +} +blockquote.page-copyright { + margin: 20px 0 !important; + border-left-color: #ff1700 !important; /* Just change the color value and that's it*/ +} +blockquote.page-copyright i.md-icon { + display: inline-block; + margin-right: 5px; + transform: translateY(3.5px); + width: 18px; +} + +#myBtn { + display: none; + position: fixed; + bottom: 100px; + right: 16px; + z-index: 99; + border: none; + outline: none; + color: #8590a6; + cursor: pointer; + padding: .7rem; + border-radius: .4rem; +} + +#myBtn:hover { + background-color: #d3d3d3; +} + +#color-button > button { + cursor: pointer; + transition: opacity .25s; + display: inline-block; + width: 6.5rem; + margin-bottom: 0.2rem; + padding: 1.2rem 0.4rem 0.2rem; + font-size: 0.64rem; + text-align: left; +} + +#color-button > button[data-md-color-primary] { + background-color: var(--md-primary-fg-color); + color: var(--md-primary-bg-color); +} +#color-button > button[data-md-color-primary=white] { + box-shadow: inset 0 0 0.05rem rgb(0 0 0 / 54%); +} + +#color-button > button[data-md-color-accent] { + background-color: var(--md-accent-fg-color); + color: var(--md-code-bg-color); +} + +mjx-container > img { + width: 0; + height: 0; +} + +[data-md-color-scheme="slate"] { + --md-primary-fg-color: #2e303e; + --md-accent-fg-color: #00bda4; + --md-typeset-a-color: #526cfe; +} + +[data-md-color-scheme="slate"] .md-typeset img { + background: white; + filter: brightness(0.9); +} + +[data-md-color-scheme="slate"] .md-typeset img[src$=".svg"] { + border: 4px solid white; +} \ No newline at end of file diff --git a/docs/media/icon128.png b/docs/media/icon128.png new file mode 100644 index 0000000000000000000000000000000000000000..05d2b17ae9551641c26b916e6e211d9e6e6ff466 GIT binary patch literal 13498 zcmd73WpEwMvL(93%*@OzSIp^IwFXGPc znX0JH?8>z=i=w-tJ1Rn1Q3?qjA07YzAjwFJtNxXN{}fp0zt;gF;KW}6X(6g03INo_ zBD?{i{@#A&S4 z&c7u@9@u|-%me=~bYLFDf9wCyIvTB9{|Y!qX&n~;00HBl0tU#)!UX`pA+6N4U9}bD z`Ai(_n1QAa#%9c(c8>qB00N$Te^om(S0JgUovpnKpQj-CzYu(X^?#~a$VvYNakUX7 z*H%y_6?1SlBjsXdWo9K8f+r;<6>v5+=TjAz{15%_oglfTtE(d)3yX(`2eStUvxBn* z3mY#lFAFO>3p+d0Uj&njm%S^{lgZwN;@?jGKR@DTE+)=aj;>Y?_N4##1sXfJxeAh# z{}brH(!bm3YGwZ4k?dXm)2+W9WckO!!p6+X@;}kcJgxo@w0|uBrv0m5{|+bck25|c zXDhS64gRNDLTm#63h@7{`|sun{NsgB*~-(*R$JW4&dlEB9}XuQy8z4oX!#$RI{!!J z|7Q6QQ-I~4ar)oJ?cbB~uiC$}A_OnM@?SG71Ycy5ed&Nl>RSn~P@Dr2!;MaaT}KuXlF zuw)|M>|>yGy{%7qbdq++pnRpr&50{>^Gm^&tk1{nnp}wZW-D0B|EKcXDe8{Dn*-?c zB~+bRxF@b=hG{o4^0h2UFMlo=rTmKxw$#vjs{o-=?+umQEmq8*g-^9oedfJIs^_5c zLj+GU-*(Rjzr}Kax(jZr$wdkHHhpFxmKiGdIj*8%$;_noo|Dg8uQ-$*x)Nq6gc~rIJH_^4$0dsxCzE`wH zGzs4FJ?O3T!7fWa(c~Jg_{n(<$VYG(TGsNs3=h#bab;#BN>bbei6m4i(-KnmY)cV) zP=xwcB?p}wVmp8)pTo|!1Q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%PVY%*Bd;p z{4P>+jz>KF#wRF#d0hS42!hf}&k@FNsNE%`@*fe4p`2SN!}+$kaNf;;o8Zmu^|miL zE%N(>RRv2f>$}Oy=O2u|ENG&dTjYw+0Zi6!7bXD}SiZ{WKKcL1&FW|z;SDq+b3 z7g5OBlWEDygC9lhg?32*9t1WHMp(MIwNsBTb4y{4i%LBB{U^zzm4)epz#EC5ocs#Q zcNK0VrwBE%U1@S3*wHatk+)P>M~cAwKGLA$9}d}?XX9IfE(Sdl2YjPzL}SY5k2Q9$ zym)yH-R=Sn!Fj@On@&XhTeHP~R%G4>rwTaZJ%2wIYK(~aOADl)O)r#}4|m&psPTyl zGbrt=?)}mIgT9AC!;2xyrdN79YNG;Q9F+bM+{d?OnY%3&D1+EMct6IX{{G>j2+{&| zIjVF_c}z~|kRo<>RWR7adKDO+nvNX57Ueu<`Xf^?-eL2xM-XKLRTS+SJ@S6}S^r-; fsqlsf`-XD1R^s1hQoZ%hi5wXTMe*vdMnV4zp$1Qs literal 0 HcmV?d00001 diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..3797080 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,108 @@ +site_name: OpenAI .NET Documentation +nav: +- Overview: index.md +# EXAMPLES # + +# - Quick Start: QuickStart.md +# - Architecture: Architecture.md +# - FAQ: FAQ.md +# - Contributing Guide: ContributingGuide.md +# - Tutorials: +# - Configure the native library loading: Tutorials/NativeLibraryConfig.md +# - Use executors: Tutorials/Executors.md +# - Use ChatSession: Tutorials/ChatSession.md +# - Understand LLamaContext: Tutorials/UnderstandLLamaContext.md +# - Get embeddings: Tutorials/GetEmbeddings.md +# - Quantize the model: Tutorials/Quantization.md +# +# - Advanced Tutorials: +# - Customize the native library loading: AdvancedTutorials/CustomizeNativeLibraryLoading.md +# +# - Integrations: +# - semantic-kernel integration: Integrations/semantic-kernel.md +# - kernel-memory integration: Integrations/kernel-memory.md +# - BotSharp integration: Integrations/BotSharp.md +# - Langchain integration: Integrations/Langchain.md +# +# - Examples: +# - Bacthed executor - multi-output to one input: Examples/BatchedExecutorFork.md +# - Batched executor - basic guidance: Examples/BatchedExecutorGuidance.md +# - Batched executor - rewinding to an earlier state: Examples/BatchedExecutorRewind.md + +theme: + name: material + static_templates: + - 404.html + language: 'en' + palette: + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: white + accent: red + toggle: + icon: material/weather-sunny + name: Switch to dark mode + + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: blue + accent: blue + toggle: + icon: material/weather-night + name: Switch to light mode + include_search_page: false + search_index_only: true + favicon: 'media/icon128.png' + icon: + logo: 'material/file-document' + features: + - content.action.edit + - navigation.instant + font: + text: 'Fira Sans' + code: 'Fira Mono' + +extra: + version: + provider: mike + +extra_css: + - 'css/extra.css?v=14' + +markdown_extensions: + - admonition + - def_list + - footnotes + - meta + - toc: + permalink: "" + slugify: !!python/name:pymdownx.slugs.uslugify + - pymdownx.arithmatex: + generic: true + - pymdownx.caret + - pymdownx.critic + - pymdownx.details + - pymdownx.emoji: + emoji_generator: !!python/name:pymdownx.emoji.to_svg + - pymdownx.highlight: + linenums: true + - pymdownx.inlinehilite + - pymdownx.keys + - pymdownx.magiclink + - pymdownx.mark + - pymdownx.snippets: + check_paths: true + - pymdownx.progressbar + - pymdownx.smartsymbols + - pymdownx.superfences: + custom_fences: + - name: math + class: arithmatex + format: !!python/name:pymdownx.arithmatex.fence_mathjax_format + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.tilde + - pymdownx.tabbed: + alternate_style: true \ No newline at end of file diff --git a/src/helpers/GenerateDocs/GenerateDocs.csproj b/src/helpers/GenerateDocs/GenerateDocs.csproj new file mode 100644 index 0000000..f67f521 --- /dev/null +++ b/src/helpers/GenerateDocs/GenerateDocs.csproj @@ -0,0 +1,9 @@ + + + + Exe + net8.0 + enable + + + diff --git a/src/helpers/GenerateDocs/Program.cs b/src/helpers/GenerateDocs/Program.cs new file mode 100644 index 0000000..c5599ac --- /dev/null +++ b/src/helpers/GenerateDocs/Program.cs @@ -0,0 +1,37 @@ +var solutionDirectory = args.ElementAtOrDefault(0) ?? Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "../../../../../..")); +var sampleDirectory = Path.Combine(solutionDirectory, "src", "tests", "OpenAI.IntegrationTests", "Examples"); +var mkDocsPath = Path.Combine(solutionDirectory, "mkdocs.yml"); + +var newDir = Path.Combine(solutionDirectory, "docs", "samples"); +Directory.CreateDirectory(newDir); + +// File.Copy( +// Path.Combine(solutionDirectory, "README.md"), +// Path.Combine(solutionDirectory, "docs", "index.md")); +// +// Console.WriteLine($"Generating samples from {sampleDirectory}..."); +// foreach (var path in Directory.EnumerateFiles(sampleDirectory, "*.cs", SearchOption.AllDirectories)) +// { +// var code = await File.ReadAllTextAsync(path); +// +// var start = code.IndexOf("\n {", StringComparison.Ordinal); +// var end = code.IndexOf("\n }", StringComparison.Ordinal); +// code = code.Substring(start + 4, end - start + 4); +// +// var lines = code.Split('\n')[1..^2]; +// code = string.Join('\n', lines.Select(x => x.Length > 8 ? x[8..] : string.Empty)); +// +// var newPath = Path.Combine(newDir, $"{Path.GetExtension(Path.GetFileNameWithoutExtension(path)).TrimStart('.')}.md"); +// await File.WriteAllTextAsync(newPath, $@"```csharp +// {code} +// ```"); +// } +// +// var mkDocs = await File.ReadAllTextAsync(mkDocsPath); +// var newMkDocs = mkDocs.Replace( +// "# EXAMPLES #", +// $"- Examples:{string.Concat(Directory.EnumerateFiles(Path.Combine(solutionDirectory, "docs", "samples"), "*.md") +// .Select(x => $@" +// - {Path.GetFileNameWithoutExtension(x)}: samples/{Path.GetFileNameWithoutExtension(x)}.md"))}"); +// await File.WriteAllTextAsync(mkDocsPath, newMkDocs); +