-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature/rdmp 73 cohort holdouts #1653
Merged
Merged
Changes from 8 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8d694ca
add top to cohort
JFriel dc27f96
working holdout flow
JFriel 16a4470
interim
JFriel 8baaee2
basic ui flow
JFriel 6917804
now filtering
JFriel 0b5c983
working flow
JFriel 3e7ba3a
working auto-holdout
JFriel 49ed3b2
fix test
JFriel 5948f79
Merge branch 'develop' of https://github.com/HicServices/RDMP into fe…
JFriel d318a3d
add query
JFriel 8e22249
improved holdout
JFriel a327171
tidy up code
JFriel bbea3ee
add description
JFriel 0286883
revert test db
JFriel 50b86c7
add holdout description
JFriel 8d5ada5
add todo
JFriel 25fa9be
Merge branch 'develop' into feature/RDMP-73-cohort-holdouts
jas88 ac74e48
fixups from codeql
JFriel 2c9da25
Minor syntax fix
jas88 1fd6047
Fix possible null deref
9deee83
Merge branch 'develop' into feature/RDMP-73-cohort-holdouts
JFriel e61c076
Merge branch 'develop' of https://github.com/HicServices/RDMP into fe…
JFriel 0b4eea7
Merge branch 'develop' into feature/RDMP-73-cohort-holdouts
JFriel e8caf21
fix todo url
JFriel 6ee38cd
Merge branch 'feature/RDMP-73-cohort-holdouts' of https://github.com/…
JFriel f838887
Merge branch 'develop' into feature/RDMP-73-cohort-holdouts
JFriel 95c189d
Merge branch 'develop' into feature/RDMP-73-cohort-holdouts
jas88 4a7cefa
Tidy, typo fix
jas88 f3415ed
Merge branch 'develop' into feature/RDMP-73-cohort-holdouts
jas88 b58a1c6
Remove disused field
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
Rdmp.Core/CohortCommitting/Pipeline/CohortHoldoutLookupRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Copyright (c) The University of Dundee 2018-2019 | ||
// 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 System; | ||
using System.Globalization; | ||
using System.Security.Permissions; | ||
using NPOI.SS.Formula.Functions; | ||
using Rdmp.Core.Curation.Data.Cohort; | ||
using Rdmp.Core.Curation.Data.Pipelines; | ||
using Rdmp.Core.DataFlowPipeline.Requirements; | ||
using Rdmp.Core.MapsDirectlyToDatabaseTable; | ||
|
||
namespace Rdmp.Core.CohortCommitting.Pipeline; | ||
|
||
/// <summary> | ||
/// All metadata details nessesary to create a cohort including which project it goes into, its name, version etc. There are no identifiers for the cohort. | ||
/// Also functions as the use case for cohort creation (to which it passes itself as an input object). | ||
/// </summary> | ||
public sealed class CohortHoldoutLookupRequest : PipelineUseCase, ICanBeSummarised, ICohortHoldoutLookupRequest | ||
{ | ||
public CohortIdentificationConfiguration CIC { get; set; } | ||
public int Count { get; set; } | ||
public bool IsPercent { get; set; } | ||
|
||
public string DescriptionForAuditLog { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public DateTime MinDate { get; set; } | ||
public DateTime MaxDate { get; set; } | ||
public string DateColumnName { get; set; } | ||
public CohortHoldoutLookupRequest(CohortIdentificationConfiguration cic, string name, int count, bool isPercent, string descriptionForAuditLog,string minDate=null,string maxDate=null,string dateColumnName=null) | ||
{ | ||
CIC = cic; | ||
Name = name; | ||
Count = count; | ||
IsPercent = isPercent; | ||
DescriptionForAuditLog = descriptionForAuditLog; | ||
DateTime _MinDate; | ||
DateTime.TryParseExact(minDate, "DD/MM/YYYY", new CultureInfo("en-GB"), DateTimeStyles.None,out _MinDate); | ||
MinDate = _MinDate; | ||
DateTime _MaxDate; | ||
DateTime.TryParseExact(maxDate, "DD/MM/YYYY", new CultureInfo("en-GB"), DateTimeStyles.None, out _MaxDate); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor C# tip for the future: you can do that inline as "out var foo" instead of "DateTime foo; ... out foo", and you can write straight to the target instead of doing "out var tmp; foo = tmp;" (if it's a variable not a property!) |
||
MinDate = _MinDate; | ||
DateColumnName = dateColumnName; | ||
AddInitializationObject(this); | ||
} | ||
public string GetSummary(bool includeName, bool includeId) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
protected override IDataFlowPipelineContext GenerateContextImpl() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Rdmp.Core/CohortCommitting/Pipeline/ICohortHoldoutLookupRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Rdmp.Core.CohortCommitting.Pipeline | ||
{ | ||
internal interface ICohortHoldoutLookupRequest | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking this should be ui.Result:null like the method above, instead of returning the result regardless of the user action?