iker-python-common 1.0.2__tar.gz → 1.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. iker_python_common-1.0.4/PKG-INFO +22 -0
  2. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/pyproject.toml +17 -17
  3. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/randutils.py +12 -11
  4. iker_python_common-1.0.4/src/iker_python_common.egg-info/PKG-INFO +22 -0
  5. iker_python_common-1.0.4/src/iker_python_common.egg-info/requires.txt +16 -0
  6. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/dbutils_test.py +6 -6
  7. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/randutils_test.py +4 -4
  8. iker_python_common-1.0.2/PKG-INFO +0 -22
  9. iker_python_common-1.0.2/src/iker_python_common.egg-info/PKG-INFO +0 -22
  10. iker_python_common-1.0.2/src/iker_python_common.egg-info/requires.txt +0 -16
  11. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/.editorconfig +0 -0
  12. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/.github/workflows/pr.yml +0 -0
  13. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/.github/workflows/push.yml +0 -0
  14. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/.gitignore +0 -0
  15. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/MANIFEST.in +0 -0
  16. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/README.md +0 -0
  17. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/VERSION +0 -0
  18. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/resources/unittest/shutils/dir.baz/file.bar.baz +0 -0
  19. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/resources/unittest/shutils/dir.baz/file.foo.bar +0 -0
  20. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/resources/unittest/shutils/dir.baz/file.foo.baz +0 -0
  21. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/resources/unittest/shutils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
  22. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
  23. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
  24. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
  25. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/resources/unittest/shutils/dir.foo/file.bar +0 -0
  26. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/resources/unittest/shutils/dir.foo/file.baz +0 -0
  27. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/resources/unittest/shutils/dir.foo/file.foo +0 -0
  28. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/setup.cfg +0 -0
  29. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/setup.py +0 -0
  30. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/__init__.py +0 -0
  31. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/__init__.py +0 -0
  32. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/config.py +0 -0
  33. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/dbutils.py +0 -0
  34. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/dockerutils.py +0 -0
  35. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/dtutils.py +0 -0
  36. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/funcutils.py +0 -0
  37. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/logger.py +0 -0
  38. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/numutils.py +0 -0
  39. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/retry.py +0 -0
  40. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/s3utils.py +0 -0
  41. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/sequtils.py +0 -0
  42. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/shutils.py +0 -0
  43. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/span.py +0 -0
  44. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/strutils.py +0 -0
  45. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker/common/utils/testutils.py +0 -0
  46. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker_python_common.egg-info/SOURCES.txt +0 -0
  47. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker_python_common.egg-info/dependency_links.txt +0 -0
  48. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker_python_common.egg-info/not-zip-safe +0 -0
  49. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/src/iker_python_common.egg-info/top_level.txt +0 -0
  50. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/__init__.py +0 -0
  51. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/config_test.py +0 -0
  52. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/dockerutils_test.py +0 -0
  53. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/dtutils_test.py +0 -0
  54. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/funcutils_test.py +0 -0
  55. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/logger_test.py +0 -0
  56. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/numutils_test.py +0 -0
  57. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/retry_test.py +0 -0
  58. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/s3utils_test.py +0 -0
  59. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/sequtils_test.py +0 -0
  60. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/shutils_test.py +0 -0
  61. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/span_test.py +0 -0
  62. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/strutils_test.py +0 -0
  63. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/common/utils/testutils_test.py +0 -0
  64. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/docker_fixtures.py +0 -0
  65. {iker_python_common-1.0.2 → iker_python_common-1.0.4}/test/iker_tests/iker_test.py +0 -0
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: iker-python-common
3
+ Version: 1.0.4
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Python :: 3.11
6
+ Classifier: Programming Language :: Python :: 3.12
7
+ Requires-Python: <3.13,>=3.11
8
+ Requires-Dist: boto3>=1.35
9
+ Requires-Dist: docker>=7.1
10
+ Requires-Dist: numpy>=1.26
11
+ Requires-Dist: psycopg>=3.2
12
+ Requires-Dist: pymysql>=1.1
13
+ Requires-Dist: sqlalchemy>=2.0
14
+ Provides-Extra: test
15
+ Requires-Dist: ddt>=1.7; extra == "test"
16
+ Requires-Dist: moto[all,ec2,s3]>=5.0; extra == "test"
17
+ Requires-Dist: pytest-cov>=5.0; extra == "test"
18
+ Requires-Dist: pytest-mock>=3.14; extra == "test"
19
+ Requires-Dist: pytest-mysql>=3.0; extra == "test"
20
+ Requires-Dist: pytest-order>=1.3; extra == "test"
21
+ Requires-Dist: pytest-postgresql>=6.1; extra == "test"
22
+ Requires-Dist: pytest>=8.3; extra == "test"
@@ -1,8 +1,8 @@
1
1
  [build-system]
