Skip to content

Commit

Permalink
Merge pull request #414 from specklesystems/dev
Browse files Browse the repository at this point in the history
Update `release/3.0.0` with changes from `dev`
  • Loading branch information
AlanRynne authored Nov 27, 2024
2 parents c719cfd + 0ccefea commit bb0fffd
Show file tree
Hide file tree
Showing 152 changed files with 2,248 additions and 2,922 deletions.
2 changes: 0 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,6 @@ dotnet_diagnostic.ca1509.severity = warning # Invalid entry in code metrics conf
dotnet_diagnostic.ca1861.severity = none # Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1861)

dotnet_diagnostic.cs8618.severity = suggestion # nullable problem
dotnet_diagnostic.CS0809.severity = suggestion # obsolete errors
dotnet_diagnostic.CS0618.severity = suggestion # obsolete errors


# Performance rules
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.2xx # Align with global.json (including roll forward rules)
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)

- name: Cache Nuget
uses: actions/cache@v4
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.2xx # Align with global.json (including roll forward rules)
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)

- name: Cache Nuget
uses: actions/cache@v4
Expand All @@ -50,7 +50,7 @@ jobs:
run: ./build.sh test-only

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: Converters/**/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.2xx # Align with global.json (including roll forward rules)
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)

- name: Cache Nuget
uses: actions/cache@v4
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.2xx # Align with global.json (including roll forward rules)
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)

- name: Cache Nuget
uses: actions/cache@v4
Expand All @@ -91,7 +91,7 @@ jobs:
run: ./build.sh test-only

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: Converters/**/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
5 changes: 4 additions & 1 deletion Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ void RemoveDirectory(string d)
var version = Environment.GetEnvironmentVariable("GitVersion_FullSemVer") ?? "3.0.0-localBuild";
var fileVersion = Environment.GetEnvironmentVariable("GitVersion_AssemblySemFileVer") ?? "3.0.0.0";
Console.WriteLine($"Version: {version} & {fileVersion}");
Run("dotnet", $"build {s} -c Release --no-restore -p:Version={version} -p:FileVersion={fileVersion} -v:m");
Run(
"dotnet",
$"build {s} -c Release --no-restore -warnaserror -p:Version={version} -p:FileVersion={fileVersion} -v:m"
);
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,8 @@ public SelectionInfo GetSelection()
selectedMembers.AddRange(mapView.GetSelectedStandaloneTables());

List<MapMember> allNestedMembers = new();
foreach (MapMember member in selectedMembers)
{
var layerMapMembers = _mapMemberUtils.UnpackMapLayers(selectedMembers);
allNestedMembers.AddRange(layerMapMembers);
}
var layerMapMembers = _mapMemberUtils.UnpackMapLayers(selectedMembers);
allNestedMembers.AddRange(layerMapMembers);

List<string> objectTypes = allNestedMembers
.Select(o => o.GetType().ToString().Split(".").Last())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public BasicConnectorBinding(DocumentModelStore store, IBrowserBridge parent, IS

public DocumentModelStore GetDocumentState() => _store;

public void AddModel(ModelCard model) => _store.Models.Add(model);
public void AddModel(ModelCard model) => _store.AddModel(model);

public void UpdateModel(ModelCard model) => _store.UpdateModel(model);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.DUI;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.WebView;
using Speckle.Converters.Common;
Expand All @@ -28,10 +27,8 @@ public static class ArcGISConnectorModule
public static void AddArcGIS(this IServiceCollection serviceCollection)
{
serviceCollection.AddConnectorUtils();
serviceCollection.AddDUI();
serviceCollection.AddDUI<ArcGISDocumentStore>();
serviceCollection.AddDUIView();

serviceCollection.AddSingleton<DocumentModelStore, ArcGISDocumentStore>();
// Register bindings
serviceCollection.AddSingleton<IBinding, TestBinding>();
serviceCollection.AddSingleton<IBinding, ConfigBinding>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
Log.LogErrorFromException(ex);
return false;
}
return Success;
]]>
</Code>
</Task>
Expand Down Expand Up @@ -190,7 +189,7 @@
{
Log.LogMessage(MessageImportance.Low, "RelativePaths: " + i.ToString());
}
return true;
Success = true;
]]>
</Code>
</Task>
Expand Down Expand Up @@ -266,7 +265,6 @@
CleanInfo = AssemblyName + extension;
}
Success = true;
return Success;
]]>
</Code>
</Task>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@
using ArcGIS.Desktop.Mapping.Events;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Newtonsoft.Json;
using Speckle.Sdk.Common;
using Speckle.Connectors.DUI.Utils;

