Skip to content

Commit

Permalink
feature/rc4 cleanup (#1608)
Browse files Browse the repository at this point in the history
* resharper refactor

* ui refactor from resharper

* refactor tools from resharper

* add fixes

* remove dud file

* attempt fix

* revert db

* add trust server to db yaml
  • Loading branch information
JFriel authored Aug 28, 2023
1 parent 3b62c30 commit 219e21b
Show file tree
Hide file tree
Showing 392 changed files with 1,746 additions and 1,452 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright (c) The University of Dundee 2018-2023
// This file is part of the Research Data Management Platform (RDMP).
// RDMP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using NUnit.Framework;
using Rdmp.Core.CommandExecution.AtomicCommands;
using Rdmp.Core.CommandLine.Interactive.Picking;
using Rdmp.Core.ReusableLibraryCode.Checks;
using Rdmp.Core.ReusableLibraryCode.Settings;

namespace Rdmp.Core.Tests.CommandExecution;

internal sealed class TestExecuteCommandClearUserSettings : CommandCliTests
{
[Test]
public void Test_ClearUserSettings()
{
var invoker = GetInvoker();
var activator = GetActivator();

UserSettings.Wait5SecondsAfterStartupUI = false;

invoker.ExecuteCommand(typeof(ExecuteCommandSetUserSetting), new CommandLineObjectPicker(new[] { nameof(UserSettings.Wait5SecondsAfterStartupUI), "true" }, activator));

Assert.IsTrue(UserSettings.Wait5SecondsAfterStartupUI);
invoker.ExecuteCommand(typeof(ExecuteCommandSetUserSetting), new CommandLineObjectPicker(new[] { nameof(UserSettings.Wait5SecondsAfterStartupUI), "false" }, activator));
Assert.IsFalse(UserSettings.Wait5SecondsAfterStartupUI);
invoker.ExecuteCommand(typeof(ExecuteCommandClearUserSettings), new CommandLineObjectPicker(System.Array.Empty<string>(), activator));

Assert.IsTrue(UserSettings.Wait5SecondsAfterStartupUI);
}
}
2 changes: 1 addition & 1 deletion Rdmp.Core/Autocomplete/AutoCompleteProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SixLabors.ImageSharp;
using System.Text.RegularExpressions;
using FAnsi.Discovery;
using FAnsi.Discovery.QuerySyntax;
Expand All @@ -17,6 +16,7 @@
using Rdmp.Core.DataViewing;
using Rdmp.Core.Icons.IconProvision;
using Rdmp.Core.QueryBuilding;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;

namespace Rdmp.Core.Autocomplete;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public ExternalCohortTable CreateDatabase(PrivateIdentifierPrototype privateIden
var idColumn = definitionTable.DiscoverColumn("id");
var foreignKey =
new DatabaseColumnRequest(DefinitionTableForeignKeyField, new DatabaseTypeRequest(typeof(int)), false)
{ IsPrimaryKey = true };
{ IsPrimaryKey = true };

// Look up the collations of all the private identifier columns
var collations = privateIdentifierPrototype.MatchingExtractionInformations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
using System;
using System.Data;
using Rdmp.Core.Curation.Data;
using Rdmp.Core.QueryBuilding;
using Rdmp.Core.DataFlowPipeline;
using Rdmp.Core.DataFlowPipeline.Requirements;
using Rdmp.Core.QueryBuilding;
using Rdmp.Core.ReusableLibraryCode.Checks;
using Rdmp.Core.ReusableLibraryCode.DataAccess;
using Rdmp.Core.ReusableLibraryCode.Progress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Rdmp.Core.CohortCreation.Execution;
using Rdmp.Core.CohortCreation.Execution.Joinables;
using Rdmp.Core.CommandExecution;
using Rdmp.Core.Curation.Data;
using Rdmp.Core.Curation.Data.Aggregation;
using Rdmp.Core.Curation.Data.Cohort;
using Rdmp.Core.Curation.Data.Cohort.Joinables;
using Rdmp.Core.QueryCaching.Aggregation;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Rdmp.Core.MapsDirectlyToDatabaseTable;
using Rdmp.Core.QueryCaching.Aggregation;

namespace Rdmp.Core.CohortCreation;

Expand Down Expand Up @@ -337,15 +337,15 @@ public void ExecuteOrCancel(object o)
switch (o)
{
case AggregateConfiguration aggregate:
{
var joinable = aggregate.JoinableCohortAggregateConfiguration;
if (joinable != null)
OrderActivity(GetNextOperation(GetState(joinable)), joinable);
else
OrderActivity(GetNextOperation(GetState(aggregate)), aggregate);
break;
}
{
var joinable = aggregate.JoinableCohortAggregateConfiguration;
if (joinable != null)
OrderActivity(GetNextOperation(GetState(joinable)), joinable);
else
OrderActivity(GetNextOperation(GetState(aggregate)), aggregate);
break;
}
case CohortAggregateContainer container:
OrderActivity(GetNextOperation(GetState(container)), container);
break;
Expand Down
6 changes: 3 additions & 3 deletions Rdmp.Core/CohortCreation/Execution/CohortCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using FAnsi.Discovery;
using Rdmp.Core.QueryBuilding;
using Rdmp.Core.CohortCreation.Execution.Joinables;
using Rdmp.Core.Curation.Data;
using Rdmp.Core.Curation.Data.Aggregation;
using Rdmp.Core.Curation.Data.Cohort;
using Rdmp.Core.Curation.Data.Cohort.Joinables;
using Rdmp.Core.MapsDirectlyToDatabaseTable;
using Rdmp.Core.Providers;
using Rdmp.Core.QueryBuilding;
using Rdmp.Core.QueryCaching.Aggregation;
using System.Threading.Tasks;
using Rdmp.Core.MapsDirectlyToDatabaseTable;
using Rdmp.Core.ReusableLibraryCode.Checks;
using Rdmp.Core.ReusableLibraryCode.DataAccess;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

using System;
using System.Data;
using System.Data.Common;
using System.Threading;
using System.Threading.Tasks;
using FAnsi.Discovery;

namespace Rdmp.Core.CohortCreation.Execution;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using BadMedicine;
using Rdmp.Core.Curation.Data;
using Rdmp.Core.Curation.Data.Aggregation;
using Rdmp.Core.QueryCaching.Aggregation;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading;
using BadMedicine;
using Rdmp.Core.Curation.Data;
using Rdmp.Core.Curation.Data.Aggregation;
using Rdmp.Core.QueryCaching.Aggregation;

namespace Rdmp.Core.CohortCreation.Execution;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System.Threading;
using FAnsi.Naming;
using Rdmp.Core.Curation.Data;
using Rdmp.Core.Curation.Data.Aggregation;
using Rdmp.Core.QueryCaching.Aggregation;
using System.Threading;

namespace Rdmp.Core.CohortCreation.Execution;

Expand Down
12 changes: 6 additions & 6 deletions Rdmp.Core/CohortCreation/Execution/PluginCohortCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading;
using FAnsi.Discovery;
using FAnsi.Naming;
using Rdmp.Core.Curation.Data;
using Rdmp.Core.Curation.Data.Aggregation;
using Rdmp.Core.Curation.Data.Spontaneous;
using Rdmp.Core.MapsDirectlyToDatabaseTable;
using Rdmp.Core.QueryCaching.Aggregation;
using Rdmp.Core.QueryCaching.Aggregation.Arguments;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading;
using Rdmp.Core.MapsDirectlyToDatabaseTable;
using TypeGuesser;

namespace Rdmp.Core.CohortCreation.Execution;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using Rdmp.Core.Repositories;
using System;
using System.Collections.Generic;
using System.Linq;
using Rdmp.Core.Repositories;

namespace Rdmp.Core.CohortCreation.Execution;

Expand Down
2 changes: 1 addition & 1 deletion Rdmp.Core/CommandExecution/AliasAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using Rdmp.Core.CommandExecution.AtomicCommands;
using System;
using Rdmp.Core.CommandExecution.AtomicCommands;

namespace Rdmp.Core.CommandExecution;

Expand Down
Loading

0 comments on commit 219e21b

Please sign in to comment.