Skip to content

Commit ca7410a

Browse files
authored
Merge pull request #27 from USACE-RMC/oxyplot-improvements
Major improvements
2 parents 80086d8 + c578ace commit ca7410a

114 files changed

Lines changed: 6279 additions & 1452 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/Integration.yml

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,14 @@ name: Integration
22

33
on:
44
pull_request:
5-
branches: [main]
5+
branches: [ main ]
66
push:
7-
branches: [main]
7+
branches: [ main ]
88
workflow_dispatch:
99

1010
jobs:
11-
build-and-test:
12-
name: Build and Test
13-
runs-on: windows-latest
14-
15-
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v4
18-
19-
- name: Setup .NET
20-
uses: actions/setup-dotnet@v4
21-
with:
22-
dotnet-version: 10.0.x
23-
24-
- name: Restore
25-
run: dotnet restore WPF-Framework.sln
26-
27-
- name: Build
28-
run: dotnet build WPF-Framework.sln --no-restore --configuration Release
29-
30-
- name: Test
31-
run: >-
32-
dotnet test WPF-Framework.sln
33-
--no-build
34-
--configuration Release
35-
--logger "trx;LogFileName=TestResults.trx"
36-
--results-directory TestResults
37-
38-
- name: Upload test results
39-
if: failure()
40-
uses: actions/upload-artifact@v4
41-
with:
42-
name: test-results
43-
path: TestResults/**/*.trx
44-
retention-days: 14
11+
CI:
12+
uses: HydrologicEngineeringCenter/dotnet-workflows/.github/workflows/integration.yml@main
13+
with:
14+
dotnet-version: '10.0.x'
15+
run-tests: true

.github/workflows/NuGetPublish.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Publish to NuGet.org
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
publish:
12+
runs-on: windows-latest
13+
timeout-minutes: 90
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup .NET SDK
22+
uses: actions/setup-dotnet@v4
23+
with:
24+
dotnet-version: '10.0.x'
25+
26+
- name: Extract version from tag
27+
shell: pwsh
28+
run: |
29+
$version = $env:GITHUB_REF_NAME -replace '^v', ''
30+
"VERSION=$version" >> $env:GITHUB_ENV
31+
32+
- name: Restore
33+
run: dotnet restore WPF-Framework.sln
34+
35+
- name: Build
36+
shell: pwsh
37+
run: dotnet build WPF-Framework.sln -c Release --no-restore /p:Version=$env:VERSION
38+
39+
- name: Test
40+
env:
41+
VSTEST_CONNECTION_TIMEOUT: '600'
42+
run: dotnet test WPF-Framework.sln -c Release --no-build
43+
44+
- name: Pack
45+
shell: pwsh
46+
run: .\scripts\pack-wpf-framework.ps1 -Configuration Release -Version $env:VERSION -OutputDirectory packages -SkipRestore -SkipBuild
47+
48+
- name: Push to NuGet.org
49+
shell: pwsh
50+
env:
51+
NUGET_API_KEY: ${{ secrets.NUGET_ORG_API_KEY }}
52+
run: |
53+
$packageIds = @(
54+
"RMC.Wpf.Framework.Core",
55+
"RMC.Wpf.Framework.Models",
56+
"RMC.Wpf.Framework.Support",
57+
"RMC.Wpf.Framework.Controls"
58+
)
59+
60+
foreach ($packageId in $packageIds) {
61+
$packagePath = Join-Path "packages" "$packageId.$env:VERSION.nupkg"
62+
if (-not (Test-Path $packagePath)) {
63+
throw "Missing package: $packagePath"
64+
}
65+
66+
dotnet nuget push $packagePath --api-key $env:NUGET_API_KEY --source "https://api.nuget.org/v3/index.json" --skip-duplicate
67+
if ($LASTEXITCODE -ne 0) {
68+
throw "NuGet push failed for $packagePath."
69+
}
70+
}

.github/workflows/Release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
timeout-minutes: 90
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup .NET SDK
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: '10.0.x'
26+
27+
- name: Create version number
28+
shell: pwsh
29+
run: |
30+
$tag = $env:GITHUB_REF -replace 'refs/tags/', ''
31+
$version = $tag -replace '^v', ''
32+
"VERSION=$version" >> $env:GITHUB_ENV
33+
34+
- name: Restore
35+
run: dotnet restore WPF-Framework.sln
36+
37+
- name: Build
38+
shell: pwsh
39+
run: dotnet build WPF-Framework.sln -c Release --no-restore /p:Version=$env:VERSION
40+
41+
- name: Test
42+
env:
43+
VSTEST_CONNECTION_TIMEOUT: '600'
44+
run: dotnet test WPF-Framework.sln -c Release --no-build
45+
46+
- name: Pack
47+
shell: pwsh
48+
run: .\scripts\pack-wpf-framework.ps1 -Configuration Release -Version $env:VERSION -OutputDirectory packages -SkipRestore -SkipBuild
49+
50+
- name: Upload packages
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: wpf-framework-packages
54+
path: packages/*.nupkg
55+
retention-days: 30

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,4 +421,6 @@ FodyWeavers.xsd
421421
# AI-assistant metadata (not tracked in this repo)
422422
CLAUDE.md
423423
**/CLAUDE.md
424+
AGENTS.md
425+
**/AGENTS.md
424426
.claude/

