Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
021adcc
refactor: bump xunit, OpenTelemetry and System.CommandLine packages
rlvelte Nov 23, 2026
5d2c701
refactor: add POST request support to the shared client base
rlvelte Nov 23, 2026
4819fa6
refactor: accept JA as true in the Bahn dialect converter
rlvelte Nov 23, 2026
585b2c5
refactor: add the DotBahn.Boards project with DI registration
rlvelte Nov 23, 2026
a542dea
refactor: add OpenBoards internal wire contracts
rlvelte Nov 23, 2026
83c5d80
refactor: add public board domain models
rlvelte Nov 23, 2026
6826cf8
refactor: add source-generated JSON context for board contracts
rlvelte Nov 23, 2026
f480a14
refactor: add fluent BoardQuery and request mapping
rlvelte Nov 23, 2026
3925475
refactor: add arrival and departure board transformers
rlvelte Nov 23, 2026
a2f858c
refactor: add BoardsClient for OpenBoards arrival/departure queries
rlvelte Nov 23, 2026
896e2e0
refactor: add the DotBahn.Boards test project
rlvelte Nov 23, 2026
3607de3
refactor: mark the Timetables API obsolete
rlvelte Nov 23, 2026
6b2ad33
refactor: remove stray blank line in facilities service registration
rlvelte Nov 23, 2026
0634118
refactor: migrate dbpeek sample to the OpenBoards API
rlvelte Nov 23, 2026
a810419
refactor: document Boards and deprecate Timetables in the README
rlvelte Nov 23, 2026
6e52ae1
refactor: refresh package versions and tooling configuration
rlvelte Nov 23, 2026
f87c62f
refactor: consolidate exception documentation across clients
rlvelte Nov 23, 2026
5f3553b
refactor: add AI tool telemetry to shared telemetry surface
rlvelte Nov 23, 2026
718fca7
refactor: add provider-neutral AI tool layer
rlvelte Nov 23, 2026
371c8b2
refactor: add local chatbot sample
rlvelte Nov 23, 2026
b86faa0
refactor: wrap sample CLIs in dedicated namespaces
rlvelte Nov 23, 2026
ecd8849
refactor: add structured boards test coverage
rlvelte Nov 23, 2026
1a0334c
refactor: update deps
robinleandrovelte Nov 24, 2026
c4fd96c
refactor: unified summaries
robinleandrovelte Nov 25, 2026
6887d12
refactor: make http error handleing more generic
robinleandrovelte Nov 25, 2026
c3cc39f
refactor: make http error handleing more generic
robinleandrovelte Nov 25, 2026
e1715df
refactor: make http error handleing more generic
robinleandrovelte Nov 25, 2026
420c91b
refactor: update versions
robinleandrovelte Nov 25, 2026
4762e66
refactor: add vulcheck to makefile
robinleandrovelte Nov 25, 2026
adccdbd
refactor: update packages
rlvelte Nov 25, 2026
92f61ab
refactor: update packages
rlvelte Nov 25, 2026
d234ea2
refactor: update packages
rlvelte Nov 25, 2026
1a782ea
refactor: update code-style
rlvelte Nov 25, 2026
9d8188e
refactor: update code-style
rlvelte Nov 25, 2026
f1b88c8
refactor: prepare large unit test rewrite to adapt to larger scope an…
rlvelte Nov 26, 2026
7ef7949
refactor: start with common test suite to get back on track
rlvelte Nov 26, 2026
8748d8e
refactor: start with common test suite to get back on track
rlvelte Nov 26, 2026
27755c0
refactor: start with common test suite to get back on track
rlvelte Nov 26, 2026
a49430e
refactor: apply improvements to the build process regarding IL packages
rlvelte Nov 26, 2026
784d06c
refactor: add stryker config options and format
rlvelte Nov 26, 2026
54e318d
refactor: add stryker config options and format
rlvelte Nov 26, 2026
a2d3a57
refactor: add common tests
rlvelte Nov 28, 2026
ff04460
refactor: add station tests
rlvelte Nov 28, 2026
4832ecc
refactor: add facility tests
rlvelte Nov 28, 2026
7cbd73d
refactor: add timetable tests
rlvelte Nov 28, 2026
4fd45c2
refactor: add borads tests
rlvelte Nov 28, 2026
e5ff1cf
refactor: timezone adjustments for ci
rlvelte Nov 28, 2026
693185a
refactor: timezone adjustments for ci
rlvelte Nov 28, 2026
e2bf45a
refactor: timezone adjustments for ci
rlvelte Nov 28, 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
63 changes: 62 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,65 @@ csharp_style_pattern_matching_over_is_with_cast_check = true
csharp_style_pattern_matching_over_as_with_null_check = true
csharp_style_inlined_variable_declaration = true
csharp_style_var_for_built_in_types = true
csharp_style_var_when_type_is_apparent = true
csharp_style_var_when_type_is_apparent = true
csharp_style_var_elsewhere = true

