plexus-python-common 1.0.25__tar.gz → 1.0.26__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 (80) hide show
  1. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/PKG-INFO +1 -1
  2. {plexus_python_common-1.0.25/src/plexus/common → plexus_python_common-1.0.26/src/plexus/common/utils}/config.py +9 -32
  3. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus_python_common.egg-info/PKG-INFO +1 -1
  4. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus_python_common.egg-info/SOURCES.txt +1 -1
  5. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/.editorconfig +0 -0
  6. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/.github/workflows/pr.yml +0 -0
  7. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/.github/workflows/push.yml +0 -0
  8. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/.gitignore +0 -0
  9. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/MANIFEST.in +0 -0
  10. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/README.md +0 -0
  11. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/VERSION +0 -0
  12. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/pyproject.toml +0 -0
  13. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/jsonutils/dummy.0.jsonl +0 -0
  14. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/jsonutils/dummy.1.jsonl +0 -0
  15. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/jsonutils/dummy.2.jsonl +0 -0
  16. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/s3utils/dir.baz/file.bar.baz +0 -0
  17. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/s3utils/dir.baz/file.foo.bar +0 -0
  18. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/s3utils/dir.baz/file.foo.baz +0 -0
  19. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/s3utils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
  20. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
  21. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
  22. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
  23. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/s3utils/dir.foo/file.bar +0 -0
  24. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/s3utils/dir.foo/file.baz +0 -0
  25. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/s3utils/dir.foo/file.foo +0 -0
  26. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/0-dummy +0 -0
  27. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/1-dummy +0 -0
  28. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/2-dummy +0 -0
  29. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.0.0.jsonl +0 -0
  30. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.0.0.vol-0.jsonl +0 -0
  31. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.0.jsonl +0 -0
  32. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.1.1.jsonl +0 -0
  33. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.1.1.vol-1.jsonl +0 -0
  34. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.1.jsonl +0 -0
  35. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.2.2.jsonl +0 -0
  36. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.2.2.vol-2.jsonl +0 -0
  37. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.2.jsonl +0 -0
  38. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.csv.part0 +0 -0
  39. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.csv.part1 +0 -0
  40. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.csv.part2 +0 -0
  41. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/resources/unittest/shutils/dummy.txt +0 -0
  42. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/setup.cfg +0 -0
  43. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/setup.py +0 -0
  44. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/__init__.py +0 -0
  45. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/carto/OSMFile.py +0 -0
  46. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/carto/OSMNode.py +0 -0
  47. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/carto/OSMTags.py +0 -0
  48. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/carto/OSMWay.py +0 -0
  49. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/carto/__init__.py +0 -0
  50. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/pose.py +0 -0
  51. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/proj.py +0 -0
  52. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/__init__.py +0 -0
  53. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/apiutils.py +0 -0
  54. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/bagutils.py +0 -0
  55. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/datautils.py +0 -0
  56. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/jsonutils.py +0 -0
  57. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/ormutils.py +0 -0
  58. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/s3utils.py +0 -0
  59. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/shutils.py +0 -0
  60. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/sqlutils.py +0 -0
  61. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/strutils.py +0 -0
  62. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus/common/utils/testutils.py +0 -0
  63. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus_python_common.egg-info/dependency_links.txt +0 -0
  64. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus_python_common.egg-info/not-zip-safe +0 -0
  65. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus_python_common.egg-info/requires.txt +0 -0
  66. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/src/plexus_python_common.egg-info/top_level.txt +0 -0
  67. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_test.py +0 -0
  68. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/__init__.py +0 -0
  69. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/carto/osm_file_test.py +0 -0
  70. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/carto/osm_tags_test.py +0 -0
  71. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/pose_test.py +0 -0
  72. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/proj_test.py +0 -0
  73. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/utils/bagutils_test.py +0 -0
  74. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/utils/datautils_test.py +0 -0
  75. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/utils/jsonutils_test.py +0 -0
  76. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/utils/ormutils_test.py +0 -0
  77. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/utils/s3utils_test.py +0 -0
  78. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/utils/shutils_test.py +0 -0
  79. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/utils/strutils_test.py +0 -0
  80. {plexus_python_common-1.0.25 → plexus_python_common-1.0.26}/test/plexus_tests/common/utils/testutils_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plexus-python-common
