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 website for documentation #51

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e5eb7ce
move source code to src folder
banchan86 Dec 31, 2024
e1a4f8c
Move editorconfig to src folder
banchan86 Dec 31, 2024
a1bd3ba
Install docfx
banchan86 Dec 31, 2024
ed5906c
Add doc files
banchan86 Dec 31, 2024
4426a72
Add enumSortOrder and memberLayout to docfx.json
banchan86 Dec 31, 2024
1e40744
Add api folder gitignore
banchan86 Dec 31, 2024
06e94b6
Add docfx-tools submodule
banchan86 Dec 31, 2024
039c23c
Fix dotnet.yml for CI
banchan86 Dec 31, 2024
9d93c91
Additional fix for dotnet.yml
banchan86 Dec 31, 2024
ffc6d5d
Remove TOC references to non-existing articles
banchan86 Jan 3, 2025
dbba4c7
Move src back to root dir and modify doc config
banchan86 Jan 3, 2025
e6ab5ab
Apply suggestions from code review
banchan86 Jan 7, 2025
c4f5012
Update docfx-tools submodule
banchan86 Jan 23, 2025
cbae45d
Remove unnecessary docfx.json properties
banchan86 Jan 23, 2025
cc13e91
Add docs.yml GitHub Actions recipe
banchan86 Jan 23, 2025
f24dd2c
Add common build props, ignore artifacts folder
banchan86 Jan 24, 2025
c8c4a48
Add common build props to sln using visual studio
banchan86 Jan 24, 2025
ccf7c2b
Update .csproj with leftover tags from directory.build.props
banchan86 Jan 24, 2025
903a60e
Remove unused declarations in .gitignore
banchan86 Jan 24, 2025
b41004e
Remove year from license file
banchan86 Jan 24, 2025
aee8977
add global.json
banchan86 Jan 24, 2025
ae8aac5
Remove bonsai.props and references to it
banchan86 Jan 24, 2025
ab1d154
Remove unnecessary properties from csproj
banchan86 Jan 24, 2025
707df65
remove git repository information from csproj
banchan86 Jan 24, 2025
74d7168
Update .NET version for dotnet.yml
banchan86 Jan 24, 2025
52c722a
Remove global.json, restore original dotnet.yml
banchan86 Jan 24, 2025
b425cb0
Add bonsai local env
banchan86 Jan 24, 2025
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
2 changes: 2 additions & 0 deletions .bonsai/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.exe
Packages/
59 changes: 59 additions & 0 deletions .bonsai/Bonsai.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?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.5" />
<Package id="Bonsai.Core" version="2.8.5" />
<Package id="Bonsai.Design" version="2.8.5" />
<Package id="Bonsai.Editor" version="2.8.5" />
<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="System.Buffers" version="4.5.1" />
<Package id="System.Memory" version="4.5.5" />
<Package id="System.Numerics.Vectors" version="4.5.0" />
<Package id="System.Resources.Extensions" version="8.0.0" />
<Package id="System.Runtime.CompilerServices.Unsafe" version="4.5.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.5/lib/net48/Bonsai.exe" />
<AssemblyLocation assemblyName="Bonsai.Core" processorArchitecture="MSIL" location="Packages/Bonsai.Core.2.8.5/lib/net462/Bonsai.Core.dll" />
<AssemblyLocation assemblyName="Bonsai.Design" processorArchitecture="MSIL" location="Packages/Bonsai.Design.2.8.5/lib/net462/Bonsai.Design.dll" />
<AssemblyLocation assemblyName="Bonsai.Editor" processorArchitecture="MSIL" location="Packages/Bonsai.Editor.2.8.5/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.Buffers" processorArchitecture="MSIL" location="Packages/System.Buffers.4.5.1/lib/net461/System.Buffers.dll" />
<AssemblyLocation assemblyName="System.Memory" processorArchitecture="MSIL" location="Packages/System.Memory.4.5.5/lib/net461/System.Memory.dll" />
<AssemblyLocation assemblyName="System.Numerics.Vectors" processorArchitecture="MSIL" location="Packages/System.Numerics.Vectors.4.5.0/lib/net46/System.Numerics.Vectors.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="System.Resources.Extensions" processorArchitecture="MSIL" location="Packages/System.Resources.Extensions.8.0.0/lib/net462/System.Resources.Extensions.dll" />
<AssemblyLocation assemblyName="System.Runtime.CompilerServices.Unsafe" processorArchitecture="MSIL" location="Packages/System.Runtime.CompilerServices.Unsafe.4.5.3/lib/net461/System.Runtime.CompilerServices.Unsafe.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>
4 changes: 4 additions & 0 deletions .bonsai/Setup.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
pushd %~dp0
powershell -ExecutionPolicy Bypass -File ./Setup.ps1
popd
21 changes: 21 additions & 0 deletions .bonsai/Setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Push-Location $PSScriptRoot
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" -ErrorAction SilentlyContinue
Expand-Archive "temp.zip" -DestinationPath "." -Force
Move-Item -Path "temp.config" "NuGet.config" -Force -ErrorAction SilentlyContinue
Remove-Item -Path "temp.zip"
Remove-Item -Path "Bonsai32.exe"
}
& .\Bonsai.exe --no-editor
Pop-Location
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"docfx": {
"version": "2.78.2",
"commands": [
"docfx"
],
"rollForward": false
}
}
}
53 changes: 53 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Builds and publishes the documentation website
name: Build docs

on:
workflow_dispatch:

concurrency:
group: docs
cancel-in-progress: true