namespace Speckle.Connectors.ArcGIS.Utils;

public class ArcGISDocumentStore : DocumentModelStore
{
public ArcGISDocumentStore(
JsonSerializerSettings serializerOption,
ITopLevelExceptionHandler topLevelExceptionHandler
)
: base(serializerOption, true)
public ArcGISDocumentStore(IJsonSerializer jsonSerializer, ITopLevelExceptionHandler topLevelExceptionHandler)
: base(jsonSerializer)
{
ActiveMapViewChangedEvent.Subscribe(a => topLevelExceptionHandler.CatchUnhandled(() => OnMapViewChanged(a)), true);
ProjectSavingEvent.Subscribe(
Expand All @@ -40,7 +36,7 @@ ITopLevelExceptionHandler topLevelExceptionHandler
if (!IsDocumentInit && MapView.Active != null)
{
IsDocumentInit = true;
ReadFromFile();
LoadState();
OnDocumentChanged();
}
}
Expand All @@ -52,14 +48,14 @@ private void OnProjectClosing()
return;
}

WriteToFile();
SaveState();
}

private void OnProjectSaving()
{
if (MapView.Active is not null)
{
WriteToFile();
SaveState();
}
}

Expand All @@ -74,11 +70,11 @@ private void OnMapViewChanged(ActiveMapViewChangedEventArgs args)
}

IsDocumentInit = true;
ReadFromFile();
LoadState();
OnDocumentChanged();
}

public override void WriteToFile()
protected override void HostAppSaveState(string modelCardState)
{
Map map = MapView.Active.Map;
QueuedTask.Run(() =>
Expand All @@ -91,9 +87,7 @@ public override void WriteToFile()
? XDocument.Parse(existingMetadata)
: new XDocument(new XElement("metadata"));

string serializedModels = Serialize();

XElement xmlModelCards = new("SpeckleModelCards", serializedModels);
XElement xmlModelCards = new("SpeckleModelCards", modelCardState);

// Check if SpeckleModelCards element already exists at root and update it
var speckleModelCardsElement = existingXmlDocument.Root?.Element("SpeckleModelCards");
Expand All @@ -110,7 +104,7 @@ public override void WriteToFile()
});
}

