Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docfx documentation infrastructure #34

Merged
merged 9 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .bonsai/Bonsai.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Packages>
<Package id="Bonsai" version="2.8.1" />
<Package id="Bonsai.Core" version="2.8.1" />
<Package id="Bonsai.Design" version="2.8.0" />
<Package id="Bonsai.Editor" version="2.8.0" />
<Package id="jacobslusser.ScintillaNET" version="3.6.3" />
<Package id="Markdig" version="0.18.1" />
<Package id="Microsoft.Web.WebView2" version="1.0.1823.32" />
<Package id="Rx-Core" version="2.2.5" />
<Package id="Rx-Interfaces" version="2.2.5" />
<Package id="Rx-Linq" version="2.2.5" />
<Package id="Rx-PlatformServices" version="2.2.5" />
<Package id="SvgNet" version="3.3.3" />
<Package id="YamlDotNet" version="13.1.1" />
</Packages>
<AssemblyReferences>
<AssemblyReference assemblyName="Bonsai" />
<AssemblyReference assemblyName="Bonsai.Core" />
<AssemblyReference assemblyName="Bonsai.Design" />
<AssemblyReference assemblyName="Bonsai.Editor" />
</AssemblyReferences>
<AssemblyLocations>
<AssemblyLocation assemblyName="Bonsai" processorArchitecture="MSIL" location="Packages\Bonsai.2.8.1\lib\net48\Bonsai.exe" />
<AssemblyLocation assemblyName="Bonsai.Core" processorArchitecture="MSIL" location="Packages\Bonsai.Core.2.8.1\lib\net462\Bonsai.Core.dll" />
<AssemblyLocation assemblyName="Bonsai.Design" processorArchitecture="MSIL" location="Packages\Bonsai.Design.2.8.0\lib\net462\Bonsai.Design.dll" />
<AssemblyLocation assemblyName="Bonsai.Editor" processorArchitecture="MSIL" location="Packages\Bonsai.Editor.2.8.0\lib\net472\Bonsai.Editor.dll" />
<AssemblyLocation assemblyName="Markdig" processorArchitecture="MSIL" location="Packages\Markdig.0.18.1\lib\net40\Markdig.dll" />
<AssemblyLocation assemblyName="Microsoft.Web.WebView2.Core" processorArchitecture="MSIL" location="Packages\Microsoft.Web.WebView2.1.0.1823.32\lib\net45\Microsoft.Web.WebView2.Core.dll" />
<AssemblyLocation assemblyName="Microsoft.Web.WebView2.WinForms" processorArchitecture="MSIL" location="Packages\Microsoft.Web.WebView2.1.0.1823.32\lib\net45\Microsoft.Web.WebView2.WinForms.dll" />
<AssemblyLocation assemblyName="Microsoft.Web.WebView2.Wpf" processorArchitecture="MSIL" location="Packages\Microsoft.Web.WebView2.1.0.1823.32\lib\net45\Microsoft.Web.WebView2.Wpf.dll" />
<AssemblyLocation assemblyName="ScintillaNET" processorArchitecture="MSIL" location="Packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll" />
<AssemblyLocation assemblyName="SVG" processorArchitecture="MSIL" location="Packages\SvgNet.3.3.3\lib\net462\SVG.dll" />
<AssemblyLocation assemblyName="System.Reactive.Core" processorArchitecture="MSIL" location="Packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll" />
<AssemblyLocation assemblyName="System.Reactive.Interfaces" processorArchitecture="MSIL" location="Packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll" />
<AssemblyLocation assemblyName="System.Reactive.Linq" processorArchitecture="MSIL" location="Packages\Rx-Linq.2.2.5\lib\net45\System.Reactive.Linq.dll" />
<AssemblyLocation assemblyName="System.Reactive.PlatformServices" processorArchitecture="MSIL" location="Packages\Rx-PlatformServices.2.2.5\lib\net45\System.Reactive.PlatformServices.dll" />
<AssemblyLocation assemblyName="YamlDotNet" processorArchitecture="MSIL" location="Packages\YamlDotNet.13.1.1\lib\net47\YamlDotNet.dll" />
</AssemblyLocations>
<LibraryFolders>
<LibraryFolder path="Packages\Microsoft.Web.WebView2.1.0.1823.32\runtimes\win-arm64\native" platform="arm64" />
<LibraryFolder path="Packages\Microsoft.Web.WebView2.1.0.1823.32\runtimes\win-arm64\native_uap" platform="arm64" />
<LibraryFolder path="Packages\Microsoft.Web.WebView2.1.0.1823.32\runtimes\win-x64\native" platform="x64" />
<LibraryFolder path="Packages\Microsoft.Web.WebView2.1.0.1823.32\runtimes\win-x64\native_uap" platform="x64" />
<LibraryFolder path="Packages\Microsoft.Web.WebView2.1.0.1823.32\runtimes\win-x86\native" platform="x86" />
<LibraryFolder path="Packages\Microsoft.Web.WebView2.1.0.1823.32\runtimes\win-x86\native_uap" platform="x86" />
</LibraryFolders>
</PackageConfiguration>
8 changes: 8 additions & 0 deletions .bonsai/NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="Gallery" value="Gallery" />
<add key="Bonsai Packages" value="https://www.myget.org/F/bonsai/api/v3/index.json" />
<add key="Community Packages" value="https://www.myget.org/F/bonsai-community/api/v3/index.json" />
</packageSources>
</configuration>
1 change: 1 addition & 0 deletions .bonsai/Setup.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
powershell -ExecutionPolicy Bypass -File ./Setup.ps1
19 changes: 19 additions & 0 deletions .bonsai/Setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
if (!(Test-Path "./Bonsai.exe")) {
$release = "https://github.com/bonsai-rx/bonsai/releases/latest/download/Bonsai.zip"
$configPath = "./Bonsai.config"
if (Test-Path $configPath) {
[xml]$config = Get-Content $configPath
$bootstrapper = $config.PackageConfiguration.Packages.Package.where{$_.id -eq 'Bonsai'}
if ($bootstrapper) {
$version = $bootstrapper.version
$release = "https://github.com/bonsai-rx/bonsai/releases/download/$version/Bonsai.zip"
}
}
Invoke-WebRequest $release -OutFile "temp.zip"
Move-Item -Path "NuGet.config" "temp.config"
Expand-Archive "temp.zip" -DestinationPath "." -Force
Move-Item -Path "temp.config" "NuGet.config" -Force
Remove-Item -Path "temp.zip"
Remove-Item -Path "Bonsai32.exe"
}
& .\Bonsai.exe --no-editor
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"docfx": {
"version": "2.75.3",
"commands": [
"docfx"
]
}
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# Config
*.gitignore text
*.gitattributes text
*.gitmodules text
*.editorconfig text
*.git-blame-ignore-revs text
*.sln text
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: NuGet/[email protected]

