Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3559159
test: red assertion-parity test for V2_6_V2_7 -> single-topic migration
ottobolyos Aug 19, 2026
97f573d
test(dry-generator): consolidate V2_6_V2_7 fixtures into topic files …
ottobolyos Aug 19, 2026
caae782
chore(dry-generator): delete deprecated V2_6_V2_7 per-version fixture…
ottobolyos Aug 19, 2026
d1af8a4
test(dry-generator): permanent guard against V<N_M>/ folder + V<N_M>*…
ottobolyos Aug 19, 2026
7652db2
fix(dry-generator): filter bin/obj from per-version directory guard s…
ottobolyos Aug 19, 2026
1545354
docs(testing): retire V2_6_V2_7 stale refs post Phase 1 consolidation
ottobolyos Aug 19, 2026
9d09d0a
test(dry-generator): topic-fixture coverage guard for migrated anchor…
ottobolyos Aug 20, 2026
76113c7
test(generator): add ByteIdenticalRegenTests for current-XMI regen
ottobolyos Aug 20, 2026
256fc2c
refactor(generator): merge XmlCutting{Item,ToolLifeCycle} into Shape-…
ottobolyos Aug 20, 2026
dadc51b
refactor(generator): merge Enum{,String}Descriptions into Shape-B tem…
ottobolyos Aug 20, 2026
8bf0fa8
fix(generator): emit Pallet measurement interfaces
ottobolyos Aug 20, 2026
a60ce46
chore(generator): remove stale orphan .g.cs files
ottobolyos Aug 20, 2026
02868a9
chore(generator): refresh .g.cs to current generator output
ottobolyos Aug 20, 2026
041dae7
test(generator): flip current-XMI byte-identical guard from Explicit …
ottobolyos Aug 20, 2026
eb386b5
feat(generator): add --previous-xmi flag for delta-driven regen
ottobolyos Aug 20, 2026
9585ff7
test(generator): mutated-XMI cross-verify of delta emission
ottobolyos Aug 20, 2026
51ebdca
fix(generator): drop stale ToolingMeasurement.Code inheritance override
ottobolyos Aug 20, 2026
b8b4d7f
test(generator): skip bin/obj generated files in byte-identity walks
ottobolyos Aug 20, 2026
8ac6657
chore(tests): adopt Stryker.NET mutation-testing framework
ottobolyos Aug 20, 2026
645c607
test(generator): CLI failure-path coverage for Program.cs
ottobolyos Aug 20, 2026
01b8879
test(generator): delta-mode Compat body + stats-line invariants
ottobolyos Aug 20, 2026
142e2fd
test(generator): relax malformed-XMI test to non-zero exit contract
ottobolyos Aug 20, 2026
190d9f6
fix(generator): delta emitter deletes stale UNCHANGED / REMOVED files
ottobolyos Aug 20, 2026
503b652
fix(tests): drain stdout/stderr concurrently + tighten TopicAnchors f…
ottobolyos Aug 20, 2026
e56895d
docs(generator): document delta CLI + Stryker gate + generator-tests …
ottobolyos Aug 20, 2026
de18ccb
chore(tests): exclude Stryker Regex mutator (upstream bug workaround)
ottobolyos Aug 20, 2026
0f060d5
chore(tests): pin Stryker threshold at 7.75% baseline; issue #242 tra…
ottobolyos Aug 20, 2026
ed23c5d
test(generator): pin stryker-config.json thresholds + JSONC-parser as…
ottobolyos Aug 20, 2026
51ef9b9
docs(testing): sync mutation-testing.md + Stryker.NET pin to cycle-2 …
ottobolyos Aug 20, 2026
b371942
docs(reference): regenerate cli.md for new sysml-import delta flags
ottobolyos Aug 20, 2026
528cc91
docs(testing): repoint out-of-docs code links to GitHub blob URLs
ottobolyos Aug 20, 2026
6e7ec8e
feat(sysml-import): zero-config PREV_VERSION auto-derive from MTConne…
ottobolyos Aug 21, 2026
40b7a0e
test(generator): cover zero-config PREV_VERSION auto-derive + adapt e…
ottobolyos Aug 21, 2026
d7a27c6
docs(sysml-import): document --new-xmi / --full-tree / zero-config au…
ottobolyos Aug 21, 2026
53119a1
test(generator): pin uncovered auto-derive + IsSafeCompatLabel arms
ottobolyos Aug 21, 2026
3625581
fix(sysml-import): strip C# comments before Max regex; unlie "(auto-d…
ottobolyos Aug 21, 2026
334e3e8
fix(docs-gen): bound RequireValue detection to current case block
ottobolyos Aug 21, 2026
ca2cb46
docs(reference): regenerate cli.md for auto-derive + full-tree flag s…
ottobolyos Aug 21, 2026
1fc3108
docs(sysml-import): rewrite CLI page for zero-config auto-derive default
ottobolyos Aug 21, 2026
94d33fa
test(sysml-import,docs-gen): extract SourceStripper + pin cycle-4 gaps
ottobolyos Aug 21, 2026
b2ea256
docs(sysml-import): fix AmE regression in cycle-4 rewrite
ottobolyos Aug 21, 2026
9aae425
refactor(sysml-import): drop SourceStripper for line-anchored regex —…
ottobolyos Aug 21, 2026
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
6 changes: 6 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"commands": [
"reportgenerator"
]
},
"dotnet-stryker": {
"version": "4.16.0",
"commands": [
"stryker"
]
}
}
}
11 changes: 11 additions & 0 deletions MTConnect.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTConnect.NET-Tests-Agents"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTConnect.NET-HTTP-Tests", "tests\MTConnect.NET-HTTP-Tests\MTConnect.NET-HTTP-Tests.csproj", "{3E89B860-A428-470C-8E48-0DDABC4027F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTConnect.NET-Generator-Tests", "tests\MTConnect.NET-Generator-Tests\MTConnect.NET-Generator-Tests.csproj", "{8B61CE3B-DC8A-47CE-A34B-38BC57DFFD57}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -509,6 +511,14 @@ Global
{3E89B860-A428-470C-8E48-0DDABC4027F0}.Package|Any CPU.Build.0 = Debug|Any CPU
{3E89B860-A428-470C-8E48-0DDABC4027F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E89B860-A428-470C-8E48-0DDABC4027F0}.Release|Any CPU.Build.0 = Release|Any CPU
{8B61CE3B-DC8A-47CE-A34B-38BC57DFFD57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B61CE3B-DC8A-47CE-A34B-38BC57DFFD57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B61CE3B-DC8A-47CE-A34B-38BC57DFFD57}.Docker|Any CPU.ActiveCfg = Debug|Any CPU
{8B61CE3B-DC8A-47CE-A34B-38BC57DFFD57}.Docker|Any CPU.Build.0 = Debug|Any CPU
{8B61CE3B-DC8A-47CE-A34B-38BC57DFFD57}.Package|Any CPU.ActiveCfg = Debug|Any CPU
{8B61CE3B-DC8A-47CE-A34B-38BC57DFFD57}.Package|Any CPU.Build.0 = Debug|Any CPU
{8B61CE3B-DC8A-47CE-A34B-38BC57DFFD57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B61CE3B-DC8A-47CE-A34B-38BC57DFFD57}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -565,6 +575,7 @@ Global
{17E64F59-0E62-4FCE-BEC4-EABBCF95B9A2} = {BBF53739-168D-4635-8595-083AC0C65E4C}
{AE09D1CA-5572-40BF-B984-74230E8634E1} = {14375E03-6BF8-45E6-B868-D2399368992B}
{3E89B860-A428-470C-8E48-0DDABC4027F0} = {14375E03-6BF8-45E6-B868-D2399368992B}
{8B61CE3B-DC8A-47CE-A34B-38BC57DFFD57} = {14375E03-6BF8-45E6-B868-D2399368992B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CC13D3AD-18BF-4695-AB2A-087EF0885B20}
Expand Down
11 changes: 8 additions & 3 deletions build/MTConnect.NET-DocsGen/CliInventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,15 @@ private static CliInfo CollectDotNetTool(string name, string file, string repoRo
if (headerDescs.TryGetValue(flagName, out var headerDesc)) desc = headerDesc;
desc ??= ExtractDotnetFlagDescription(text, flagName);

// Detect whether the case body calls `RequireValue` — if it
// does, the flag takes a value.
// Detect whether the case body calls `RequireValue` — if it does,
// the flag takes a value. The scan is bounded to the CURRENT case
// block only: it stops at the next `case "…":` label, a `default:`
// label, or a `break;` terminator, so a boolean flag whose case
// body sits above a value-taking case (like `--full-tree` above
// `case "--output": … RequireValue(…)`) does not falsely inherit
// the neighbour's value shape.
bool takesValue = Regex.IsMatch(text,
$@"case\s+""{Regex.Escape(flagName)}""\s*:[\s\S]{{0,200}}?RequireValue");
$@"case\s+""{Regex.Escape(flagName)}""\s*:(?:(?!\s*case\s+""|\s*default\s*:|\bbreak\s*;)[\s\S])*?RequireValue");
flags.Add(new CliFlag(
Name: flagName,
Short: null,
Expand Down
2 changes: 1 addition & 1 deletion build/MTConnect.NET-SysML-Import/CSharp/EnumModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public string RenderModel()
public string RenderDescriptions()
{
if (Values == null || Values.Count == 0) return null;
var template = TemplateLoader.LoadOrThrow("CSharp", "Templates", "EnumDescriptions.scriban");
var template = TemplateLoader.LoadOrThrow("CSharp", "Templates", "EnumOrStringDescriptions.scriban");
return template.Render(this);
}
}
Expand Down
10 changes: 9 additions & 1 deletion build/MTConnect.NET-SysML-Import/CSharp/EnumStringModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ internal class EnumStringModel : MTConnectEnumModel, ITemplateModel

public bool IsPartial { get; set; }

// Consumed by the Shape-B consolidated EnumOrStringDescriptions.scriban
// template: gates the class-doc wording, the Get(...) overload's
// parameter type (string vs. enum-typed), and the Get(...) doc summary.
// EnumModel and ObservationModel do NOT expose this — Scriban resolves
// a missing member as null (falsy), producing the enum-shape emission
// for those two callers.
public bool IsString => true;


public EnumStringModel() { }

Expand Down Expand Up @@ -88,7 +96,7 @@ public string RenderModel()

public string RenderDescriptions()
{
var template = TemplateLoader.LoadOrThrow("CSharp", "Templates", "EnumStringDescriptions.scriban");
var template = TemplateLoader.LoadOrThrow("CSharp", "Templates", "EnumOrStringDescriptions.scriban");
return template.Render(this);
}
}
Expand Down
6 changes: 5 additions & 1 deletion build/MTConnect.NET-SysML-Import/CSharp/MeasurementModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ public string RenderModel()
}

