diff --git a/.editorconfig b/.editorconfig index 8b0b6ac..4dc7fd5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -499,5 +499,6 @@ dotnet_naming_rule.parameters_rule.severity = warning # Custom config for addressdata project [*.cs] -# Disable (ignore) CA1848 entirely -dotnet_diagnostic.CA1848.severity = none \ No newline at end of file +# TODO: Disabled warnings about logging. Feel free to re-enable them if you believe these warnings are valid. +dotnet_diagnostic.CA1848.severity = none +dotnet_diagnostic.CA1873.severity = none diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 919986d..b12ff2a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.x + dotnet-version: 10.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/LICENSE b/LICENSE index 4d4a4bf..e4fbe75 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 Ashton Abdiukov +Copyright (c) 2025-2026 Ashton Abdiukov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 6cfc9e8..4ade175 100644 --- a/README.md +++ b/README.md @@ -29,18 +29,17 @@ Currently, [AddressData.net](https://AddressData.net) contains millions of addre ### Using Visual Studio #### Requirements -- Visual Studio 2022 +- Visual Studio 2026 - With ASP.NET and web development installed from the Visual Studio Installer -- .NET 8 SDK -- Any Operating System +- .NET 10 SDK #### How to Run -1. Open the solution in Visual Studio 2022. +1. Open the solution in Visual Studio 2026. 2. Build and launch the AddressData.WebApi project. 3. The API can be accessed at [https://localhost:5280](https://localhost:5280). #### How to Test -1. Open the solution in Visual Studio 2022. +1. Open the solution in Visual Studio 2026. 2. Run the tests in Test Explorer. ## Usage @@ -50,9 +49,9 @@ Currently, [AddressData.net](https://AddressData.net) contains millions of addre - Navigate to [https://localhost:5280](https://localhost:5280). - Make a `POST` request to the `/documents/seed` endpoint. 3. **Monitor Output**: - - After a while, you’ll see a newly created folder structure (in your solution’s output directory) containing country and city CSV files with addresses. + - After a while, you'll see a newly created folder structure (in your solution's output directory) containing country and city CSV files with addresses. - Note that the *full* seeding process can take up to **1 day** to complete, depending on how many records you are collecting. - - If you’re in a hurry, you can provide a **limit** parameter in your POST request to `/documents/seed` to only generate a smaller subset of data. + - If you're in a hurry, you can provide a **limit** parameter in your POST request to `/documents/seed` to only generate a smaller subset of data. ## Acknowledgments diff --git a/src/AddressData.Core/AddressData.Core.csproj b/src/AddressData.Core/AddressData.Core.csproj index af50009..a1faace 100644 --- a/src/AddressData.Core/AddressData.Core.csproj +++ b/src/AddressData.Core/AddressData.Core.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable true @@ -11,7 +11,7 @@ - + diff --git a/src/AddressData.Core/Services/SeedingService.cs b/src/AddressData.Core/Services/SeedingService.cs index 9acf86e..364af2e 100644 --- a/src/AddressData.Core/Services/SeedingService.cs +++ b/src/AddressData.Core/Services/SeedingService.cs @@ -1,4 +1,5 @@ namespace AddressData.Core.Services; + using Interfaces; using Mappers; using Microsoft.Extensions.Logging; diff --git a/src/AddressData.WebApi/AddressData.WebApi.csproj b/src/AddressData.WebApi/AddressData.WebApi.csproj index eacfd96..7f10343 100644 --- a/src/AddressData.WebApi/AddressData.WebApi.csproj +++ b/src/AddressData.WebApi/AddressData.WebApi.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable Linux @@ -10,14 +10,14 @@ - + - - - - - - + + + + + + diff --git a/src/AddressData.WebApi/Dependency/ServiceRegistrations.cs b/src/AddressData.WebApi/Dependency/ServiceRegistrations.cs index 6126a88..dfa134b 100644 --- a/src/AddressData.WebApi/Dependency/ServiceRegistrations.cs +++ b/src/AddressData.WebApi/Dependency/ServiceRegistrations.cs @@ -4,7 +4,7 @@ namespace AddressData.WebApi.Dependency; using Core.Services; using Core.Services.Interfaces; using Microsoft.AspNetCore.Server.Kestrel.Core; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using OpenTelemetry.Resources; using OpenTelemetry.Trace; using Polly; diff --git a/src/AddressData.WebApi/Dockerfile b/src/AddressData.WebApi/Dockerfile index 0bead19..cf188d6 100644 --- a/src/AddressData.WebApi/Dockerfile +++ b/src/AddressData.WebApi/Dockerfile @@ -1,14 +1,15 @@ # See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. # This stage is used when running from VS in fast mode (Default for Debug configuration) -FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base USER $APP_UID WORKDIR /app EXPOSE 8080 EXPOSE 8081 + # This stage is used to build the service project -FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["src/AddressData.WebApi/AddressData.WebApi.csproj", "src/AddressData.WebApi/"] @@ -27,4 +28,4 @@ RUN dotnet publish "./AddressData.WebApi.csproj" -c $BUILD_CONFIGURATION -o /app FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "AddressData.WebApi.dll"] +ENTRYPOINT ["dotnet", "AddressData.WebApi.dll"] \ No newline at end of file diff --git a/src/AddressData.WebApi/Program.cs b/src/AddressData.WebApi/Program.cs index fda162a..0be9922 100644 --- a/src/AddressData.WebApi/Program.cs +++ b/src/AddressData.WebApi/Program.cs @@ -1,4 +1,5 @@ namespace AddressData.WebApi; + using Core; using Dependency; diff --git a/tests/AddressData.FunctionalTests/AddressData.FunctionalTests.csproj b/tests/AddressData.FunctionalTests/AddressData.FunctionalTests.csproj index b9db6cd..ce30d0c 100644 --- a/tests/AddressData.FunctionalTests/AddressData.FunctionalTests.csproj +++ b/tests/AddressData.FunctionalTests/AddressData.FunctionalTests.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 enable enable AddressData.FunctionalTests @@ -13,13 +13,13 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - - + + - + diff --git a/tests/AddressData.UnitTests/AddressData.UnitTests.csproj b/tests/AddressData.UnitTests/AddressData.UnitTests.csproj index 217d74a..58ffdea 100644 --- a/tests/AddressData.UnitTests/AddressData.UnitTests.csproj +++ b/tests/AddressData.UnitTests/AddressData.UnitTests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable false @@ -11,11 +11,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/AddressData.UnitTests/Services/DocumentServiceTests.cs b/tests/AddressData.UnitTests/Services/DocumentServiceTests.cs index 53088c1..654905a 100644 --- a/tests/AddressData.UnitTests/Services/DocumentServiceTests.cs +++ b/tests/AddressData.UnitTests/Services/DocumentServiceTests.cs @@ -1,4 +1,5 @@ namespace AddressData.UnitTests.Services; + using AddressData.Core.Models.Domain; using AddressData.Core.Services; using NUnit.Framework; diff --git a/tests/AddressData.UnitTests/Services/OverpassTurboServiceTests.cs b/tests/AddressData.UnitTests/Services/OverpassTurboServiceTests.cs index 8a82e6b..bf8b2e8 100644 --- a/tests/AddressData.UnitTests/Services/OverpassTurboServiceTests.cs +++ b/tests/AddressData.UnitTests/Services/OverpassTurboServiceTests.cs @@ -1,4 +1,5 @@ namespace AddressData.UnitTests.Services; + using AddressData.Core.Services; using AddressData.UnitTests.Helpers; using Microsoft.Extensions.Logging; diff --git a/tests/AddressData.UnitTests/Services/SeedingServiceTests.cs b/tests/AddressData.UnitTests/Services/SeedingServiceTests.cs index e9edc5e..0017136 100644 --- a/tests/AddressData.UnitTests/Services/SeedingServiceTests.cs +++ b/tests/AddressData.UnitTests/Services/SeedingServiceTests.cs @@ -1,4 +1,5 @@ namespace AddressData.UnitTests.Services; + using System.Collections; using System.ComponentModel.DataAnnotations; using AddressData.Core.Models.Domain;