- name: Restore NuGet Packages
run: nuget restore Bonsai.PulsePal.sln
run: nuget restore src/Bonsai.PulsePal.sln

- name: Build Solution
run: msbuild Bonsai.PulsePal.sln /p:Configuration=Release
run: msbuild src/Bonsai.PulsePal.sln /p:Configuration=Release
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Builds and publishes the documentation website to gh-pages branch
name: Build docs

on:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
name: Checkout
with:
submodules: true

- name: Setup .NET Core SDK
uses: actions/[email protected]
with:
dotnet-version: 7.x

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1

- name: Restore NuGet Packages
run: msbuild -t:restore src/Bonsai.PulsePal.sln

- name: Setup DocFX
run: dotnet tool restore

- name: Setup Bonsai
working-directory: .bonsai
run: .\Setup.ps1

- name: Build Documentation
working-directory: docs
run: .\build.ps1

- name: Checkout gh-pages
uses: actions/checkout@v2
with:
ref: gh-pages
path: gh-pages
- name: Publish to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
.vs
bin
obj
*.user
*.user
*.exe
*.exe.settings

# bonsai environment
Packages
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/bonsai"]
path = docs/bonsai
url = https://github.com/bonsai-rx/docfx-tools
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_site
3 changes: 3 additions & 0 deletions docs/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# auto-generated files
*.yml
.manifest
Empty file added docs/apidoc/.gitignore
Empty file.
3 changes: 3 additions & 0 deletions docs/articles/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Introduction

[!include[Overview](~/articles/overview.md)]
9 changes: 9 additions & 0 deletions docs/articles/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
uid: overview
---

Bonsai.PulsePal is a [Bonsai](https://bonsai-rx.org/) interface for the [Pulse Pal](https://sites.google.com/site/pulsepalwiki/) open source pulse train generator. All device configuration and triggering functionality is exposed via reactive operators.

## Installing the package

To install Bonsai.PulsePal use the Bonsai package manager and search for the **Bonsai - PulsePal** package.
2 changes: 2 additions & 0 deletions docs/articles/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- name: Getting Started
href: intro.md
1 change: 1 addition & 0 deletions docs/bonsai
Submodule bonsai added at 38c3bd
2 changes: 2 additions & 0 deletions docs/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.\bonsai\modules\Export-Image.ps1 "..\src\Bonsai.PulsePal\bin\Release\net462"
dotnet docfx @args
83 changes: 83 additions & 0 deletions docs/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"metadata": [
{
"src": [
{
"src": "../src",
"files": [
"**/*.csproj"
]
}
],
"dest": "api",
"filter": "filter.yml"
}
],
"build": {
"content": [
{
"files": [
"**/*.{md,yml}"
],
"exclude": [
"_site/**",
"bonsai/**",
"filter.yml"
]
}
],
"resource": [
{
"files": [
"logo.svg",
"favicon.ico",
"images/**",
"workflows/**"
]
}
],
"output": "_site",
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"template": [
"default",
"modern",
"bonsai/template",
"template"
],
"globalMetadata": {
"_appName": "Bonsai - PulsePal",
"_appTitle": "Bonsai.PulsePal",
"_enableNewTab": true,
"_enableSearch": true,
"pdf": false,
"_appFooter": "<span>&copy; 2024 Bonsai Foundation and Contributors</span> - <span>Made with <a href=\"https://dotnet.github.io/docfx\">docfx</a></span>",
"_gitContribute": {
"repo": "https://github.com/bonsai-rx/pulsepal",
"branch": "main",
"apiSpecFolder": "docs/apidoc"
}
},
"markdownEngineName": "markdig",
"markdownEngineProperties": {
"markdigExtensions": [
"attributes",
"customcontainers"
]
},
"xref": [
"https://bonsai-rx.org/docs/xrefmap.yml",
"https://horizongir.github.io/opencv.net/xrefmap.yml",
"https://horizongir.github.io/reactive/xrefmap.yml"
]
}
}
Binary file added docs/favicon.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/filter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiRules:
- exclude:
hasAttribute:
uid: System.ObsoleteAttribute
7 changes: 7 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**Bonsai - PulsePal** Documentation
=================================

[!include[Overview](~/articles/overview.md)]

> [!Warning]
> These docs are under active development, feel free to contribute by either [raising an issue](https://github.com/bonsai-rx/pulsepal/issues) or following the links to **Edit this page**.
Loading
Loading