3
- Version: 1.0.25
3
+ Version: 1.0.26
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.12
6
6
  Classifier: Programming Language :: Python :: 3.13
@@ -1,44 +1,21 @@
1
- import hashlib
2
-
3
1
  from iker.common.utils import logger
4
2
  from iker.common.utils.config import Config
5
- from iker.common.utils.funcutils import singleton
3
+ from iker.common.utils.funcutils import memorized
6
4
  from iker.common.utils.shutils import expanded_path
7
5
 
8
6
 
9
- @singleton
10
- def config() -> Config:
7
+ @memorized()
8
+ def config(config_path: str = "") -> Config:
11
9
  default_items: list[tuple[str, str, str]] = [
12
- ("pulse.commons", "logging.level", "INFO"),
13
- ("pulse.commons", "logging.format", "%(asctime)s [%(levelname)s] %(name)s: %(message)s"),
10
+ ("plexus", "logging.level", "INFO"),
11
+ ("plexus", "logging.format", "%(asctime)s [%(levelname)s] %(name)s: %(message)s"),
14
12
  ]
15
13
 
16
- config = Config(expanded_path("~/.iker.pulse.cfg"))
17
- config.restore()
18
- config.update(default_items, overwrite=False)
19
-
20
- return config
21
-
22
-
23
- def validate_pulse_super_token(token: str) -> bool:
24
- """
25
- Validate the pulse super token.
26
- :param token: The token to validate.
27
- :return: True if the token is valid, False otherwise.
28
- """
29
- return hashlib.sha256(token.encode()).hexdigest() == pulse_super_token_sha256()
30
-
31
-
32
- def ask_pulse_super_token():
33
- import getpass
34
- super_token = getpass.getpass("Pulse super token required: ")
35
- if not validate_pulse_super_token(super_token):
36
- raise ValueError("wrong Pulse super token")
37
-
14
+ instance = Config(config_path or expanded_path("~/.plexus.cfg"))
15
+ instance.restore()
16
+ instance.update(default_items, overwrite=False)
38
17
 
39
- @singleton
40
- def pulse_super_token_sha256() -> str:
41
- return "d7f97abe12bb00a7d19cb5957350509c14b3b085cf84524b80d389c6c2086f1b"
18
+ return instance
42
19
 
43
20
 
44
21
  def config_print_or_set(config: Config, section: str, key: str, value: str):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plexus-python-common
3
- Version: 1.0.25
3
+ Version: 1.0.26
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.12
6
6
  Classifier: Programming Language :: Python :: 3.13
@@ -37,7 +37,6 @@ resources/unittest/shutils/dummy.csv.part1
37
37
  resources/unittest/shutils/dummy.csv.part2
38
38
  resources/unittest/shutils/dummy.txt
39
39
  src/plexus/common/__init__.py
40
- src/plexus/common/config.py
41
40
  src/plexus/common/pose.py
42
41
  src/plexus/common/proj.py
43
42
  src/plexus/common/carto/OSMFile.py
@@ -48,6 +47,7 @@ src/plexus/common/carto/__init__.py
48
47
  src/plexus/common/utils/__init__.py
49
48
  src/plexus/common/utils/apiutils.py
50
49
  src/plexus/common/utils/bagutils.py
50
+ src/plexus/common/utils/config.py
51
51
  src/plexus/common/utils/datautils.py
52
52
  src/plexus/common/utils/jsonutils.py
53
53
  src/plexus/common/utils/ormutils.py