/// <inheritdoc />
public string RenderInterface() => null;
public string RenderInterface()
{
var template = TemplateLoader.LoadOrThrow("CSharp", "Templates", "Pallets.MeasurementInterface.scriban");
return template.Render(this);
}

/// <inheritdoc />
public string RenderDescriptions() => null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public string RenderModel()
/// <inheritdoc />
public string RenderDescriptions()
{
var template = TemplateLoader.LoadOrThrow("CSharp", "Templates", "EnumDescriptions.scriban");
var template = TemplateLoader.LoadOrThrow("CSharp", "Templates", "EnumOrStringDescriptions.scriban");
return template.Render(this);
}
}
Expand Down
27 changes: 13 additions & 14 deletions build/MTConnect.NET-SysML-Import/CSharp/TemplateRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -643,20 +643,19 @@ private static void MarkInheritedProperties(
break;

case "Assets.CuttingTools.ToolingMeasurement":
// ToolingMeasurement extends `Measurement` (the
// CuttingTools abstract Measurement base, NOT
// Assets.Pallet.Measurement). The CuttingTools
// Measurement.g.cs is hand-maintained / frozen —
// not produced by any current renderer flow — so
// it never enters the export-side ClassModel
// graph the inheritance walk traverses, and a
// Name-only lookup of "Measurement" resolves to
// Pallet.Measurement (which lacks Code). Class
// side only — IMeasurement.g.cs has `Code`
// commented out, so the interface child does NOT
// hide anything and emitting `new` there would
// produce CS0109 instead.
classOnlyNames.Add("Code");
// No hand-stitched inheritance seed needed. The
// Assets.CuttingTools.Measurement base IS produced
// by the current renderer flow (via
// MTConnectAssetInformationModel.ParseAssetInformationModel's
// sharedMeasurement injection which imports the
// Pallet Measurement class under Assets.CuttingTools),
// so the export-side ClassModel graph already carries
// its property list. The Pallet Measurement lacks
// Code, and the interface IMeasurement.g.cs likewise
// has Code commented out — hence emitting `new` on
// ToolingMeasurement.Code would raise CS0109 on both
// the class and interface sides. Fall through to the
// default inheritance walk with no override.
break;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
// Copyright (c) 2024 TrakHound Inc., All Rights Reserved.
// TrakHound Inc. licenses this file to you under the MIT license.
{{-# Shape-B consolidated Descriptions template. Valid for every MTConnect version. #}}
{{-# Covers both the enum-descriptions and the string-constant-descriptions callers. #}}
{{-# When is_string is truthy, the Get(...) overload takes a `string value` and the #}}
{{-# class doc reads "string constant" instead of "value"; when falsy, the Get(...) #}}
{{-# overload takes an enum-typed value and the class doc reads "value". #}}

namespace {{namespace}}
{
/// <summary>
/// Description text for each <see cref="{{name}}"/> value as defined by the MTConnect Standard.
/// Description text for each <see cref="{{name}}"/> {{ if is_string }}string constant{{ else }}value{{ end }} as defined by the MTConnect Standard.
/// </summary>
public static class {{name}}Descriptions
{
Expand All @@ -21,9 +26,9 @@ namespace {{namespace}}


/// <summary>
/// Returns the MTConnect Standard description text for the specified <see cref="{{name}}"/> value, or <c>null</c> when none is defined.
/// Returns the MTConnect Standard description text for the specified{{ if is_string }}{{ else }} <see cref="{{name}}"/>{{ end }} value, or <c>null</c> when none is defined.
/// </summary>
public static string Get({{name}} value)
public static string Get({{ if is_string }}string{{ else }}{{name}}{{ end }} value)
{
switch (value)
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2025 TrakHound Inc., All Rights Reserved.
// TrakHound Inc. licenses this file to you under the MIT license.

namespace {{namespace}}
{
/// <summary>
/// {{description}}
/// </summary>
public interface I{{name}} : IMeasurement
{
}
}
Loading