public override void ReadFromFile()
protected override void LoadState()
{
Map map = MapView.Active.Map;
QueuedTask.Run(() =>
Expand All @@ -120,12 +114,12 @@ public override void ReadFromFile()
var element = root?.Element("SpeckleModelCards");
if (element is null)
{
Models = new();
ClearAndSave();
return;
}

string modelsString = element.Value;
Models = Deserialize(modelsString).NotNull();
LoadFromString(modelsString);
});
}
}
34 changes: 17 additions & 17 deletions Connectors/ArcGIS/Speckle.Connectors.ArcGIS3/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,18 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.181, )",
"Speckle.Sdk": "[3.1.0-dev.181, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.181, )"
"Speckle.Objects": "[3.1.0-dev.200, )",
"Speckle.Sdk": "[3.1.0-dev.200, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.200, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.181, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.181, )",
"Speckle.Sdk": "[3.1.0-dev.200, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.200, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
Expand All @@ -267,7 +267,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.181, )"
"Speckle.Objects": "[3.1.0-dev.200, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
Expand Down Expand Up @@ -299,18 +299,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.181, )",
"resolved": "3.1.0-dev.181",
"contentHash": "r6GGA7Pq4CPGYOu6OmmLW/hhhREo/l44RUFhsoYmpHNGpOg1UjF45dwyfLgaU38wrNxQoURjLUQDkxGfhb8liA==",
"requested": "[3.1.0-dev.200, )",
"resolved": "3.1.0-dev.200",
"contentHash": "n4O+XvMBTsl2gOjZmMeE1Kvo1DOxDLuBcUR7GQw8G0LPv+ce+JFSNaFnmyz/w4X32X2bHmbSImuMRr6U7K4dUQ==",
"dependencies": {
"Speckle.Sdk": "3.1.0-dev.181"
"Speckle.Sdk": "3.1.0-dev.200"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.181, )",
"resolved": "3.1.0-dev.181",
"contentHash": "VmRRphUJm+qfcjtdzxkTstAD0opaIP57tP6GJ2YnalyRj3wBTGBQuy7gwhGjWyAvsMnkugpKFEfAVuNm/zHQ2A==",
"requested": "[3.1.0-dev.200, )",
"resolved": "3.1.0-dev.200",
"contentHash": "iRdDkEFDu8taJmzMs6RK/HiUZMeESNKfovb3U2a3yO3wEElNfpqPGXJr3GKcjjPZ+LwENgNO3/aemGzx8+TXQw==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
Expand All @@ -320,14 +320,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.181"
"Speckle.Sdk.Dependencies": "3.1.0-dev.200"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.181, )",
"resolved": "3.1.0-dev.181",
"contentHash": "W7Nb3hAPlLXGZmEFWdf9vyhXKGZk3M+lypEKB+IWQVwr3NL+bzPgfw2130kTuMr/9zGx8jUbSfx2ulTql9mZxw=="
"requested": "[3.1.0-dev.200, )",
"resolved": "3.1.0-dev.200",
"contentHash": "4ZHkKRzI6/Xa1c20NrH3+e+m5DUB+qbBSq+GJ6MShUh6SpKOC4DRdwy0qCcAWrurq7V94xU0qN+7+QzKGeWlFw=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,18 +264,18 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.181, )",
"Speckle.Sdk": "[3.1.0-dev.181, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.181, )"
"Speckle.Objects": "[3.1.0-dev.200, )",
"Speckle.Sdk": "[3.1.0-dev.200, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.200, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.181, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.181, )",
"Speckle.Sdk": "[3.1.0-dev.200, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.200, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
Expand All @@ -300,7 +300,7 @@
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.181, )"
"Speckle.Objects": "[3.1.0-dev.200, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
Expand Down Expand Up @@ -338,18 +338,18 @@
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.181, )",
"resolved": "3.1.0-dev.181",
"contentHash": "r6GGA7Pq4CPGYOu6OmmLW/hhhREo/l44RUFhsoYmpHNGpOg1UjF45dwyfLgaU38wrNxQoURjLUQDkxGfhb8liA==",
"requested": "[3.1.0-dev.200, )",
"resolved": "3.1.0-dev.200",
"contentHash": "n4O+XvMBTsl2gOjZmMeE1Kvo1DOxDLuBcUR7GQw8G0LPv+ce+JFSNaFnmyz/w4X32X2bHmbSImuMRr6U7K4dUQ==",
"dependencies": {
"Speckle.Sdk": "3.1.0-dev.181"
"Speckle.Sdk": "3.1.0-dev.200"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.181, )",
"resolved": "3.1.0-dev.181",
"contentHash": "VmRRphUJm+qfcjtdzxkTstAD0opaIP57tP6GJ2YnalyRj3wBTGBQuy7gwhGjWyAvsMnkugpKFEfAVuNm/zHQ2A==",
"requested": "[3.1.0-dev.200, )",
"resolved": "3.1.0-dev.200",
"contentHash": "iRdDkEFDu8taJmzMs6RK/HiUZMeESNKfovb3U2a3yO3wEElNfpqPGXJr3GKcjjPZ+LwENgNO3/aemGzx8+TXQw==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
Expand All @@ -359,14 +359,14 @@
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.181"
"Speckle.Sdk.Dependencies": "3.1.0-dev.200"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.181, )",
"resolved": "3.1.0-dev.181",
"contentHash": "W7Nb3hAPlLXGZmEFWdf9vyhXKGZk3M+lypEKB+IWQVwr3NL+bzPgfw2130kTuMr/9zGx8jUbSfx2ulTql9mZxw=="
"requested": "[3.1.0-dev.200, )",
"resolved": "3.1.0-dev.200",
"contentHash": "4ZHkKRzI6/Xa1c20NrH3+e+m5DUB+qbBSq+GJ6MShUh6SpKOC4DRdwy0qCcAWrurq7V94xU0qN+7+QzKGeWlFw=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
Expand Down
Loading

0 comments on commit bb0fffd

Please sign in to comment.