Directory.Build.props

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,38 @@
1919
<FileVersion>1.0.0.0</FileVersion>
2020

2121
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
22+
<IsPackable>false</IsPackable>
2223
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2324
<DebugType>embedded</DebugType>
2425

2526
<PackageLicenseExpression>0BSD</PackageLicenseExpression>
2627
<PackageReadmeFile>README.md</PackageReadmeFile>
2728

29+
<!-- Public API XML documentation must be complete on packable RMC libraries. -->
30+
<WarningsAsErrors>$(WarningsAsErrors);CS1591;CS1572;CS1573;CS1574;CS0419</WarningsAsErrors>
31+
</PropertyGroup>
32+
33+
<PropertyGroup Condition="'$(EnforceXmlDocumentation)' == 'true'">
2834
<!--
29-
Treat XML-doc warnings as errors so missing or malformed documentation on public
30-
API fails the build instead of shipping a partial reference. Scope limited to
31-
IsWpfFrameworkLibrary=true so vendored forks (AvalonDock, upstream OxyPlot) are
32-
unaffected.
33-
CS1591 - missing XML comment for publicly visible type or member
34-
CS1572 - XML comment has a param tag for a non-existent parameter
35-
CS1573 - parameter has no matching param tag (but other parameters do)
36-
CS1574 - XML comment has cref attribute that could not be resolved
37-
CS0419 - ambiguous reference in cref attribute
35+
Release validation enables the full XML documentation warning set. Run
36+
scripts\validate-code-xml-docs.ps1 to combine this compiler gate with the
37+
private class and method scanner.
3838
-->
39-
<WarningsAsErrors>$(WarningsAsErrors);CS1591;CS1572;CS1573;CS1574;CS0419</WarningsAsErrors>
39+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
40+
<WarningsAsErrors>$(WarningsAsErrors);CS0419;CS1570;CS1571;CS1572;CS1573;CS1574;CS1584;CS1587;CS1589;CS1591</WarningsAsErrors>
4041
</PropertyGroup>
4142

4243
<ItemGroup Condition="'$(IsWpfFrameworkLibrary)' == 'true'">
4344
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="\" Visible="false" />
4445

4546
<!-- Reproducible builds: https://github.com/dotnet/reproducible-builds -->
46-
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.39">
47+
<PackageReference Include="DotNet.ReproducibleBuilds">
4748
<PrivateAssets>all</PrivateAssets>
4849
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
4950
</PackageReference>
5051

5152
<!-- Source Link: https://github.com/dotnet/sourcelink -->
52-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.102">
53+
<PackageReference Include="Microsoft.SourceLink.GitHub">
5354
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5455
<PrivateAssets>all</PrivateAssets>
5556
</PackageReference>