# Namespaces & usings
csharp_style_namespace_declarations = file_scoped
csharp_using_directive_placement = outside_namespace

# Qualification & accessibility
dotnet_style_qualification_for_field = false
dotnet_style_qualification_for_property = false
dotnet_style_qualification_for_method = false
dotnet_style_qualification_for_event = false
dotnet_style_require_accessibility_modifiers = for_non_interface_members
dotnet_style_readonly_field = true

# Modern expressions & initializers
dotnet_style_coalesce_expression = true
dotnet_style_null_propagation = true
dotnet_style_object_initializer = true
dotnet_style_collection_initializer = true
dotnet_style_prefer_auto_properties = true
csharp_prefer_simple_using_statement = true
csharp_style_prefer_collection_expression = true

# Naming: private instance fields -> _camelCase
dotnet_naming_rule.private_instance_fields.symbols = private_instance_fields
dotnet_naming_rule.private_instance_fields.style = underscore_camel_case
dotnet_naming_rule.private_instance_fields.severity = suggestion
dotnet_naming_symbols.private_instance_fields.applicable_kinds = field
dotnet_naming_symbols.private_instance_fields.applicable_accessibilities = private

# Naming: private const fields -> PascalCase
dotnet_naming_rule.private_const_fields.symbols = private_const_fields
dotnet_naming_rule.private_const_fields.style = pascal_case
dotnet_naming_rule.private_const_fields.severity = suggestion
dotnet_naming_symbols.private_const_fields.applicable_kinds = field
dotnet_naming_symbols.private_const_fields.applicable_accessibilities = private
dotnet_naming_symbols.private_const_fields.required_modifiers = const

# Naming: private static readonly fields -> PascalCase
dotnet_naming_rule.private_static_readonly_fields.symbols = private_static_readonly_fields
dotnet_naming_rule.private_static_readonly_fields.style = pascal_case
dotnet_naming_rule.private_static_readonly_fields.severity = suggestion
dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = static, readonly

# Naming: interfaces -> I-prefixed PascalCase
dotnet_naming_rule.interfaces.symbols = interfaces
dotnet_naming_rule.interfaces.style = i_prefix_pascal_case
dotnet_naming_rule.interfaces.severity = suggestion
dotnet_naming_symbols.interfaces.applicable_kinds = interface
dotnet_naming_style.i_prefix_pascal_case.capitalization = pascal_case
dotnet_naming_style.i_prefix_pascal_case.required_prefix = I

dotnet_naming_style.underscore_camel_case.capitalization = camel_case
dotnet_naming_style.underscore_camel_case.required_prefix = _
dotnet_naming_style.pascal_case.capitalization = pascal_case

# Sample top-level programs require block-scoped namespaces.
[samples/**/Program.cs]
csharp_style_namespace_declarations = block_scoped
6 changes: 4 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ jobs:
- name: Setup .NET 10
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6
with:
dotnet-version: '10.0.x'
global-json-file: global.json
cache: true
cache-dependency-path: '**/packages.lock.json'

- name: Restore
run: dotnet restore DotBahn.slnx --locked-mode
run: |
dotnet restore DotBahn.slnx --force-evaluate
git diff --exit-code -- '**/packages.lock.json'

