From 72c40b50c47ef80b535d39ae0a1d659f1cab2d0a Mon Sep 17 00:00:00 2001 From: lizlouise1335 Date: Thu, 13 Jul 2023 10:00:13 -0400 Subject: [PATCH 1/5] just moving files that have already been merged into right folders --- .../datetime_generator.py | 0 .../float_generator.py | 0 tests/{ => distinct_generators}/test_datetime_generator.py | 0 tests/{ => distinct_generators}/test_float_generator.py | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename synthetic_data/{dataset_generators => distinct_generators}/datetime_generator.py (100%) rename synthetic_data/{dataset_generators => distinct_generators}/float_generator.py (100%) rename tests/{ => distinct_generators}/test_datetime_generator.py (100%) rename tests/{ => distinct_generators}/test_float_generator.py (100%) diff --git a/synthetic_data/dataset_generators/datetime_generator.py b/synthetic_data/distinct_generators/datetime_generator.py similarity index 100% rename from synthetic_data/dataset_generators/datetime_generator.py rename to synthetic_data/distinct_generators/datetime_generator.py diff --git a/synthetic_data/dataset_generators/float_generator.py b/synthetic_data/distinct_generators/float_generator.py similarity index 100% rename from synthetic_data/dataset_generators/float_generator.py rename to synthetic_data/distinct_generators/float_generator.py diff --git a/tests/test_datetime_generator.py b/tests/distinct_generators/test_datetime_generator.py similarity index 100% rename from tests/test_datetime_generator.py rename to tests/distinct_generators/test_datetime_generator.py diff --git a/tests/test_float_generator.py b/tests/distinct_generators/test_float_generator.py similarity index 100% rename from tests/test_float_generator.py rename to tests/distinct_generators/test_float_generator.py From 7837442621aae57203545a8f6a1dc9a2f498b89a Mon Sep 17 00:00:00 2001 From: lizlouise1335 Date: Thu, 13 Jul 2023 10:07:02 -0400 Subject: [PATCH 2/5] directory change in files --- tests/distinct_generators/test_datetime_generator.py | 2 +- tests/distinct_generators/test_float_generator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/distinct_generators/test_datetime_generator.py b/tests/distinct_generators/test_datetime_generator.py index b475cf7e..534af149 100644 --- a/tests/distinct_generators/test_datetime_generator.py +++ b/tests/distinct_generators/test_datetime_generator.py @@ -3,7 +3,7 @@ from numpy.random import Generator, PCG64 import pandas as pd import numpy as np -import synthetic_data.dataset_generators.datetime_generator as dtg +import synthetic_data.distinct_generators.datetime_generator as dtg class TestDatetimeFunctions(unittest.TestCase): diff --git a/tests/distinct_generators/test_float_generator.py b/tests/distinct_generators/test_float_generator.py index e646cd3d..be0dbf18 100644 --- a/tests/distinct_generators/test_float_generator.py +++ b/tests/distinct_generators/test_float_generator.py @@ -1,7 +1,7 @@ import unittest import numpy as np from numpy.random import Generator, PCG64 -from synthetic_data.dataset_generators.float_generator import random_floats +from synthetic_data.distinct_generators.float_generator import random_floats class TestRandomFloats(unittest.TestCase): From 2130f187c319f0a552ff63c6f160193b947a486b Mon Sep 17 00:00:00 2001 From: lizlouise1335 Date: Thu, 13 Jul 2023 10:10:55 -0400 Subject: [PATCH 3/5] variable name change --- .../distinct_generators/test_datetime_generator.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/distinct_generators/test_datetime_generator.py b/tests/distinct_generators/test_datetime_generator.py index 534af149..05578c51 100644 --- a/tests/distinct_generators/test_datetime_generator.py +++ b/tests/distinct_generators/test_datetime_generator.py @@ -3,7 +3,7 @@ from numpy.random import Generator, PCG64 import pandas as pd import numpy as np -import synthetic_data.distinct_generators.datetime_generator as dtg +import synthetic_data.distinct_generators.datetime_generator as date_generator class TestDatetimeFunctions(unittest.TestCase): @@ -14,13 +14,13 @@ def setUp(self): self.date_format_list = ["%Y-%m-%d", "%d-%m-%Y"] def test_generate_datetime_return_type(self): - date_str = dtg.generate_datetime( + date_str = date_generator.generate_datetime( self.rng, self.date_format_list[0], self.start_date, self.end_date ) self.assertIsInstance(date_str, str) def test_generate_datetime_format(self): - date_str = dtg.generate_datetime( + date_str = date_generator.generate_datetime( self.rng, self.date_format_list[0], self.start_date, self.end_date ) try: @@ -29,7 +29,7 @@ def test_generate_datetime_format(self): self.fail("pd.to_datetime() raised ValueError unexpectedly") def test_generate_datetime_range(self): - date_str = dtg.generate_datetime( + date_str = date_generator.generate_datetime( self.rng, self.date_format_list[0], self.start_date, self.end_date ) date_obj = pd.to_datetime(date_str, format=self.date_format_list[0]) @@ -37,14 +37,14 @@ def test_generate_datetime_range(self): self.assertTrue(date_obj <= self.end_date) def test_random_datetimes_return_type_and_size(self): - result = dtg.random_datetimes( + result = date_generator.random_datetimes( self.rng, self.date_format_list, self.start_date, self.end_date, 5 ) self.assertIsInstance(result, np.ndarray) self.assertEqual(result.shape[0], 5) def test_random_datetimes_default_format_usage(self): - result = dtg.random_datetimes( + result = date_generator.random_datetimes( self.rng, None, self.start_date, self.end_date, 10 ) for date_str in result: @@ -54,7 +54,7 @@ def test_random_datetimes_default_format_usage(self): self.fail("pd.to_datetime() raised ValueError unexpectedly") def test_random_datetimes_format_usage(self): - result = dtg.random_datetimes( + result = date_generator.random_datetimes( self.rng, self.date_format_list, self.start_date, self.end_date, 10 ) format_success = [False] * len(self.date_format_list) From 142c90962222588de21c40e43d9b2a8474dbe5cd Mon Sep 17 00:00:00 2001 From: Liz Smith Date: Thu, 13 Jul 2023 10:12:12 -0400 Subject: [PATCH 4/5] Update tests/distinct_generators/test_float_generator.py Co-authored-by: Taylor Turner --- tests/distinct_generators/test_float_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/distinct_generators/test_float_generator.py b/tests/distinct_generators/test_float_generator.py index be0dbf18..7477a0af 100644 --- a/tests/distinct_generators/test_float_generator.py +++ b/tests/distinct_generators/test_float_generator.py @@ -1,7 +1,7 @@ import unittest import numpy as np from numpy.random import Generator, PCG64 -from synthetic_data.distinct_generators.float_generator import random_floats +from synthetic_data.distinct_generators.float_generator import gen_rnd_floats class TestRandomFloats(unittest.TestCase): From fcaa78ae7d2cdba3e44a37818905a3e8f560e76a Mon Sep 17 00:00:00 2001 From: lizlouise1335 Date: Thu, 13 Jul 2023 10:15:24 -0400 Subject: [PATCH 5/5] fixes --- tests/distinct_generators/test_float_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/distinct_generators/test_float_generator.py b/tests/distinct_generators/test_float_generator.py index 7477a0af..be0dbf18 100644 --- a/tests/distinct_generators/test_float_generator.py +++ b/tests/distinct_generators/test_float_generator.py @@ -1,7 +1,7 @@ import unittest import numpy as np from numpy.random import Generator, PCG64 -from synthetic_data.distinct_generators.float_generator import gen_rnd_floats +from synthetic_data.distinct_generators.float_generator import random_floats class TestRandomFloats(unittest.TestCase):