Directory.Packages.props

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
5+
<ClosedXmlVersion>0.105.0</ClosedXmlVersion>
6+
<CoverletCollectorVersion>6.0.2</CoverletCollectorVersion>
7+
<DocumentFormatOpenXmlVersion>3.4.1</DocumentFormatOpenXmlVersion>
8+
<DotNetReproducibleBuildsVersion>1.2.39</DotNetReproducibleBuildsVersion>
9+
<ExcelNumberFormatVersion>1.1</ExcelNumberFormatVersion>
10+
<FastMemberVersion>1.5.0</FastMemberVersion>
11+
<MicrosoftNetTestSdkVersion>17.12.0</MicrosoftNetTestSdkVersion>
12+
<MicrosoftSourceLinkGitHubVersion>10.0.102</MicrosoftSourceLinkGitHubVersion>
13+
<MSTestTestAdapterVersion>3.5.2</MSTestTestAdapterVersion>
14+
<MSTestTestFrameworkVersion>3.5.2</MSTestTestFrameworkVersion>
15+
<NSubstituteVersion>4.2.1</NSubstituteVersion>
16+
<NUnitVersion>3.14.0</NUnitVersion>
17+
<NUnit3TestAdapterVersion>4.5.0</NUnit3TestAdapterVersion>
18+
<!-- Restore the latest compatible RMC.Numerics 2.x release for source builds. -->
19+
<RmcNumericsVersion>2.*</RmcNumericsVersion>
20+
<!-- NuGet package dependencies require a valid version range, not a floating wildcard. -->
21+
<RmcNumericsPackageDependencyVersion>[2.1.1,3.0.0)</RmcNumericsPackageDependencyVersion>
22+
<SourceGearSqlite3Version>3.50.4.5</SourceGearSqlite3Version>
23+
<SystemDataSQLiteVersion>2.0.2</SystemDataSQLiteVersion>
24+
<XunitVersion>2.9.2</XunitVersion>
25+
<XunitRunnerVisualStudioVersion>2.8.2</XunitRunnerVisualStudioVersion>
26+
<XunitStaFactVersion>1.1.11</XunitStaFactVersion>
27+
</PropertyGroup>
28+
29+
<ItemGroup>
30+
<PackageVersion Include="ClosedXML" Version="$(ClosedXmlVersion)" />
31+
<PackageVersion Include="coverlet.collector" Version="$(CoverletCollectorVersion)" />
32+
<PackageVersion Include="DocumentFormat.OpenXml" Version="$(DocumentFormatOpenXmlVersion)" />
33+
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="$(DotNetReproducibleBuildsVersion)" />
34+
<PackageVersion Include="ExcelNumberFormat" Version="$(ExcelNumberFormatVersion)" />
35+
<PackageVersion Include="FastMember" Version="$(FastMemberVersion)" />
36+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
37+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubVersion)" />
38+
<PackageVersion Include="MSTest.TestAdapter" Version="$(MSTestTestAdapterVersion)" />
39+
<PackageVersion Include="MSTest.TestFramework" Version="$(MSTestTestFrameworkVersion)" />
40+
<PackageVersion Include="NSubstitute" Version="$(NSubstituteVersion)" />
41+
<PackageVersion Include="NUnit" Version="$(NUnitVersion)" />
42+
<PackageVersion Include="NUnit3TestAdapter" Version="$(NUnit3TestAdapterVersion)" />
43+
<PackageVersion Include="RMC.Numerics" Version="$(RmcNumericsVersion)" />
44+
<PackageVersion Include="SourceGear.sqlite3" Version="$(SourceGearSqlite3Version)" />
45+
<PackageVersion Include="System.Data.SQLite" Version="$(SystemDataSQLiteVersion)" />
46+
<PackageVersion Include="xunit" Version="$(XunitVersion)" />
47+
<PackageVersion Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioVersion)" />
48+
<PackageVersion Include="Xunit.StaFact" Version="$(XunitStaFactVersion)" />
49+
</ItemGroup>
50+
</Project>

README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,36 @@
11
# WPF Framework
22

33
[![CI](https://github.com/USACE-RMC/WPF-Framework/actions/workflows/Integration.yml/badge.svg)](https://github.com/USACE-RMC/WPF-Framework/actions/workflows/Integration.yml)
4+
[![NuGet](https://img.shields.io/nuget/v/RMC.Wpf.Framework.Controls)](https://www.nuget.org/packages/RMC.Wpf.Framework.Controls/)
45
[![License: 0BSD](https://img.shields.io/badge/License-0BSD-blue.svg)](LICENSE)
56

67
WPF Framework is a free and open-source .NET 10.0 application framework for building desktop project management applications, developed by the U.S. Army Corps of Engineers Risk Management Center ([USACE-RMC](https://www.rmc.usace.army.mil/)). It provides a complete application shell with docking layout, project explorer, theme switching, undo/redo, and specialized controls for charting, databases, expression parsing, and directed acyclic graphs.
78

9+
> [!NOTE]
10+
> This repository is under active development. Expect ongoing bug fixes and minor enhancements as the framework is prepared for broader public use.
11+
812
## Supported Frameworks
913

1014
| Platform | Version |
1115
|----------|---------|
1216
| .NET | 10.0 |
1317
| OS | Windows 10+ |
1418

15-
WPF Framework is currently distributed as source only. NuGet package publishing is planned for a future release; until then, clone the repository and reference the individual library projects directly, or build them as local NuGet packages.
19+
WPF Framework can be consumed from source project references or packaged into NuGet bundles with `scripts/pack-wpf-framework.ps1`. The package layout follows the internal dependency map: Core, Models, Support, then Controls.
1620

17-
The framework depends on the [Numerics](https://github.com/USACE-RMC/Numerics) library (built separately and referenced via `HintPath`). See [Prerequisites](#prerequisites) for the expected layout.
21+
The framework depends on [RMC.Numerics](https://github.com/USACE-RMC/Numerics) through central NuGet package management in `Directory.Packages.props`. Source builds restore the latest compatible 2.x package; NuGet bundles declare compatibility with RMC.Numerics 2.1.1 or later, below 3.0.0.
1822

1923
## Solution Structure
2024

2125
| Folder | Projects | Description |
2226
|--------|----------|-------------|
23-
| **Core** | FrameworkInterfaces, FrameworkUI, Themes | Core contracts, application shell, and theming engine |
24-
| **Controls** | GenericControls, NumericControls, OxyPlotControls, DatabaseControls, ExpressionParserControls, DAGControls | Reusable WPF control libraries |
27+
| **Core** | FrameworkInterfaces, Themes | Core contracts and theming engine |
28+
| **Controls** | FrameworkUI, GenericControls, NumericControls, OxyPlotControls, DatabaseControls, ExpressionParserControls, DAGControls, Xceed.Wpf.AvalonDock, Xceed.Wpf.AvalonDock.Themes.VS2013 | Application shell, reusable WPF controls, and docking UI |
2529
| **Models** | DatabaseManager, ExpressionParser, OxyPlot, OxyPlot.Wpf, OxyPlot.Wpf.Shared, DAG | Platform-agnostic model and engine libraries |
2630
| **Support** | SoftwareUpdate, SoftwareUpdate.Updater | GitHub Releases-based auto-update system |
27-
| **AvalonDock** | Xceed.Wpf.AvalonDock, Xceed.Wpf.AvalonDock.Themes.VS2013 | Modified VS2013-themed docking layout (vendored fork) |
2831
| **Demos** | FrameworkUI.Demo, GenericControls.Demo, NumericControls.Demo, OxyPlotControls.Demo, DatabaseControls.Demo, ExpressionParserControls.Demo, DAG.Demo | Interactive demo applications |
2932
| **Tests** | OxyPlot.ExampleLibrary + 13 test projects | Example chart models and xunit, MSTest, and NUnit test suites |
33+
| **Packaging** | RMC.Wpf.Framework.Core, RMC.Wpf.Framework.Models, RMC.Wpf.Framework.Support, RMC.Wpf.Framework.Controls | NuGet bundle projects |
3034

3135
## Quick Start
3236

@@ -43,6 +47,21 @@ dotnet build WPF-Framework.sln
4347
dotnet test WPF-Framework.sln
4448
```
4549

50+
### Build Packages
51+
52+
```bash
53+
.\scripts\pack-wpf-framework.ps1 -Configuration Release -Version 1.0.0
54+
```
55+
56+
This creates and validates the following NuGet packages in `artifacts/packages/`:
57+
58+
| Package | Includes | Depends on |
59+
|---------|----------|------------|
60+
| [`RMC.Wpf.Framework.Core`](https://www.nuget.org/packages/RMC.Wpf.Framework.Core/) | FrameworkInterfaces, Themes | None |
61+
| [`RMC.Wpf.Framework.Models`](https://www.nuget.org/packages/RMC.Wpf.Framework.Models/) | DAG, DatabaseManager, ExpressionParser, OxyPlot libraries | ClosedXML, DocumentFormat.OpenXml, ExcelNumberFormat, FastMember, SourceGear.sqlite3, System.Data.SQLite |
62+
| [`RMC.Wpf.Framework.Support`](https://www.nuget.org/packages/RMC.Wpf.Framework.Support/) | SoftwareUpdate and updater content files | None |
63+
| [`RMC.Wpf.Framework.Controls`](https://www.nuget.org/packages/RMC.Wpf.Framework.Controls/) | FrameworkUI, control libraries, AvalonDock fork | Core, Models, Support, RMC.Numerics 2.x |
64+
4665
### Minimal Application
4766

4867
```csharp
@@ -67,6 +86,7 @@ Comprehensive documentation is available in the [docs/](docs/index.md) folder:
6786

6887
| Document | Description |
6988
|----------|-------------|
89+
| [Gallery](docs/gallery.md) | Screenshot guide to the framework control libraries |
7090
| [Getting Started](docs/getting-started.md) | Step-by-step guide to building your first application |
7191
| [Architecture](docs/architecture.md) | Solution structure, dependencies, and design patterns |
7292
| [Themes](docs/themes.md) | Runtime theme switching with Light, Dark, and Blue themes |
@@ -142,7 +162,7 @@ WPF Framework powers the following USACE-RMC desktop applications:
142162

143163
## Related Libraries
144164

145-
- [Numerics](https://github.com/USACE-RMC/Numerics) — .NET library for numerical computing, statistical analysis, and Bayesian inference (required dependency for NumericControls and DatabaseControls)
165+
- [RMC.Numerics](https://github.com/USACE-RMC/Numerics) - NuGet package for numerical computing, statistical analysis, and Bayesian inference (required dependency for NumericControls and DatabaseControls)
146166

147167
## Contributing
148168

0 commit comments

Comments
 (0)