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

Task/rdmp 122 update a database extraction #1779

Merged
merged 65 commits into from
May 28, 2024

Conversation

JFriel
Copy link
Collaborator

@JFriel JFriel commented Mar 14, 2024

  • Adds ability to re-extract a project to a database
  • Extract to database now respects the "IsExtractionPrimaryKey" flag on column items

How To Test:

  • Create a simple catalogue and extract it to a database
  • Update the catalogue with new data and attempt to re-extract
  • The new data should be extracted into the target database

@JFriel JFriel marked this pull request as ready for review March 15, 2024 11:25
@@ -103,6 +108,9 @@
private bool _firstTime = true;
private HashSet<string> _primaryKey = new(StringComparer.CurrentCultureIgnoreCase);
private DiscoveredTable _discoveredTable;
private readonly string _extractionTimeStamp = "extraction_timestamp";

private IExternalCohortTable _externalCohortTable;

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity

Field '_externalCohortTable' can be 'readonly'.
new DatabaseColumnRequest("dtCreated", new DatabaseTypeRequest(typeof(DateTime)))
{ AllowNulls = false, Default = MandatoryScalarFunctions.GetTodaysDate }
});
var idColumn = definitionTable.DiscoverColumn("id");

Check warning

Code scanning / CodeQL

Useless assignment to local variable

This assignment to [idColumn](1) is useless, since its value is never read.
Assert.That(dt.Rows, Has.Count.EqualTo(1));

//add new entry here
var tblInfo = CatalogueRepository.GetAllObjects<TableInfo>().First();

Check warning

Code scanning / CodeQL

Useless assignment to local variable

This assignment to [tblInfo](1) is useless, since its value is never read.
CohortIdentificationConfiguration cic2 = new CohortIdentificationConfiguration(CatalogueRepository, "Cohort1");
cic2.CreateRootContainerIfNotExists();
var agg12 = new AggregateConfiguration(CatalogueRepository, catalogue, "agg1");
var conf2 = new AggregateConfiguration(CatalogueRepository, catalogue, "UnitTestShortcutAggregate");

Check warning

Code scanning / CodeQL

Useless assignment to local variable

This assignment to [conf2](1) is useless, since its value is never read.
Comment on lines 1049 to 1056
var newCohortCmd2 = new ExecuteCommandCreateNewCohortByExecutingACohortIdentificationConfiguration(
new ThrowImmediatelyActivator(RepositoryLocator),
cic2,
newExternal,
"MyCohort2",
project,
cohortPipeline
);

Check warning

Code scanning / CodeQL

Useless assignment to local variable

This assignment to [newCohortCmd2](1) is useless, since its value is never read.
@JFriel JFriel changed the base branch from develop to release/8.2.0 April 5, 2024 13:09
@JFriel JFriel requested a review from rdteviotdale April 8, 2024 10:24
@JFriel JFriel marked this pull request as ready for review April 8, 2024 10:24
JFriel and others added 6 commits April 8, 2024 11:28
* bump to net8

* add sqlcli

* Bump Autoupdater.NET.Official from 1.8.4 to 1.8.5