2
2
  requires = [
3
- "setuptools~=75.0",
4
- "setuptools-scm~=8.0",
5
- "iker-python-setup~=1.0",
3
+ "setuptools>=75.0",
4
+ "setuptools-scm>=8.0",
5
+ "iker-python-setup>=1.0",
6
6
  ]
7
7
  build-backend = "setuptools.build_meta"
8
8
 
@@ -16,24 +16,24 @@ classifiers = [
16
16
  "Programming Language :: Python :: 3.12",
17
17
  ]
18
18
  dependencies = [
19
- "boto3~=1.35",
20
- "docker~=7.1",
21
- "numpy~=1.26",
22
- "psycopg~=3.2",
23
- "pymysql~=1.1",
24
- "sqlalchemy~=2.0",
19
+ "boto3>=1.35",
20
+ "docker>=7.1",
21
+ "numpy>=1.26",
22
+ "psycopg>=3.2",
23
+ "pymysql>=1.1",
24
+ "sqlalchemy>=2.0",
25
25
  ]
26
26
 
27
27
  [project.optional-dependencies]
28
28
  test = [
29
- "ddt~=1.7",
30
- "moto[ec2,s3,all]~=5.0",
31
- "pytest-cov~=5.0",
32
- "pytest-mock~=3.14",
33
- "pytest-mysql~=3.0",
34
- "pytest-order~=1.3",
35
- "pytest-postgresql~=6.1",
36
- "pytest~=8.3",
29
+ "ddt>=1.7",
30
+ "moto[ec2,s3,all]>=5.0",
31
+ "pytest-cov>=5.0",
32
+ "pytest-mock>=3.14",
33
+ "pytest-mysql>=3.0",
34
+ "pytest-order>=1.3",
35
+ "pytest-postgresql>=6.1",
36
+ "pytest>=8.3",
37
37
  ]
38
38
 
39
39
  [tool.setuptools]
@@ -4,6 +4,7 @@ import random
4
4
  import string
5
5
  import sys
6
6
 
7
+ from iker.common.utils.dtutils import dt_utc_max, dt_utc_min
7
8
  from iker.common.utils.funcutils import memorized, singleton
8
9
 
9
10
  __all__ = [
@@ -80,28 +81,28 @@ class Randomizer(object):
80
81
 
81
82
  def random_datetime(
82
83
  self,
83
- begin: datetime.datetime = datetime.datetime.min,
84
- end: datetime.datetime = datetime.datetime.max,
84
+ begin: datetime.datetime = dt_utc_min(),
85
+ end: datetime.datetime = dt_utc_max(),
85
86
  ) -> datetime.datetime:
86
87
  return begin + datetime.timedelta(seconds=self.next_float(0.0, (end - begin).total_seconds()))
87
88
 
88
89
  def random_date(
89
90
  self,
90
- begin: datetime.date = datetime.date.min,
91
- end: datetime.date = datetime.date.max,
91
+ begin: datetime.date = dt_utc_min().date(),
92
+ end: datetime.date = dt_utc_max().date(),
92
93
  ) -> datetime.date:
93
- dt = self.random_datetime(datetime.datetime.combine(begin, datetime.time.min),
94
- datetime.datetime.combine(end, datetime.time.min))
94
+ dt = self.random_datetime(datetime.datetime.combine(begin, dt_utc_min().timetz()),
95
+ datetime.datetime.combine(end, dt_utc_min().timetz()))
95
96
  return dt.date()
96
97
 
97
98
  def random_time(
98
99
  self,
99
- begin: datetime.time = datetime.time.min,
100
- end: datetime.time = datetime.time.max,
100
+ begin: datetime.time = dt_utc_min().timetz(),
101
+ end: datetime.time = dt_utc_max().timetz(),
101
102
  ) -> datetime.time:
102
- dt = self.random_datetime(datetime.datetime.combine(datetime.date.min, begin),
103
- datetime.datetime.combine(datetime.date.min, end))
104
- return dt.time()
103
+ dt = self.random_datetime(datetime.datetime.combine(dt_utc_min().date(), begin),
104
+ datetime.datetime.combine(dt_utc_min().date(), end))
105
+ return dt.timetz()
105
106
 
106
107
  def random_json_object(
107
108
  self,
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: iker-python-common
3
+ Version: 1.0.4
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Python :: 3.11
6
+ Classifier: Programming Language :: Python :: 3.12
7
+ Requires-Python: <3.13,>=3.11
8
+ Requires-Dist: boto3>=1.35
9
+ Requires-Dist: docker>=7.1
10
+ Requires-Dist: numpy>=1.26
11
+ Requires-Dist: psycopg>=3.2
12
+ Requires-Dist: pymysql>=1.1
13
+ Requires-Dist: sqlalchemy>=2.0
14
+ Provides-Extra: test
15
+ Requires-Dist: ddt>=1.7; extra == "test"
16
+ Requires-Dist: moto[all,ec2,s3]>=5.0; extra == "test"
17
+ Requires-Dist: pytest-cov>=5.0; extra == "test"
18
+ Requires-Dist: pytest-mock>=3.14; extra == "test"
19
+ Requires-Dist: pytest-mysql>=3.0; extra == "test"
20
+ Requires-Dist: pytest-order>=1.3; extra == "test"
21
+ Requires-Dist: pytest-postgresql>=6.1; extra == "test"
22
+ Requires-Dist: pytest>=8.3; extra == "test"
@@ -0,0 +1,16 @@
1
+ boto3>=1.35
2
+ docker>=7.1
3
+ numpy>=1.26
4
+ psycopg>=3.2
5
+ pymysql>=1.1
6
+ sqlalchemy>=2.0
7
+
8
+ [test]
9
+ ddt>=1.7
10
+ moto[all,ec2,s3]>=5.0
11
+ pytest-cov>=5.0
12
+ pytest-mock>=3.14
13
+ pytest-mysql>=3.0
14
+ pytest-order>=1.3
15
+ pytest-postgresql>=6.1
16
+ pytest>=8.3
@@ -142,8 +142,8 @@ def test_mysql_adapter(fixture_mysql_test_proc, fixture_mysql_test):
142
142
  dummy_float=rng.next_fixed(6),
143
143
  dummy_double=Decimal(rng.next_fixed(10)),
144
144
  dummy_date=rng.random_date(),
145
- dummy_time=rng.random_time().replace(microsecond=0),
146
- dummy_datetime=rng.random_datetime().replace(microsecond=0),
145
+ dummy_time=rng.random_time().replace(microsecond=0, tzinfo=None),
146
+ dummy_datetime=rng.random_datetime().replace(microsecond=0, tzinfo=None),
147
147
  dummy_json=rng.random_json_object(max_depth=5),
148
148
  dummy_unique_string=dummy_unique_string(),
149
149
  )
@@ -254,10 +254,10 @@ def test_postgresql_adapter(fixture_postgresql_test_proc, fixture_postgresql_tes
254
254
  dummy_float=rng.next_fixed(6),
255
255
  dummy_double_precision=rng.next_float(),
256
256
  dummy_date=rng.random_date(),
257
- dummy_time=rng.random_time().replace(microsecond=0),
258
- dummy_time_tz=rng.random_time().replace(microsecond=0, tzinfo=datetime.timezone.utc),
259
- dummy_timestamp=rng.random_datetime().replace(microsecond=0),
260
- dummy_timestamp_tz=rng.random_datetime().replace(microsecond=0, tzinfo=datetime.timezone.utc),
257
+ dummy_time=rng.random_time().replace(microsecond=0, tzinfo=None),
258
+ dummy_time_tz=rng.random_time().replace(microsecond=0),
259
+ dummy_timestamp=rng.random_datetime().replace(microsecond=0, tzinfo=None),
260
+ dummy_timestamp_tz=rng.random_datetime().replace(microsecond=0),
261
261
  dummy_array_varchar=list(rng.random_ascii(rng.next_int(0, 10)) for _ in range(rng.next_int(0, 10))),
262
262
  dummy_jsonb=rng.random_json_object(max_depth=5),
263
263
  dummy_json=rng.random_json_object(max_depth=5),
@@ -1,9 +1,9 @@
1
- import datetime
2
1
  import unittest
3
2
 
4
3
  import ddt
5
4
  import pytest
6
5
 
6
+ from iker.common.utils.dtutils import dt_utc_max, dt_utc_min
7
7
  from iker.common.utils.randutils import max_float, max_int, randomizer
8
8
 
9
9
 
@@ -109,7 +109,7 @@ class RandUtilsTest(unittest.TestCase):
109
109
  end = max(a, b)
110
110
  result = randomizer().random_datetime(begin, end)
111
111
 
112
- self.assertTrue(datetime.datetime.min <= begin <= result <= end <= datetime.datetime.max)
112
+ self.assertTrue(dt_utc_min() <= begin <= result <= end <= dt_utc_max())
113
113
 
114
114
  def test_random_date(self):
115
115
  for _ in range(1000):
@@ -119,7 +119,7 @@ class RandUtilsTest(unittest.TestCase):
119
119
  end = max(a, b)
120
120
  result = randomizer().random_date(begin, end)
121
121
 
122
- self.assertTrue(datetime.date.min <= begin <= result <= end <= datetime.date.max)
122
+ self.assertTrue(dt_utc_min().date() <= begin <= result <= end <= dt_utc_max().date())
123
123
 
124
124
  def test_random_time(self):
125
125
  for _ in range(1000):
@@ -129,4 +129,4 @@ class RandUtilsTest(unittest.TestCase):
129
129
  end = max(a, b)
130
130
  result = randomizer().random_time(begin, end)
131
131
 
132
- self.assertTrue(datetime.time.min <= begin <= result <= end <= datetime.time.max)
132
+ self.assertTrue(dt_utc_min().timetz() <= begin <= result <= end <= dt_utc_max().timetz())
@@ -1,22 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: iker-python-common
3
- Version: 1.0.2
4
- Classifier: Programming Language :: Python :: 3
5
- Classifier: Programming Language :: Python :: 3.11
6
- Classifier: Programming Language :: Python :: 3.12
7
- Requires-Python: <3.13,>=3.11
8
- Requires-Dist: boto3~=1.35
9
- Requires-Dist: docker~=7.1
10
- Requires-Dist: numpy~=1.26
11
- Requires-Dist: psycopg~=3.2
12
- Requires-Dist: pymysql~=1.1
13
- Requires-Dist: sqlalchemy~=2.0
14
- Provides-Extra: test
15
- Requires-Dist: ddt~=1.7; extra == "test"
16
- Requires-Dist: moto[all,ec2,s3]~=5.0; extra == "test"
17
- Requires-Dist: pytest-cov~=5.0; extra == "test"
18
- Requires-Dist: pytest-mock~=3.14; extra == "test"
19
- Requires-Dist: pytest-mysql~=3.0; extra == "test"
20
- Requires-Dist: pytest-order~=1.3; extra == "test"
21
- Requires-Dist: pytest-postgresql~=6.1; extra == "test"
22
- Requires-Dist: pytest~=8.3; extra == "test"
@@ -1,22 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: iker-python-common
3
- Version: 1.0.2
4
- Classifier: Programming Language :: Python :: 3
5
- Classifier: Programming Language :: Python :: 3.11
6
- Classifier: Programming Language :: Python :: 3.12
7
- Requires-Python: <3.13,>=3.11
8
- Requires-Dist: boto3~=1.35
9
- Requires-Dist: docker~=7.1
10
- Requires-Dist: numpy~=1.26
11
- Requires-Dist: psycopg~=3.2
12
- Requires-Dist: pymysql~=1.1
13
- Requires-Dist: sqlalchemy~=2.0
14
- Provides-Extra: test
15
- Requires-Dist: ddt~=1.7; extra == "test"
16
- Requires-Dist: moto[all,ec2,s3]~=5.0; extra == "test"
17
- Requires-Dist: pytest-cov~=5.0; extra == "test"
18
- Requires-Dist: pytest-mock~=3.14; extra == "test"
19
- Requires-Dist: pytest-mysql~=3.0; extra == "test"
20
- Requires-Dist: pytest-order~=1.3; extra == "test"
21
- Requires-Dist: pytest-postgresql~=6.1; extra == "test"
22
- Requires-Dist: pytest~=8.3; extra == "test"
@@ -1,16 +0,0 @@
1
- boto3~=1.35
2
- docker~=7.1
3
- numpy~=1.26
4
- psycopg~=3.2
5
- pymysql~=1.1
6
- sqlalchemy~=2.0
7
-
8
- [test]
9
- ddt~=1.7
10
- moto[all,ec2,s3]~=5.0
11
- pytest-cov~=5.0
12
- pytest-mock~=3.14
13
- pytest-mysql~=3.0
14
- pytest-order~=1.3
15
- pytest-postgresql~=6.1
16
- pytest~=8.3