Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGIS: put methods under the native struct #5

Merged
merged 18 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
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
37 changes: 29 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
- dev
workflow_call:
secrets:
codecov_token:
required: true
outputs:
version:
value: ${{ jobs.build.outputs.version }}
Expand Down Expand Up @@ -37,13 +40,6 @@ jobs:

- name: ⚒️ Run build
run: ./build.ps1

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
with:
files: ./**/*.Tests/coverage.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: ⬆️ Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -54,4 +50,29 @@ jobs:

- id: set-version
name: Set version to output
run: echo "version=${{ env.GitVersion_FullSemVer }}" >> "$GITHUB_OUTPUT"
run: echo "version=${{ env.GitVersion_FullSemVer }}" >> "$GITHUB_OUTPUT"
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.2xx # Align with global.json (including roll forward rules)

- name: Cache Nuget
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}

- name: ⚒️ Run build
run: ./build.sh test-only

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
with:
file: Converters/**/coverage.xml
token: ${{ secrets.codecov_token }}
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
jobs:
build:
uses: ./.github/workflows/ci.yml
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}

# deploy-installers:
# runs-on: ubuntu-latest
Expand Down
17 changes: 16 additions & 1 deletion Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
const string RESTORE = "restore";
const string BUILD = "build";
const string TEST = "test";
const string TEST_ONLY = "test-only";
const string FORMAT = "format";
const string ZIP = "zip";
const string VERSION = "version";
Expand Down Expand Up @@ -115,7 +116,21 @@ void RemoveDirectory(string d)
Glob.Files(".", "**/*.Tests.csproj"),
file =>
{
Run("dotnet", $"test {file} -c Release --no-build --no-restore --verbosity=normal /p:AltCover=true");
Run("dotnet", $"test {file} -c Release --no-build --no-restore --verbosity=normal");
}
);

Target(
TEST_ONLY,
DependsOn(FORMAT),
Glob.Files(".", "**/*.Tests.csproj"),
file =>
{
Run("dotnet", $"restore {file} --locked-mode");
Run(
"dotnet",
$"test {file} -c Release --no-restore --verbosity=normal /p:AltCover=true /p:AltCoverLocalSource=true /p:AltCoverAttributeFilter=ExcludeFromCodeCoverage"
);
}
);

Expand Down
20 changes: 10 additions & 10 deletions Connectors/ArcGIS/Speckle.Connectors.ArcGIS3/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Connectors.Utils": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Connectors.Utils": "[1.0.0, )",
"Speckle.Core": "[3.0.1-alpha.14, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
Expand All @@ -391,44 +391,44 @@
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1823.32, )",
"Speckle.Connectors.DUI": "[2.0.999-local, )"
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.utils": {
"type": "Project",
"dependencies": {
"Serilog.Extensions.Logging": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Core": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.arcgis3": {
"type": "Project",
"dependencies": {
"Esri.ArcGISPro.Extensions30": "[3.2.0.49743, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.arcgis3.dependencyinjection": {
"type": "Project",
"dependencies": {
"Autofac": "[5.2.0, )",
"Speckle.Converters.ArcGIS3": "[2.0.999-local, )",
"Speckle.Converters.Common.DependencyInjection": "[2.0.999-local, )"
"Speckle.Converters.ArcGIS3": "[1.0.0, )",
"Speckle.Converters.Common.DependencyInjection": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.common.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"Autofac": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Connectors.Utils": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Connectors.Utils": "[1.0.0, )",
"Speckle.Core": "[3.0.1-alpha.14, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
Expand All @@ -444,44 +444,44 @@
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1823.32, )",
"Speckle.Connectors.DUI": "[2.0.999-local, )"
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.utils": {
"type": "Project",
"dependencies": {
"Serilog.Extensions.Logging": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Core": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.autocad2023": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2023.0.0, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.autocad2023.dependencyinjection": {
"type": "Project",
"dependencies": {
"Autofac": "[5.2.0, )",
"Speckle.Converters.Autocad2023": "[2.0.999-local, )",
"Speckle.Converters.Common.DependencyInjection": "[2.0.999-local, )"
"Speckle.Converters.Autocad2023": "[1.0.0, )",
"Speckle.Converters.Common.DependencyInjection": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.common.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"Autofac": {
Expand Down
20 changes: 10 additions & 10 deletions Connectors/Revit/Speckle.Connectors.Revit2023/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Connectors.Utils": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Connectors.Utils": "[1.0.0, )",
"Speckle.Core": "[3.0.1-alpha.14, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
Expand All @@ -462,37 +462,37 @@
"type": "Project",
"dependencies": {
"Serilog.Extensions.Logging": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Core": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.common.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.revit2023": {
"type": "Project",
"dependencies": {
"Speckle.Converters.Common": "[2.0.999-local, )",
"Speckle.Converters.Common": "[1.0.0, )",
"Speckle.Revit.API": "[2023.0.0, )"
}
},
"speckle.converters.revit2023.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Converters.Common": "[2.0.999-local, )",
"Speckle.Converters.Common.DependencyInjection": "[2.0.999-local, )",
"Speckle.Converters.Revit2023": "[2.0.999-local, )"
"Speckle.Converters.Common": "[1.0.0, )",
"Speckle.Converters.Common.DependencyInjection": "[1.0.0, )",
"Speckle.Converters.Revit2023": "[1.0.0, )"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
Expand Down
18 changes: 9 additions & 9 deletions Connectors/Rhino/Speckle.Connectors.Rhino7/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Connectors.Utils": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Connectors.Utils": "[1.0.0, )",
"Speckle.Core": "[3.0.1-alpha.14, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
Expand All @@ -452,42 +452,42 @@
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1823.32, )",
"Speckle.Connectors.DUI": "[2.0.999-local, )"
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.utils": {
"type": "Project",
"dependencies": {
"Serilog.Extensions.Logging": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Core": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.common.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.rhino7": {
"type": "Project",
"dependencies": {
"RhinoCommon": "[7.13.21348.13001, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.rhino7.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Converters.Rhino7": "[2.0.999-local, )"
"Speckle.Converters.Rhino7": "[1.0.0, )"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,21 +363,21 @@
"type": "Project",
"dependencies": {
"Esri.ArcGISPro.Extensions30": "[3.2.0.49743, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
}
},
"speckle.converters.common.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
"Speckle.Autofac": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"Esri.ArcGISPro.Extensions30": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private List<GisFeature> RecoverOutdatedGisFeatures(VectorLayer target)

public FeatureClass Convert(VectorLayer target)
{
ACG.GeometryType geomType = _featureClassUtils.GetLayerGeometryType(target);
ACG.GeometryType geomType = GISLayerGeometryType.GetNativeLayerGeometryType(target);

FileGeodatabaseConnectionPath fileGeodatabaseConnectionPath =
new(_contextStack.Current.Document.SpeckleDatabasePath);
Expand All @@ -85,7 +85,7 @@ public FeatureClass Convert(VectorLayer target)
string wktString = string.Empty;
if (target.crs is not null && target.crs.wkt is not null)
{
wktString = target.crs.wkt.ToString();
wktString = target.crs.wkt;
}
ACG.SpatialReference spatialRef = ACG.SpatialReferenceBuilder.CreateSpatialReference(wktString);

Expand Down
Loading
Loading