Bumps [Autoupdater.NET.Official](https://github.com/ravibpatel/AutoUpdater.NET) from 1.8.4 to 1.8.5.
- [Release notes](https://github.com/ravibpatel/AutoUpdater.NET/releases)
- [Commits](ravibpatel/AutoUpdater.NET@v1.8.4...v1.8.5)

---
updated-dependencies:
- dependency-name: Autoupdater.NET.Official
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Delete .nuget/packages.config (#1758)

* Delete .nuget/packages.config

Remove  hopefully obsolete package list confusing dependency tracking

* Remove .nuget folder

---------

Co-authored-by: James A Sutherland <>

* Bump svenstaro/upload-release-action from 2.7.0 to 2.9.0 (#1759)

* Bump shogo82148/actions-setup-perl from 1.28.0 to 1.29.0 (#1751)

Bumps [shogo82148/actions-setup-perl](https://github.com/shogo82148/actions-setup-perl) from 1.28.0 to 1.29.0.
- [Release notes](https://github.com/shogo82148/actions-setup-perl/releases)
- [Commits](shogo82148/actions-setup-perl@v1.28.0...v1.29.0)

---
updated-dependencies:
- dependency-name: shogo82148/actions-setup-perl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James Friel <[email protected]>

* Bump CsvHelper from 30.0.3 to 30.1.0 (#1737)

Bumps [CsvHelper](https://github.com/JoshClose/CsvHelper) from 30.0.3 to 30.1.0.
- [Commits](JoshClose/CsvHelper@30.0.3...30.1.0)

---
updated-dependencies:
- dependency-name: CsvHelper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James Friel <[email protected]>

* Bump SSH.NET from 2023.0.1 to 2024.0.0

Bumps [SSH.NET](https://github.com/sshnet/SSH.NET) from 2023.0.1 to 2024.0.0.
- [Release notes](https://github.com/sshnet/SSH.NET/releases)
- [Commits](sshnet/SSH.NET@2023.0.1...2024.0.0)

---
updated-dependencies:
- dependency-name: SSH.NET
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump SixLabors.ImageSharp.Drawing from 2.1.0 to 2.1.1

Bumps [SixLabors.ImageSharp.Drawing](https://github.com/SixLabors/ImageSharp.Drawing) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/SixLabors/ImageSharp.Drawing/releases)
- [Commits](SixLabors/ImageSharp.Drawing@v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: SixLabors.ImageSharp.Drawing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump MongoDB.Driver from 2.23.1 to 2.24.0

Bumps [MongoDB.Driver](https://github.com/mongodb/mongo-csharp-driver) from 2.23.1 to 2.24.0.
- [Release notes](https://github.com/mongodb/mongo-csharp-driver/releases)
- [Commits](mongodb/mongo-csharp-driver@v2.23.1...v2.24.0)

---
updated-dependencies:
- dependency-name: MongoDB.Driver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump NUnit from 4.0.1 to 4.1.0

Bumps [NUnit](https://github.com/nunit/nunit) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/nunit/nunit/releases)
- [Changelog](https://github.com/nunit/nunit/blob/master/CHANGES.md)
- [Commits](nunit/nunit@v4.0.1...4.1.0)

---
updated-dependencies:
- dependency-name: NUnit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump FluentFTP from 49.0.1 to 49.0.2

Bumps [FluentFTP](https://github.com/robinrodricks/FluentFTP) from 49.0.1 to 49.0.2.
- [Release notes](https://github.com/robinrodricks/FluentFTP/releases)
- [Changelog](https://github.com/robinrodricks/FluentFTP/blob/master/RELEASES.md)
- [Commits](https://github.com/robinrodricks/FluentFTP/commits)

---
updated-dependencies:
- dependency-name: FluentFTP
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Task/rdmp-140 Update Dependabot yml file (#1756)

* centrally managed dependacies

* add directory.project.props file

* fix typo

* fix build

* fix up test

* Whitespace cleanup

* Avoid searching for and reading all csproj files twice

* remove console log

* update dependabot actions

* remove dependabot lower bounds

---------

Co-authored-by: James A Sutherland <>

* fix merge

* run net8

* Bump YamlDotNet from 15.1.1 to 15.1.2 (#1767)

Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 15.1.1 to 15.1.2.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](aaubry/YamlDotNet@v15.1.1...v15.1.2)

---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update sqlclient

* add version

* remove obsolete properties from tests

* workaround depricated formatter

* add text fix

* add package listing

* Bump coverlet.collector from 6.0.0 to 6.0.1 (#1757)

Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](coverlet-coverage/coverlet@v6.0.0...v6.0.1)

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* RDMP-143 Reorder Excel Attacher Processes (#1752)

* update excel attacher processing ordering

* Bump CsvHelper from 30.0.1 to 31.0.0 (#1761)

* Bump SixLabors.ImageSharp from 3.1.2 to 3.1.3 (#1770)

Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/SixLabors/ImageSharp/releases)
- [Commits](SixLabors/ImageSharp@v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: SixLabors.ImageSharp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump SixLabors.ImageSharp.Drawing from 2.1.1 to 2.1.2

Bumps [SixLabors.ImageSharp.Drawing](https://github.com/SixLabors/ImageSharp.Drawing) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/SixLabors/ImageSharp.Drawing/releases)
- [Commits](SixLabors/ImageSharp.Drawing@v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: SixLabors.ImageSharp.Drawing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Resetting Dependabot for central versioning

* Reinstate Dependabot to reset state

* Move ManagePackageVersionsCentrally flag to Directory.Build.props

* Fix casing on Directory.Build.props file

* Task/tidy up net 8 migration (#1775)

* fix packages.md

* Bump coverlet.collector from 6.0.1 to 6.0.2

Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](coverlet-coverage/coverlet@v6.0.1...v6.0.2)

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump HIC.BadMedicine from 1.1.2 to 1.2.0 (#1776)

* Bump HIC.BadMedicine from 1.1.2 to 1.2.0

Bumps [HIC.BadMedicine](https://github.com/HicServices/BadMedicine) from 1.1.2 to 1.2.0.
- [Release notes](https://github.com/HicServices/BadMedicine/releases)
- [Changelog](https://github.com/HicServices/BadMedicine/blob/develop/CHANGELOG.md)
- [Commits](HicServices/SynthEHR@v1.1.2...v1.2.0)

---
updated-dependencies:
- dependency-name: HIC.BadMedicine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* BadMedicine API update

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James A Sutherland <[email protected]>

* bump fansisql (#1778)

* Bump Terminal.Gui from 1.15.1 to 1.16.0 (#1781)

Bumps [Terminal.Gui](https://github.com/gui-cs/Terminal.Gui) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/gui-cs/Terminal.Gui/releases)
- [Commits](gui-cs/Terminal.Gui@v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: Terminal.Gui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump NUnit.Analyzers from 4.0.1 to 4.1.0 (#1780)

Bumps [NUnit.Analyzers](https://github.com/nunit/nunit.analyzers) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/nunit/nunit.analyzers/releases)
- [Changelog](https://github.com/nunit/nunit.analyzers/blob/master/CHANGES.txt)
- [Commits](nunit/nunit.analyzers@4.0.1...4.1.0)

---
updated-dependencies:
- dependency-name: NUnit.Analyzers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump HIC.BadMedicine from 1.2.0 to 1.2.1

Bumps [HIC.BadMedicine](https://github.com/HicServices/BadMedicine) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/HicServices/BadMedicine/releases)
- [Changelog](https://github.com/HicServices/BadMedicine/blob/develop/CHANGELOG.md)
- [Commits](HicServices/SynthEHR@v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: HIC.BadMedicine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* external database commands saved

* Bigfix: Bring Notification Boxes To Front (#1785)

* bring notification to front

* add top most

* Bump NPOI from 2.6.2 to 2.7.0 (#1787)

Bumps [NPOI](https://github.com/nissl-lab/npoi) from 2.6.2 to 2.7.0.
- [Release notes](https://github.com/nissl-lab/npoi/releases)
- [Commits](https://github.com/nissl-lab/npoi/commits)

---
updated-dependencies:
- dependency-name: NPOI
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix value to string conversion (#1788)

* fix value to string conversion

* Update ExcelDataFlowSource.cs

* Task/RDMP-65 remember last used extraction pipeline (#1768)

* extractions remember pipeline

* update changelog

* reorder testing

* fix test

* revert test

* add order to test

* updates from codeql

* tidy up code

* Update ExecuteExtractionUI.cs

* Task/allow extended timeouts (#1773)

* add 50min timeout

* interim

* add optional timeout

* add changelog

* tidy up from codeql

* update

* Task/rdmp 145 improve bak experience (#1772)

* improve bak file usage

* add documentation stub

* add docs

* tidy up code

* bump sixLabors

* update to ui

* restore files

* improve documentation

* add using statement

* specify server when importing existing cohorts

* Task/RDMP-129 Remove wix toolset (#1789)

* start of msi upgrade

* remove wix

* update build steps

* tidy up

* restore file

* update sln

* Feature/rdmp 117 multiple loads per catalogue (#1754)

* basic db objects

* fix typo

* working db linkage

* working build

* add sql update

* update sql

* update tests

* update sql

* update create sql

* update sql

* update sql

* update class

* fix extra space

* attempt to fix tests

* remove linkage

* fix typo

* add test case

* attempt image fix

* fix up image

* add missing file

* add changelog

* interim

* interim

* tidy up code

* fix build

* icons

* rename icon file (#1755)

* working icon

* update create sql

* update patch

* add patch

* working patches

* add basic tests

* tidy up code

* add go

* attempt to fix patch

* tidy up code

* remove true equal true check

* tidy up from review

* update migration

* remove dupe file (#1774)

* fix build

* interim sql

* update patch

* fix sql patch

* update patch id

* update patch id

* fix bad merge

* tidy up code

* tidy up code

---------

Co-authored-by: James A Sutherland <[email protected]>

* allow for multiple identifiers in an project catalogue (#1791)

* fix logic issue

* update changelog

* only convert core categories

* add release date

* update changelog

* Task/rdmp-156 prep 8.1.5 release (#1793)

* add release date

* update changelog

* attempt to fix nuge tpackaging

* Update build.yml

* Task/rdmp 156 prep 8.1.5 release (#1795)

* disable tag check

* add sgen

* revert bad fix

* nudge deps

* fix duplicate deps

* drop dep

* fix build

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James A Sutherland <[email protected]>
Co-authored-by: Brian <[email protected]>
Co-authored-by: James A Sutherland <>
Co-authored-by: James A Sutherland <[email protected]>
Co-authored-by: rdteviotdale <[email protected]>
…sk/RDMP-122-update-a-database-extraction
CHANGELOG.md Outdated Show resolved Hide resolved
@JFriel JFriel requested review from bpeacock001 and JBaird00183 May 23, 2024 08:13
@bpeacock001 bpeacock001 merged commit 138ffc1 into release/8.2.0 May 28, 2024
5 checks passed
@bpeacock001 bpeacock001 deleted the task/RDMP-122-update-a-database-extraction branch May 28, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants