This repository was archived by the owner on Jul 2, 2026. It is now read-only.
Repository navigation
refactor: reorganiza estrutura, migra para .slnx/TUnit e adiciona .NET 10 - #5
Merged
Merged
Conversation
…T 10 Reorganização da estrutura: - Move o solution, dotnet-releaser.toml e CLAUDE.md para o root - src/ passa a conter apenas a biblioteca; tests/, samples/ e benchmark/ no root - Remove o projeto órfão DotTerritory.GeoJson e lixo de build (src/src, .idea, .DS_Store) Migração de testes: - xUnit + Shouldly -> TUnit 1.56.25 (asserções nativas async) - Consolida os testes do root no projeto de testes; descarta 28 testes nunca validados com expectativas inválidas (premissa planar vs cálculo geográfico) Solução e frameworks: - Substitui DotTerritory.sln por DotTerritory.slnx - Lib multi-targeta net8.0;net9.0;net10.0; tests/samples/benchmark em net10.0 - Adiciona global.json fixando o SDK 10.0.301 Tooling e CI: - dotnet-releaser 0.11.0 -> 0.21.0 (suporte a .slnx e Microsoft.Testing.Platform) - csharpier 0.30.6 -> 1.3.0; tools fixadas no manifest, CI usa dotnet tool restore - Actions: checkout@v5, setup-dotnet@v5; SDKs 8.0.x/9.0.x/10.0.x - Testes rodam em passo dedicado do CI (dotnet run, TUnit/MTP); [test] enable=false no releaser
Contributor
There was a problem hiding this comment.
Pull request overview
Este PR reorganiza o repositório para a convenção padrão .NET, migra/centraliza a suíte de testes para TUnit (Microsoft.Testing.Platform), troca a solution para .slnx, adiciona suporte ao .NET 10 e atualiza tooling/CI para acompanhar essas mudanças.
Changes:
- Reestrutura pastas (root +
src//tests//samples//benchmark/) e substitui.slnpor.slnx. - Migra testes de xUnit/Shouldly para TUnit, consolidando e atualizando casos (146 testes).
- Atualiza CI (actions, SDKs, tool restore) e tooling (
dotnet-releaser,csharpier), adicionandoglobal.json.
Reviewed changes
Copilot reviewed 66 out of 81 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .config/dotnet-tools.json | Atualiza versões de dotnet-releaser e csharpier no manifest e ajusta comando do csharpier. |
| .github/workflows/publish.yml | Migra para checkout/setup-dotnet v5, instala SDKs 8/9/10, restaura .slnx, roda testes via dotnet run e executa dotnet-releaser. |
| CLAUDE.md | Adiciona guia de dev (atualmente ainda com instruções desatualizadas sobre testes/paths). |
| DotTerritory.slnx | Introduz solution .slnx referenciando projetos na nova estrutura. |
| benchmark/TimeAndMemoryUsage/DotTerritoryAngleBenchmark.cs | Adiciona novos benchmarks de ângulo. |
| benchmark/TimeAndMemoryUsage/DotTerritoryBench.cs | Ajustes de formatação/modernização do setup do benchmark. |
| benchmark/TimeAndMemoryUsage/Program.cs | Entry-point para executar benchmarks via BenchmarkDotNet. |
| benchmark/TimeAndMemoryUsage/TimeAndMemoryUsage.csproj | Recria projeto de benchmark no root e migra para net10.0. |
| dotnet-releaser.toml | Atualiza releaser para apontar para .slnx e desabilita execução de testes no releaser. |
| global.json | Fixa SDK em 10.0.301 para builds consistentes. |
| plans/migrate-slnx-and-net10.md | Documenta o plano/execução de migração para .slnx e .NET 10/CI/tooling. |
| plans/reorganize-project-structure.md | Documenta o plano/execução de reorganização estrutural e migração de testes. |
| samples/DotTerritory.Playground/DotTerritory.Playground.csproj | Move/amplia playground para net10.0 e ajusta ProjectReference para src/. |
| samples/DotTerritory.Playground/Program.cs | Adiciona programa de playground no novo local. |
| src/DotTerritory/DotTerritory.csproj | Lib passa a multi-target net8.0;net9.0;net10.0 e normaliza formatação. |
| src/DotTerritory/Territory.BboxPolygon.cs | Ajustes de formatação (coleções/LinearRing). |
| src/DotTerritory/Territory.CleanCoords.cs | Ajustes de whitespace/formatação. |
| src/DotTerritory/Territory.FeatureCollection.cs | Ajuste de formatação/assinatura (quebra de linha). |
| src/DotTerritory/Territory.Isobands.cs | Ajustes de whitespace/formatação. |
| src/DotTerritory/Territory.Isolines.cs | Ajustes de whitespace/formatação. |
| src/DotTerritory/Territory.Voronoi.cs | Ajustes de whitespace/formatação. |
| src/DotTerritory.GeoJson/Converters/TerritoryToGeoJsonConverter.cs | Remoção do projeto/pasta GeoJson órfão. |
| src/DotTerritory.GeoJson/Models/Feature.cs | Remoção do projeto/pasta GeoJson órfão. |
| src/DotTerritory.GeoJson/Models/FeatureCollection.cs | Remoção do projeto/pasta GeoJson órfão. |
| src/DotTerritory.GeoJson/Models/GeoJsonGeometry.cs | Remoção do projeto/pasta GeoJson órfão. |
| src/DotTerritory.GeoJson/Models/GeoJsonObject.cs | Remoção do projeto/pasta GeoJson órfão. |
| src/DotTerritory.GeoJson/Models/Point.cs | Remoção do projeto/pasta GeoJson órfão. |
| src/DotTerritory.GeoJson/Models/Polygon.cs | Remoção do projeto/pasta GeoJson órfão. |
| src/DotTerritory.sln | Remove a solution .sln antiga. |
| src/benchmark/TimeAndMemoryUsage/TimeAndMemoryUsage.csproj | Remove projeto antigo de benchmark sob src/. |
| src/dotnet-releaser.toml | Remove configuração antiga do releaser sob src/. |
| src/samples/DotTerritory.Playground/DotTerritory.Playground.csproj | Remove csproj antigo do playground sob src/. |
| src/tests/DotTerritory.Tests/BooleanContainsTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/BooleanDisjointTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/BooleanEqualTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/BooleanIntersectsTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/BooleanOverlapTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/BooleanPointInPolygonTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/BooleanTouchesTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/BooleanWithinTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/BBoxPolygonTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/BBoxTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/CleanCoordsTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/CenterTest.cs | Remove testes antigos sob src/tests (consolidação no novo projeto tests/). |
| src/tests/DotTerritory.Tests/DotTerritory.Tests.csproj | Remove csproj antigo do projeto de testes sob src/tests (migração para TUnit no root). |
| src/tests/DotTerritory.Tests/GlobalUsings.cs | Remove global usings antigos (xUnit/Shouldly) do projeto de testes antigo. |
| tests/DotTerritory.Tests/AreaTest.cs | Migra teste para TUnit e atualiza asserts. |
| tests/DotTerritory.Tests/BBoxClipTest.cs | Migra teste para TUnit e atualiza asserts. |
| tests/DotTerritory.Tests/BBoxPolygonTest.cs | Adiciona/migra teste (agora compilando no projeto consolidado) para TUnit. |
| tests/DotTerritory.Tests/BBoxTest.cs | Adiciona/migra teste (agora compilando no projeto consolidado) para TUnit. |
| tests/DotTerritory.Tests/BooleanClockwiseTests.cs | Migra teste para TUnit e atualiza asserts/throws. |
| tests/DotTerritory.Tests/BooleanContainsTest.cs | Adiciona/migra testes para TUnit. |
| tests/DotTerritory.Tests/BooleanCrossesTest.cs | Migra teste para TUnit e moderniza inicialização de geometrias. |
| tests/DotTerritory.Tests/BooleanDisjointTest.cs | Adiciona/migra testes para TUnit. |
| tests/DotTerritory.Tests/BooleanEqualTest.cs | Adiciona/migra testes para TUnit. |
| tests/DotTerritory.Tests/BooleanIntersectsTest.cs | Adiciona/migra testes para TUnit. |
| tests/DotTerritory.Tests/BooleanOverlapTest.cs | Adiciona/migra testes para TUnit. |
| tests/DotTerritory.Tests/BooleanParallelTests.cs | Migra teste para TUnit e remove casos inválidos do conjunto órfão. |
| tests/DotTerritory.Tests/BooleanPointInPolygonTest.cs | Adiciona/migra testes para TUnit (inclui asserts de exceção). |
| tests/DotTerritory.Tests/BooleanPointOnLineTest.cs | Migra teste para TUnit e moderniza inicialização de LineString. |
| tests/DotTerritory.Tests/BooleanTouchesTest.cs | Adiciona/migra testes para TUnit. |
| tests/DotTerritory.Tests/BooleanWithinTest.cs | Adiciona/migra testes para TUnit. |
| tests/DotTerritory.Tests/CleanCoordsTest.cs | Adiciona/migra testes para TUnit e ajusta casos para comportamento atual. |
| tests/DotTerritory.Tests/CenterTest.cs | Adiciona/migra testes para TUnit. |
| tests/DotTerritory.Tests/CentroidTest.cs | Migra teste para TUnit e moderniza inicialização de geometrias. |
| tests/DotTerritory.Tests/DotTerritory.Tests.csproj | Recria projeto de testes em TUnit/MTP no root e migra para net10.0. |
| tests/DotTerritory.Tests/EnvelopeTests.cs | Migra teste para TUnit. |
| tests/DotTerritory.Tests/ExplodeTests.cs | Migra teste para TUnit e atualiza APIs NTS (Coordinates vs GetCoordinateN). |
| tests/DotTerritory.Tests/GlobalUsings.cs | Adiciona global usings para NTS/UnitsNet no projeto de testes consolidado. |
| tests/DotTerritory.Tests/LineIntersectTests.cs | Migra para TUnit; ajusta nullability (null!) e asserts. |
| tests/DotTerritory.Tests/LineSliceAlongTests.cs | Remove arquivo de teste órfão considerado inválido. |
| tests/DotTerritory.Tests/PointOnFeatureTests.cs | Migra/ajusta para TUnit e atualiza API NTS de MultiPoint. |
| tests/DotTerritory.Tests/PointToLineDistanceTests.cs | Migra para TUnit e remove casos órfãos inválidos. |
| tests/DotTerritory.Tests/PointToPolygonDistanceTests.cs | Migra para TUnit e remove casos órfãos inválidos. |
| tests/DotTerritory.Tests/PolygonSmoothTest.cs | Migra para TUnit e moderniza inicialização de polígono. |
| tests/DotTerritory.Tests/ProjectionTest.cs | Migra para TUnit e expande asserts com Within(...). |
| tests/DotTerritory.Tests/RhumbDestinationTests.cs | Migra para TUnit e remove casos órfãos inválidos. |
| tests/DotTerritory.Tests/RhumbDistanceTests.cs | Migra para TUnit e remove casos órfãos inválidos. |
| tests/DotTerritory.Tests/SimplifyTests.cs | Migra para TUnit e desambigua overloads (highQuality: false). |
| tests/DotTerritory.Tests/SquareTests.cs | Migra para TUnit e atualiza asserts. |
| tests/DotTerritory.Tests/WalkAlongTest.cs | Migra para TUnit e substitui ShouldSatisfyAllConditions por asserts sequenciais. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+40
to
+42
| - name: Build, Pack and Publish (on push tag) | ||
| shell: bash | ||
| run: dotnet-releaser run --force --nuget-token "${{secrets.NUGET_TOKEN}}" --github-token "${{secrets.GITHUB_TOKEN}}" src/dotnet-releaser.toml | ||
| run: dotnet dotnet-releaser run --force --nuget-token "${{secrets.NUGET_TOKEN}}" --github-token "${{secrets.GITHUB_TOKEN}}" dotnet-releaser.toml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Reorganiza a estrutura do repositório, migra a suíte de testes para TUnit, substitui o
.slnpelo.slnx, adiciona suporte ao .NET 10 e moderniza o tooling/CI.Mudanças
Estrutura (convenção .NET)
dotnet-releaser.tomleCLAUDE.mdmovidos para o rootsrc/contém apenas a biblioteca;tests/,samples/ebenchmark/em pastas próprias no rootDotTerritory.GeoJsone lixo de build (src/src,.idea,.DS_Store)Testes → TUnit
Solução e frameworks
DotTerritory.sln→DotTerritory.slnxnet8.0;net9.0;net10.0;tests/samples/benchmarkemnet10.0global.jsonfixando o SDK10.0.301Tooling e CI
dotnet-releaser0.11.0 → 0.21.0 (suporte a.slnxe Microsoft.Testing.Platform);csharpier0.30.6 → 1.3.0dotnet tool restoreactions/checkout@v5,actions/setup-dotnet@v5; SDKs8.0.x/9.0.x/10.0.xdotnet run, TUnit/MTP);[test] enable=falseno releaserValidação local
dotnet-releaser buildgeraDotTerritory.0.8.0.nupkgcsharpier checkOKNotas
0.8.0.plans/.