iker-python-common 1.0.19__tar.gz → 1.0.21__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 (71) hide show
  1. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/.github/workflows/pr.yml +3 -3
  2. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/.github/workflows/push.yml +9 -1
  3. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/PKG-INFO +1 -1
  4. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/README.md +4 -1
  5. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker_python_common.egg-info/PKG-INFO +1 -1
  6. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker_python_common.egg-info/SOURCES.txt +1 -1
  7. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/testutils_test.py +49 -1
  8. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/.editorconfig +0 -0
  9. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/.gitignore +0 -0
  10. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/MANIFEST.in +0 -0
  11. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/VERSION +0 -0
  12. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/pyproject.toml +0 -0
  13. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/config/config.cfg +0 -0
  14. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/csv/data.csv +0 -0
  15. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/csv/data.tsv +0 -0
  16. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/shutils/dir.baz/file.bar.baz +0 -0
  17. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/shutils/dir.baz/file.foo.bar +0 -0
  18. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/shutils/dir.baz/file.foo.baz +0 -0
  19. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/shutils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
  20. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
  21. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
  22. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
  23. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/shutils/dir.foo/file.bar +0 -0
  24. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/shutils/dir.foo/file.baz +0 -0
  25. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/resources/unittest/shutils/dir.foo/file.foo +0 -0
  26. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/setup.cfg +0 -0
  27. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/setup.py +0 -0
  28. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/__init__.py +0 -0
  29. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/__init__.py +0 -0
  30. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/argutils.py +0 -0
  31. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/config.py +0 -0
  32. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/csv.py +0 -0
  33. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/dbutils.py +0 -0
  34. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/dockerutils.py +0 -0
  35. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/dtutils.py +0 -0
  36. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/funcutils.py +0 -0
  37. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/jsonutils.py +0 -0
  38. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/logger.py +0 -0
  39. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/numutils.py +0 -0
  40. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/randutils.py +0 -0
  41. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/retry.py +0 -0
  42. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/s3utils.py +0 -0
  43. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/sequtils.py +0 -0
  44. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/shutils.py +0 -0
  45. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/span.py +0 -0
  46. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/strutils.py +0 -0
  47. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker/common/utils/testutils.py +0 -0
  48. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker_python_common.egg-info/dependency_links.txt +0 -0
  49. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker_python_common.egg-info/not-zip-safe +0 -0
  50. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker_python_common.egg-info/requires.txt +0 -0
  51. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/src/iker_python_common.egg-info/top_level.txt +0 -0
  52. {iker_python_common-1.0.19/test/iker_tests → iker_python_common-1.0.21/test}/iker_test.py +0 -0
  53. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/__init__.py +0 -0
  54. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/argutils_test.py +0 -0
  55. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/config_test.py +0 -0
  56. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/csv_test.py +0 -0
  57. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/dbutils_test.py +0 -0
  58. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/dockerutils_test.py +0 -0
  59. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/dtutils_test.py +0 -0
  60. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/funcutils_test.py +0 -0
  61. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/jsonutils_test.py +0 -0
  62. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/logger_test.py +0 -0
  63. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/numutils_test.py +0 -0
  64. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/randutils_test.py +0 -0
  65. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/retry_test.py +0 -0
  66. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/s3utils_test.py +0 -0
  67. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/sequtils_test.py +0 -0
  68. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/shutils_test.py +0 -0
  69. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/span_test.py +0 -0
  70. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/common/utils/strutils_test.py +0 -0
  71. {iker_python_common-1.0.19 → iker_python_common-1.0.21}/test/iker_tests/docker_fixtures.py +0 -0
@@ -24,7 +24,7 @@ jobs:
24
24
  sudo apt-get install libxml2-dev libxslt1-dev llvm-14-dev
25
25
  python -m pip install --upgrade pip
26
26
  python -m pip install .[test]
27
- python -m pytest . --cov --cov-config pyproject.toml
27
+ python -m pytest . --cov --cov-report xml --cov-config pyproject.toml
28
28
 
29
29
  build-python312:
30
30
  runs-on: ubuntu-latest
@@ -42,7 +42,7 @@ jobs:
42
42
  sudo apt-get install libxml2-dev libxslt1-dev llvm-14-dev
43
43
  python -m pip install --upgrade pip
44
44
  python -m pip install .[test]
45
- python -m pytest . --cov --cov-config pyproject.toml
45
+ python -m pytest . --cov --cov-report xml --cov-config pyproject.toml
46
46
 
47
47
  build-python313:
48
48
  runs-on: ubuntu-latest
@@ -60,4 +60,4 @@ jobs:
60
60
  sudo apt-get install libxml2-dev libxslt1-dev llvm-14-dev
61
61
  python -m pip install --upgrade pip
62
62
  python -m pip install .[test]
63
- python -m pytest . --cov --cov-config pyproject.toml
63
+ python -m pytest . --cov --cov-report xml --cov-config pyproject.toml
@@ -23,6 +23,14 @@ jobs:
23
23
  run: |
