-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from HicServices/develop
v1.1.0 release
- Loading branch information
Showing
19 changed files
with
422 additions
and
30 deletions.
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
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
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,55 @@ | ||
using System; | ||
using System.Threading; | ||
|
||
namespace BadMedicine.Datasets | ||
{ | ||
/// <include file='../../Datasets.doc.xml' path='Datasets/UltraWide'/> | ||
public class UltraWide : DataGenerator | ||
{ | ||
int autonum = 1; | ||
|
||
/// <inheritdoc/> | ||
public UltraWide(Random rand) : base(rand) | ||
{ | ||
} | ||
|
||
/// <inheritdoc/> | ||
public override object[] GenerateTestDataRow(Person p) | ||
{ | ||
r.Next(); | ||
|
||
var array = new object[20_000]; | ||
array[0] = Interlocked.Increment(ref autonum); | ||
array[1] = p.CHI; | ||
|
||
for (var i = 2; i < array.Length; i++) | ||
{ | ||
array[i] = i switch | ||
{ | ||
< 4_000 => r.Next(), | ||
< 8_000 => r.NextDouble(), | ||
< 16_000 => GetRandomSentence(r), | ||
< 19_500 => GetRandomGPCode(r), | ||
_ => GetGaussianInt(50, 50000) | ||
}; | ||
} | ||
|
||
return array; | ||
} | ||
|
||
/// <inheritdoc/> | ||
protected override string[] GetHeaders() | ||
{ | ||
var array = new string[20_000]; | ||
array[0] = "id"; | ||
array[1] = "chi"; | ||
|
||
for (var i = 2; i < array.Length; i++) | ||
{ | ||
array[i] = $"col{i}"; | ||
} | ||
|
||
return array; | ||
} | ||
} | ||
} |
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,55 @@ | ||
using System; | ||
using System.Threading; | ||
|
||
namespace BadMedicine.Datasets | ||
{ | ||
/// <include file='../../Datasets.doc.xml' path='Datasets/Wide'/> | ||
public class Wide : DataGenerator | ||
{ | ||
int autonum = 1; | ||
|
||
/// <inheritdoc/> | ||
public Wide(Random rand) : base(rand) | ||
{ | ||
} | ||
|
||
/// <inheritdoc/> | ||
public override object[] GenerateTestDataRow(Person p) | ||
{ | ||
r.Next(); | ||
|
||
var array = new object[980]; | ||
array[0] = Interlocked.Increment(ref autonum); | ||
array[1] = p.CHI; | ||
|
||
for (var i = 2; i < array.Length; i++) | ||
{ | ||
array[i] = i switch | ||
{ | ||
< 100 => r.Next(), | ||
< 200 => r.NextDouble(), | ||
< 300 => GetRandomSentence(r), | ||
< 400 => GetRandomGPCode(r), | ||
_ => GetGaussianInt(50, 50000) | ||
}; | ||
} | ||
|
||
return array; | ||
} | ||
|
||
/// <inheritdoc/> | ||
protected override string[] GetHeaders() | ||
{ | ||
var array = new string[980]; | ||
array[0] = "id"; | ||
array[1] = "chi"; | ||
|
||
for (var i = 2; i < array.Length; i++) | ||
{ | ||
array[i] = $"col{i}"; | ||
} | ||
|
||
return array; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Database: | ||
# Set to true to drop and recreate tables described in the Template | ||
DropTables: false | ||
# The connection string to your database | ||
ConnectionString: server=127.0.0.1;Uid=root;Pwd=root;SslMode=None;AllowPublicKeyRetrieval=True | ||
# Your DBMS provider ('MySql', 'PostgreSql','Oracle' or 'MicrosoftSQLServer') | ||
DatabaseType: MySql | ||
# Database to create/use on the server | ||
DatabaseName: BadMedicineTestData |
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,7 @@ | ||
namespace BadMedicine.Configuration | ||
{ | ||
class Config | ||
{ | ||
public TargetDatabase Database { get;set; } | ||
} | ||
} |
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,30 @@ | ||
using FAnsi; | ||
|
||
namespace BadMedicine.Configuration | ||
{ | ||
/// <summary> | ||
/// Identify the target database and configuration for generated data | ||
/// </summary> | ||
public class TargetDatabase | ||
{ | ||
/// <summary> | ||
/// Which RDBMS the database is (MySQL, Microsoft SQL Server, etc) | ||
/// </summary> | ||
public DatabaseType DatabaseType { get; set; } | ||
/// <summary> | ||
/// The ConnectionString containing the server name, credentials and other parameters for the connection | ||
/// </summary> | ||
public string ConnectionString { get; set; } | ||
|
||
/// <summary> | ||
/// The name of database | ||
/// </summary> | ||
public string DatabaseName { get; set; } | ||
|
||
/// <summary> | ||
/// Set to true to drop and recreate tables described in the Template | ||
/// </summary> | ||
public bool DropTables { get; set; } | ||
|
||
} | ||
} |
Oops, something went wrong.