permissions:
# Both required by actions/deploy-pages
pages: write
id-token: write

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

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Setup DocFX
run: dotnet tool restore

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

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --no-restore

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

- name: Upload GitHub Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_site

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
.vs
bin
obj
*.user
*.suo
/artifacts/
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
10 changes: 9 additions & 1 deletion Bonsai.Sgen.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bonsai.Sgen", "Bonsai.Sgen\
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C2B91AD3-A136-4833-897F-123A6B3578DD}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bonsai.Sgen.Tests", "Bonsai.Sgen.Tests\Bonsai.Sgen.Tests.csproj", "{DF485243-376F-4632-A637-D489B799F59A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bonsai.Sgen.Tests", "Bonsai.Sgen.Tests\Bonsai.Sgen.Tests.csproj", "{DF485243-376F-4632-A637-D489B799F59A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{F60C8E06-0D9D-4A47-963F-8E28AD7924B6}"
ProjectSection(SolutionItems) = preProject
build\Common.props = build\Common.props
build\Package.props = build\Package.props
build\Version.props = build\Version.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
8 changes: 6 additions & 2 deletions Bonsai.Sgen/Bonsai.Sgen.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>A tool for automatically generating YML serialization classes from schema files.</Description>
<ToolCommandName>bonsai.sgen</ToolCommandName>
<PackageTags>Bonsai Rx Sgen Schema Serializer Generators</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
<PackAsTool>true</PackAsTool>
<OutputType>Exe</OutputType>
<PackageId>Bonsai.Sgen</PackageId>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<VersionPrefix>0.4.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
27 changes: 1 addition & 26 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Authors>Bonsai</Authors>
<PackageIcon>icon.png</PackageIcon>
<Description>A tool for automatically generating YML serialization classes from schema files.</Description>
<ToolCommandName>bonsai.sgen</ToolCommandName>
<PackageTags>Bonsai Rx Sgen Schema Serializer Generators</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright © Bonsai Foundation CIC 2023</Copyright>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<PackageOutputPath>..\bin\$(Configuration)</PackageOutputPath>
<PackageProjectUrl>https://bonsai-rx.org/sgen</PackageProjectUrl>
<RepositoryUrl>https://github.com/bonsai-rx/sgen.git</RepositoryUrl>
<VersionSuffix></VersionSuffix>
<IncludeSymbols>true</IncludeSymbols>
<RepositoryType>git</RepositoryType>
<PackAsTool>true</PackAsTool>
</PropertyGroup>

<ItemGroup Condition="'$(IsPackable)' == 'true'">
<Content Include="..\LICENSE" PackagePath="/" />
<Content Include="..\icon.png" PackagePath="/" />
<Content Include="..\README.md" PackagePath="/" />
</ItemGroup>
<Import Project="build/Common.props" />
</Project>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Bonsai Foundation CIC
Copyright (c) Bonsai Foundation CIC and Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 10 additions & 0 deletions build/Common.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>
<PropertyGroup>
<UseArtifactsOutput>true</UseArtifactsOutput>
<LangVersion>10.0</LangVersion>
<Features>strict</Features>
</PropertyGroup>

<Import Project="Package.props" />
<Import Project="Version.props" />
</Project>
20 changes: 20 additions & 0 deletions build/Package.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project>
<PropertyGroup>
<Authors>Bonsai</Authors>
<Copyright>Copyright © Bonsai Foundation CIC and Contributors</Copyright>
<PackageProjectUrl>https://bonsai-rx.org/sgen</PackageProjectUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageType>Dependency;BonsaiLibrary</PackageType>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
<IncludeSymbols>true</IncludeSymbols>
</PropertyGroup>

<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)..\LICENSE" PackagePath="/" />
<Content Include="$(MSBuildThisFileDirectory)..\icon.png" PackagePath="/" />
<Content Include="$(MSBuildThisFileDirectory)..\README.md" PackagePath="/" />
</ItemGroup>
</Project>
25 changes: 25 additions & 0 deletions build/Version.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project>
<PropertyGroup>
<!-- Semantic version prefix -->
<VersionPrefix>0.4.0</VersionPrefix>
</PropertyGroup>

<PropertyGroup Condition="'$(ContinuousIntegrationBuild)' != 'true'">
<!-- When making local builds DevVersion can be overridden to generate multiple local versions -->
<DevVersion Condition="'$(DevVersion)' == ''">0</DevVersion>

<VersionSuffix>dev$(DevVersion)</VersionSuffix>
<_FileVersionRevision>$([MSBuild]::Add(60000, $(DevVersion)))</_FileVersionRevision>
</PropertyGroup>

<PropertyGroup Condition="'$(ContinuousIntegrationBuild)' == 'true'">
<VersionSuffix>$(CiBuildVersionSuffix)</VersionSuffix>
<_FileVersionRevision>0</_FileVersionRevision>
<_FileVersionRevision Condition="'$(CiBuildVersionSuffix)' != '' and '$(CiRunNumber)' != ''">$(CiRunNumber)</_FileVersionRevision>
</PropertyGroup>

<PropertyGroup>
<!-- Force malformed versions to be an error -->
<WarningsAsErrors>$(WarningsAsErrors);CS7035</WarningsAsErrors>
</PropertyGroup>
</Project>
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_site
obj/
2 changes: 2 additions & 0 deletions docs/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.yml
.manifest
1 change: 1 addition & 0 deletions docs/articles/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- href: ../index.md
1 change: 1 addition & 0 deletions docs/bonsai
Submodule bonsai added at 0ab079
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
dotnet docfx @args
Loading
Loading