24
24
  sudo apt-get install libxml2-dev libxslt1-dev llvm-14-dev
25
25
  python -m pip install --upgrade pip build twine
26
- python -m pip install .
26
+ python -m pip install .[test]
27
+ python -m pytest . --cov --cov-report xml --cov-config pyproject.toml
27
28
  python -m build -sw .
28
29
  python -m twine upload --username __token__ --password ${{ secrets.PYPI_TOKEN }} dist/*
30
+
31
+ - name: Upload Coverage Report
32
+ uses: codecov/codecov-action@v5
33
+ with:
34
+ token: ${{ secrets.CODECOV_TOKEN }}
35
+ slug: ${{ github.organization }}/${{ github.repository }}
36
+ fail_ci_if_error: true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iker-python-common
3
- Version: 1.0.19
3
+ Version: 1.0.21
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.11
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -1,5 +1,8 @@
1
1
  # Iker's Python Common Module
2
2
 
3
+ [![codecov](https://codecov.io/gh/ruyangshou/iker-python-common/graph/badge.svg?token=0FGT4M40CD)](
4
+ https://codecov.io/gh/ruyangshou/iker-python-common)
5
+
3
6
  ## Build and Deploy
4
7
 
5
8
  ### Using Conda
@@ -10,7 +13,7 @@ the [official site](https://www.anaconda.com/products/distribution)
10
13
  Create a Conda environment and install the modules and their dependencies in it
11
14
 
12
15
  ```shell
13
- conda create -n iker python=3.12
16
+ conda create -n iker python=3.13
14
17
  conda activate iker
15
18
 
16
19
  pip install .
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iker-python-common
3
- Version: 1.0.19
3
+ Version: 1.0.21
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.11
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -46,9 +46,9 @@ src/iker_python_common.egg-info/dependency_links.txt
46
46
  src/iker_python_common.egg-info/not-zip-safe
47
47
  src/iker_python_common.egg-info/requires.txt
48
48
  src/iker_python_common.egg-info/top_level.txt
49
+ test/iker_test.py
49
50
  test/iker_tests/__init__.py
50
51
  test/iker_tests/docker_fixtures.py
51
- test/iker_tests/iker_test.py
52
52
  test/iker_tests/common/utils/argutils_test.py
53
53
  test/iker_tests/common/utils/config_test.py
54
54
  test/iker_tests/common/utils/csv_test.py
@@ -5,8 +5,9 @@ from dataclasses import dataclass
5
5
  from decimal import Decimal
6
6
 
7
7
  import ddt
8
+ import pytest
8
9
 
9
- from iker.common.utils.testutils import nested_approx, return_callee
10
+ from iker.common.utils.testutils import nested_approx, return_callee, throw_callee
10
11
 
11
12
 
12
13
  @dataclass(eq=True, frozen=True)
@@ -357,3 +358,50 @@ class TestUtilsTest(unittest.TestCase):
357
358
  dummy_int=1,
358
359
  dummy_float=1.0,
359
360
  dummy_str="dummy_string")
361
+
362
+ def test_return_callee__multiple_calls(self):
363
+ callee_0 = return_callee(0)
364
+ callee_1 = return_callee(1)
365
+ callee_2 = return_callee(4)
366
+ callee_3 = return_callee(9)
367
+
368
+ self.assertEqual(callee_1(1), 1)
369
+ self.assertEqual(callee_2(2), 4)
370
+ self.assertEqual(callee_2(2), 4)
371
+ self.assertEqual(callee_3(3), 9)
372
+ self.assertEqual(callee_3(3), 9)
373
+ self.assertEqual(callee_3(3), 9)
374
+
375
+ callee_0.assert_not_called()
376
+ callee_0.assert_not_called_with()(1)
377
+ callee_0.assert_not_called_with()(2)
378
+ callee_0.assert_not_called_with()(3)
379
+
380
+ callee_1.assert_called()
381
+ callee_1.assert_called_with()(1)
382
+ callee_1.assert_not_called_with()(2)
383
+ callee_1.assert_not_called_with()(3)
384
+ callee_1.assert_called_once()
385
+ callee_1.assert_called_once_with()(1)
386
+ callee_1.assert_called_times(1)
387
+ callee_1.assert_called_times_with(1)(1)
388
+
389
+ callee_2.assert_called()
390
+ callee_2.assert_not_called_with()(1)
391
+ callee_2.assert_called_with()(2)
392
+ callee_2.assert_not_called_with()(3)
393
+ callee_2.assert_called_times(2)
394
+ callee_2.assert_called_times_with(2)(2)
395
+
396
+ callee_3.assert_called()
397
+ callee_3.assert_not_called_with()(1)
398
+ callee_3.assert_not_called_with()(2)
399
+ callee_3.assert_called_with()(3)
400
+ callee_3.assert_called_times(3)
401
+ callee_3.assert_called_times_with(3)(3)
402
+
403
+ def test_throw_callee(self):
404
+ callee = throw_callee(ValueError)
405
+
406
+ with pytest.raises(ValueError):
407
+ callee(object())