From 17ef8c8871a383ae125a67f2b2647e4cdffeb451 Mon Sep 17 00:00:00 2001 From: SNS Date: Tue, 15 Jul 2025 15:41:27 +0800 Subject: [PATCH 1/4] Fix Address missing District data --- src/Nominatim.API/Models/AddressResult.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Nominatim.API/Models/AddressResult.cs b/src/Nominatim.API/Models/AddressResult.cs index 21887eb..de626b5 100644 --- a/src/Nominatim.API/Models/AddressResult.cs +++ b/src/Nominatim.API/Models/AddressResult.cs @@ -92,7 +92,7 @@ public class AddressResult { /// /// District Name /// - [JsonProperty("state_district")] + [JsonProperty("district")] public string District { get; set; } /// From f3c638531c3d54c91c06c2a890c926b8cd3731aa Mon Sep 17 00:00:00 2001 From: SNS Date: Tue, 15 Jul 2025 15:58:22 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20GitHub=20Actions=20?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E4=BB=A5=E6=94=AF=E6=8C=81=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E6=8E=A8=E9=80=81=E5=92=8C=E5=B7=A5=E5=85=B7=E5=AE=89?= =?UTF-8?q?=E8=A3=85=EF=BC=8C=E7=A7=BB=E9=99=A4=E9=A1=B9=E7=9B=AE=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dotnet.yml | 43 +++++++++++++++++++------- Version.props | 5 +++ src/Nominatim.API/Nominatim.API.csproj | 6 +--- 3 files changed, 38 insertions(+), 16 deletions(-) create mode 100644 Version.props diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ef1c9ec..3f318df 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,31 +1,52 @@ # This workflow will build a .NET project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net -name: Build and test +name: .NET on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] + workflow_dispatch: + inputs: + has_tags: + description: 'True to print to STDOUT' + required: true + type: boolean + tags: + description: 'Test scenario tags' + required: true + type: string jobs: build: - runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v4 - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x + - name: New tool-manifest + run: dotnet new tool-manifest + - name: Tool install + run: dotnet tool install dotnetCampus.TagToVersion + - name: TagToVersion + if: ${{ inputs.has_tags }} + run: dotnet TagToVersion -t $TAGS -f Version.props + env: + TAGS: ${{ inputs.tags }} - name: Restore dependencies working-directory: src - run: dotnet restore Nominatim.API.sln + run: dotnet restore - name: Build working-directory: src - run: dotnet build Nominatim.API.sln --no-restore - - name: Test + run: dotnet build --no-restore -c release + - name: Package working-directory: src - run: dotnet test Nominatim.API.sln --no-build --verbosity normal + run: dotnet pack --no-restore -c release -o ${{env.DOTNET_ROOT}}/app + # - name: Test + # working-directory: src + # run: dotnet test --no-build --verbosity normal + - name: Push + if: ${{ inputs.has_tags }} + run: dotnet nuget push ${{env.DOTNET_ROOT}}/app/*.nupkg -k ${{ vars.MYGET_API_KEY }} -s https://www.myget.org/F/kmnet/api/v2/package + diff --git a/Version.props b/Version.props new file mode 100644 index 0000000..3c85f6d --- /dev/null +++ b/Version.props @@ -0,0 +1,5 @@ + + + 2.0.0 + + \ No newline at end of file diff --git a/src/Nominatim.API/Nominatim.API.csproj b/src/Nominatim.API/Nominatim.API.csproj index bc471fa..6148e1b 100644 --- a/src/Nominatim.API/Nominatim.API.csproj +++ b/src/Nominatim.API/Nominatim.API.csproj @@ -1,5 +1,5 @@ - + true Christopher Flanagan @@ -8,11 +8,7 @@ https://github.com/f1ana/Nominatim.API https://github.com/f1ana/Nominatim.API nominatim, osm, geocode, geocoding - 2.1.0 https://github.com/f1ana/Nominatim.API/blob/master/LICENSE - 2.1.0.0 - 2.1.0.0 - 2.1.0 net8.0;netstandard2.0 From 7bfc163217687726e4a0744d322cfab71e9cd560 Mon Sep 17 00:00:00 2001 From: SNS Date: Tue, 15 Jul 2025 16:14:18 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20GitHub=20Actions=20?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E4=B8=AD=E7=9A=84=20NuGet=20?= =?UTF-8?q?=E6=8E=A8=E9=80=81=20URL=20=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3f318df..d66f109 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -48,5 +48,5 @@ jobs: # run: dotnet test --no-build --verbosity normal - name: Push if: ${{ inputs.has_tags }} - run: dotnet nuget push ${{env.DOTNET_ROOT}}/app/*.nupkg -k ${{ vars.MYGET_API_KEY }} -s https://www.myget.org/F/kmnet/api/v2/package + run: dotnet nuget push ${{env.DOTNET_ROOT}}/app/*.nupkg -k ${{ vars.MYGET_API_KEY }} -s ${{ vars.MYGET_URL }} From 0797733fa48a61bbf21faafe4085541ab69b9948 Mon Sep 17 00:00:00 2001 From: SNS Date: Tue, 15 Jul 2025 19:46:56 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=94=AF=E6=8C=81=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=96=B0=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 `AddressResult.cs` 文件中,添加了多个新属性以支持更详细的地址信息,包括 `Pedestrian`(步行)、`Residential`(住宅区)、`Amenity`(设施)、`Military`(军事区)和 `Building`(建筑)。同时,更新了部分属性的注释以提供更清晰的描述,并移除了部分原有的注释内容,从而增强了代码的可读性和国际化支持。 --- src/Nominatim.API/Models/AddressResult.cs | 47 ++++++++++++++++++----- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/src/Nominatim.API/Models/AddressResult.cs b/src/Nominatim.API/Models/AddressResult.cs index de626b5..68bb16e 100644 --- a/src/Nominatim.API/Models/AddressResult.cs +++ b/src/Nominatim.API/Models/AddressResult.cs @@ -9,13 +9,13 @@ public class AddressResult { public string Country { get; set; } /// - /// Country code + /// Country code /// [JsonProperty("country_code")] public string CountryCode { get; set; } /// - /// County name + /// County name 县 /// [JsonProperty("county")] public string County { get; set; } @@ -45,22 +45,25 @@ public class AddressResult { public string State { get; set; } /// - /// Town Name + /// Town Name 城镇 /// [JsonProperty("town")] public string Town { get; set; } + /// + /// Pedestrian 步行 + /// [JsonProperty("pedestrian")] public string Pedestrian { get; set; } /// - /// Neighbourhood + /// Neighbourhood 街区 /// [JsonProperty("neighbourhood")] public string Neighborhood { get; set; } /// - /// Hamlet + /// Hamlet 村庄 /// [JsonProperty("hamlet")] public string Hamlet { get; set; } @@ -72,7 +75,7 @@ public class AddressResult { public string Suburb { get; set; } /// - /// Village Name + /// Village Name 村庄 /// [JsonProperty("village")] public string Village { get; set; } @@ -90,7 +93,7 @@ public class AddressResult { public string Region { get; set; } /// - /// District Name + /// District Name 区 /// [JsonProperty("district")] public string District { get; set; } @@ -102,21 +105,45 @@ public class AddressResult { public string Name { get; set; } /// - /// Tourism + /// Tourism 旅游区 /// [JsonProperty("tourism")] public string Tourism { get; set; } /// - /// Municipality + /// Municipality 市 /// [JsonProperty("municipality")] public string Municipality { get; set; } /// - /// Quarter + /// Quarter 街区 /// [JsonProperty("quarter")] public string Quarter { get; set; } + + /// + /// Residential 住宅区 + /// + [JsonProperty("residential")] + public string Residential { get; set; } + + /// + /// Amenity 设施 + /// + [JsonProperty("amenity")] + public string Amenity { get; set; } + + /// + /// Military 军事区 + /// + [JsonProperty("military")] + public string Military { get; set; } + + /// + /// Building 建筑 + /// + [JsonProperty("building")] + public string Building { get; set; } } } \ No newline at end of file