- name: Format check
run: dotnet format DotBahn.slnx --verify-no-changes --verbosity diagnostic
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ jobs:
- name: Setup .NET 10
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6
with:
dotnet-version: '10.0.x'
global-json-file: global.json
cache: true
cache-dependency-path: '**/packages.lock.json'

- name: Restore
run: dotnet restore DotBahn.slnx --locked-mode
run: |
dotnet restore DotBahn.slnx --force-evaluate
git diff --exit-code -- '**/packages.lock.json'

- name: Pack NuGet
run: dotnet pack DotBahn.slnx --no-restore --configuration Release --output ./nupkgs
Expand Down Expand Up @@ -85,13 +87,14 @@ jobs:
- name: Setup .NET 10
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6
with:
dotnet-version: '10.0.x'
global-json-file: global.json
cache: true
cache-dependency-path: '**/packages.lock.json'

- name: Build library (produces XML doc files)
run: |
dotnet restore DotBahn.slnx --locked-mode
dotnet restore DotBahn.slnx --force-evaluate
git diff --exit-code -- '**/packages.lock.json'
dotnet build DotBahn.slnx --no-restore --configuration Release

- name: Build docs
Expand Down Expand Up @@ -169,12 +172,13 @@ jobs:
- name: Setup .NET 10
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6
with:
dotnet-version: '10.0.x'
global-json-file: global.json

- name: Generate dependency SBOM
run: |
dotnet tool restore
dotnet restore DotBahn.slnx --locked-mode
dotnet restore DotBahn.slnx --force-evaluate
git diff --exit-code -- '**/packages.lock.json'
dotnet cyclonedx DotBahn.slnx -o ./build/sbom -F Json

- name: Download packages
Expand All @@ -184,7 +188,7 @@ jobs:
path: ./nupkgs

- name: Create GitHub Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3
uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
Expand Down
16 changes: 4 additions & 12 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<Deterministic>true</Deterministic>
<Optimize>true</Optimize>
<ImplicitUsings>enable</ImplicitUsings>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsAotCompatible>true</IsAotCompatible>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>

Expand All @@ -36,7 +36,7 @@
<PackageProjectUrl>https://github.com/rlvelte/dotbahn</PackageProjectUrl>
<RepositoryUrl>https://github.com/rlvelte/dotbahn</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>db;bahn;client;deutschebahn;deutsche-bahn;api;rest;http;dotnet;net10;stations;facilities;timetables;client-library</PackageTags>
<PackageTags>db;bahn;client;deutschebahn;deutsche-bahn;api;rest;http;dotnet;net10;stations;facilities;timetables;boards;ai</PackageTags>
<Copyright>Copyright (c) Robin L. Velte 2026</Copyright>
<PackageIcon>icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand All @@ -58,16 +58,8 @@
<PackageReference Include="MinVer" PrivateAssets="all" />
</ItemGroup>

<!-- GitHub -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<!-- Test projects -->
<PropertyGroup Condition="'$(MSBuildProjectName.EndsWith(`.Tests`))' OR '$(MSBuildProjectDirectory.Contains(`tests`))'">
<!-- Test/Benchmark projects -->
<PropertyGroup Condition="'$(MSBuildProjectName.Contains(`Tests`))' OR '$(MSBuildProjectName.Contains(`Benchmarks`))'">
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<IsAotCompatible>false</IsAotCompatible>
Expand Down
45 changes: 30 additions & 15 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,36 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.14" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="10.11.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.14" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.403" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.12.0" />
<PackageVersion Include="Spectre.Console" Version="0.57.2" />
<PackageVersion Include="System.CommandLine" Version="2.0.14" />
<!-- General -->
<PackageVersion Include="MinVer" Version="8.0.0" />
<PackageVersion Include="xunit.v3" Version="4.0.2" />
<PackageVersion Include="xunit.v3.runner.common" Version="4.0.2" />
<PackageVersion Include="Moq" Version="4.21.0" />
<PackageVersion Include="OpenTelemetry" Version="1.20.1" />
<PackageVersion Include="OpenTelemetry.Api.ProviderBuilderExtensions" Version="1.20.1" />
<PackageVersion Include="OpenTelemetry.Exporter.InMemory" Version="1.20.1" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.20.1" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.20.1" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="11.0.0" />

<!-- Samples -->
<PackageVersion Include="Spectre.Console" Version="0.57.2" />
<PackageVersion Include="System.CommandLine" Version="3.0.0" />

<!-- Http -->
<PackageVersion Include="Microsoft.Extensions.Http" Version="11.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="11.0.1" />

<!-- Testing -->
<PackageVersion Include="xunit.v3" Version="4.0.3" />
<PackageVersion Include="xunit.v3.runner.common" Version="4.0.3" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
<PackageVersion Include="NSubstitute" Version="6.2.0" />
<PackageVersion Include="Shouldly" Version="4.3.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.12.0" />

<!-- OpenTelemetry-->
<PackageVersion Include="OpenTelemetry" Version="1.21.0" />
<PackageVersion Include="OpenTelemetry.Api.ProviderBuilderExtensions" Version="1.21.0" />
<PackageVersion Include="OpenTelemetry.Exporter.InMemory" Version="1.21.0" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.21.0" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.21.0" />

<!-- AI -->
<PackageVersion Include="Microsoft.Extensions.AI" Version="11.0.1" />
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="11.0.1" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="11.0.1" />
</ItemGroup>
</Project>
28 changes: 18 additions & 10 deletions DotBahn.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
<File Path="Directory.Packages.props" />
<File Path="Makefile" />
</Folder>
<Folder Name="/Configuration/Scripts/">
<File Path="scripts/publish.ps1" />
<File Path="scripts/publish.sh" />
<File Path="scripts/rpm.sh" />
</Folder>
<Folder Name="/Documentation/">
<File Path="docs/docfx.json" />
<File Path="docs/toc.yml" />
Expand All @@ -15,23 +20,26 @@
<Project Path="source/DotBahn.Facilities/DotBahn.Facilities.csproj" />
<Project Path="source/DotBahn.Stations/DotBahn.Stations.csproj" />
<Project Path="source/DotBahn.Timetables/DotBahn.Timetables.csproj" />
<Project Path="source/DotBahn.Boards/DotBahn.Boards.csproj" />
</Folder>
<Folder Name="/Packages/Additional/">
<Project Path="source/DotBahn.Ai/DotBahn.Ai.csproj" />
<Project Path="source/DotBahn.Common/DotBahn.Common.csproj" />
<Project Path="source/DotBahn.Telemetry/DotBahn.Telemetry.csproj" />
</Folder>
<Folder Name="/Samples/">
<Project Path="samples/DotBahn.Samples.TimetablePeek/DotBahn.Samples.TimetablePeek.csproj" />
<Project Path="samples/DotBahn.Samples.StationBrowser/DotBahn.Samples.StationBrowser.csproj" />
</Folder>
<Folder Name="/Scripts/">
<File Path="scripts/publish.ps1" />
<File Path="scripts/publish.sh" />
<File Path="scripts\rpm.sh" />
<Project Path="samples/DotBahn.Samples.Chatbot/DotBahn.Samples.Chatbot.csproj" />
</Folder>
<Folder Name="/Tests/">
<Project Path="tests/DotBahn.Common.Tests/DotBahn.Common.Tests.csproj" />
<Project Path="tests/DotBahn.Facilities.Tests/DotBahn.Facilities.Tests.csproj" />
<Project Path="tests/DotBahn.Stations.Tests/DotBahn.Stations.Tests.csproj" />
<Project Path="tests/DotBahn.Telemetry.Tests/DotBahn.Telemetry.Tests.csproj" />
<Project Path="tests/DotBahn.Timetables.Tests/DotBahn.Timetables.Tests.csproj" />
<Project Path="tests/DotBahn.Tests.Boards/DotBahn.Tests.Boards.csproj" />
<Project Path="tests/DotBahn.Tests.Facilities/DotBahn.Tests.Facilities.csproj" />
<Project Path="tests/DotBahn.Tests.Stations/DotBahn.Tests.Stations.csproj" />
<Project Path="tests/DotBahn.Tests.Timetables/DotBahn.Tests.Timetables.csproj" />
<Project Path="tests\DotBahn.Tests.Common\DotBahn.Tests.Common.csproj" />
</Folder>
<Folder Name="/Tests/Additional/">
<Project Path="tests/DotBahn.Tests.Shared/DotBahn.Tests.Shared.csproj" />
</Folder>
</Solution>
55 changes: 27 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ NUGET_PACKAGES_DIR ?=

# Out
RESULTS_DIR := ./build/tests
BENCH_DIR := ./build/benchmarks
MUTATE_DIR := ./build/mutations
NUPKG_DIR := ./build/nupkgs
PUBLISH_DIR := ./build/publish
RPM_DIR := ./build/rpm
Expand All @@ -29,20 +31,24 @@ export RPM_DIR

# Main
.DEFAULT_GOAL := build
.PHONY: format restore sbom build test coverage pack publish rpm mutate
.PHONY: format restore vulcheck sbom build test mutate pack publish rpm

format:
dotnet format whitespace $(SOLUTION) \
--verbosity diagnostic
dotnet format $(SOLUTION) \
--verbosity diagnostic

restore:
dotnet restore $(SOLUTION) \
$(if $(NUGET_PACKAGES_DIR),--packages $(NUGET_PACKAGES_DIR),) \
--force-evaluate \
--verbosity minimal

sbom: restore
vulcheck:
dotnet list $(SOLUTION) package \
--vulnerable \
--include-transitive

sbom:
dotnet cyclonedx $(SOLUTION) \
-o $(SBOM_DIR) \
-F Json
Expand All @@ -54,47 +60,40 @@ build: restore

test: build
dotnet test --solution $(SOLUTION) \
--no-build \
--configuration $(CONFIGURATION) \
--results-directory $(RESULTS_DIR) \
-- --coverage --coverage-output-format cobertura --ignore-exit-code 8
--no-build \
-- --coverage --coverage-output-format cobertura

coverage: test
dotnet reportgenerator \
-reports:$(RESULTS_DIR)/**/*.cobertura.xml \
-targetdir:$(RESULTS_DIR)/coverage \
-reporttypes:Html \
-verbosity:Warning \
-filefilters:-**/*.g.cs
@echo "file://$(CURDIR)/$(RESULTS_DIR)/coverage/index.html"
mutate: export MinVerVersionOverride = 1.0.0
mutate: build
mkdir -p $(MUTATE_DIR)
dotnet stryker \
--output $(MUTATE_DIR)

pack:
pack: build
dotnet pack $(SOLUTION) \
--configuration $(CONFIGURATION) \
--output $(NUPKG_DIR) \
--no-build \
--verbosity minimal

publish:
$(RUN) scripts/publish$(EXT)

rpm: publish
rpm:
ifeq ($(OS),Windows_NT)
@echo "RPM packaging requires 'rpmbuild'." >&2
@echo "Windows does not support 'rpmbuild'." >&2
else
$(RUN) scripts/rpm$(EXT)
endif

# Documentation
docs-build: build
dotnet docfx docs/docfx.json

docs-serve: build
dotnet docfx docs/docfx.json --serve

# Utility
clean:
dotnet clean $(SOLUTION) \
--configuration $(CONFIGURATION) \
--verbosity minimal
ifeq ($(OS),Windows_NT)
pwsh -NoProfile -Command "Remove-Item -Recurse -Force -ErrorAction SilentlyContinue build, StrykerOutput, docs/_site, docs/api"
powershell -NoProfile -Command "Remove-Item -Recurse -Force -ErrorAction SilentlyContinue build, docs/_site, docs/api"
else
rm -rf build StrykerOutput docs/_site docs/api
endif
rm -rf build docs/_site docs/api
endif
Loading