risk-network 0.0.8b17__py3-none-any.whl → 0.0.8b18__py3-none-any.whl
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.
- risk/__init__.py +1 -1
- risk/network/plot/labels.py +27 -20
- risk/network/plot/utils/color.py +2 -2
- {risk_network-0.0.8b17.dist-info → risk_network-0.0.8b18.dist-info}/METADATA +1 -1
- {risk_network-0.0.8b17.dist-info → risk_network-0.0.8b18.dist-info}/RECORD +8 -8
- {risk_network-0.0.8b17.dist-info → risk_network-0.0.8b18.dist-info}/LICENSE +0 -0
- {risk_network-0.0.8b17.dist-info → risk_network-0.0.8b18.dist-info}/WHEEL +0 -0
- {risk_network-0.0.8b17.dist-info → risk_network-0.0.8b18.dist-info}/top_level.txt +0 -0
risk/__init__.py
CHANGED
risk/network/plot/labels.py
CHANGED
@@ -878,28 +878,35 @@ def _apply_str_transformation(
|
|
878
878
|
Returns:
|
879
879
|
List[str]: A list of transformed words with no duplicates.
|
880
880
|
"""
|
881
|
+
# Initialize a list to store transformed words
|
881
882
|
transformed_words = []
|
882
883
|
for word in words:
|
883
|
-
#
|
884
|
-
|
885
|
-
|
886
|
-
#
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
884
|
+
# Split word into subwords by space
|
885
|
+
subwords = word.split(" ")
|
886
|
+
transformed_subwords = []
|
887
|
+
# Apply transformation to each subword
|
888
|
+
for subword in subwords:
|
889
|
+
transformed_subword = subword # Start with the original subword
|
890
|
+
# If transformation is a string, apply it to all subwords
|
891
|
+
if isinstance(transformation, str):
|
892
|
+
if hasattr(subword, transformation):
|
893
|
+
transformed_subword = getattr(subword, transformation)()
|
894
|
+
|
895
|
+
# If transformation is a dictionary, apply case-specific transformations
|
896
|
+
elif isinstance(transformation, dict):
|
897
|
+
for case_type, transform in transformation.items():
|
898
|
+
if case_type == "lower" and subword.islower() and transform:
|
899
|
+
transformed_subword = getattr(subword, transform)()
|
900
|
+
elif case_type == "upper" and subword.isupper() and transform:
|
901
|
+
transformed_subword = getattr(subword, transform)()
|
902
|
+
elif case_type == "title" and subword.istitle() and transform:
|
903
|
+
transformed_subword = getattr(subword, transform)()
|
904
|
+
|
905
|
+
# Append the transformed subword to the list
|
906
|
+
transformed_subwords.append(transformed_subword)
|
907
|
+
|
908
|
+
# Rejoin the transformed subwords into a single string to preserve structure
|
909
|
+
transformed_word = " ".join(transformed_subwords)
|
903
910
|
# Only append if the transformed word is not already in the list
|
904
911
|
if transformed_word not in transformed_words:
|
905
912
|
transformed_words.append(transformed_word)
|
risk/network/plot/utils/color.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
risk/__init__.py,sha256=
|
1
|
+
risk/__init__.py,sha256=EoQiOdiY9moo1L8d1ybzWAGTSGsM9MzK9H_PfU8miI4,113
|
2
2
|
risk/constants.py,sha256=XInRaH78Slnw_sWgAsBFbUHkyA0h0jL0DKGuQNbOvjM,550
|
3
3
|
risk/risk.py,sha256=slJXca_a726_D7oXwe765HaKTv3ZrOvhttyrWdCGPkA,21231
|
4
4
|
risk/annotations/__init__.py,sha256=vUpVvMRE5if01Ic8QY6M2Ae3EFGJHdugEe9PdEkAW4Y,138
|
@@ -18,10 +18,10 @@ risk/network/io.py,sha256=u0PPcKjp6Xze--7eDOlvalYkjQ9S2sjiC-ac2476PUI,22942
|
|
18
18
|
risk/network/plot/__init__.py,sha256=MfmaXJgAZJgXZ2wrhK8pXwzETlcMaLChhWXKAozniAo,98
|
19
19
|
risk/network/plot/canvas.py,sha256=JnjPQaryRb_J6LP36BT2-rlsbJO3T4tTBornL8Oqqbs,10778
|
20
20
|
risk/network/plot/contour.py,sha256=8uwJ7K-Z6VMyr_uQ5VUyoQSqDHA7zDvR_nYAmLn60-I,14647
|
21
|
-
risk/network/plot/labels.py,sha256=
|
21
|
+
risk/network/plot/labels.py,sha256=ttEUiKkDq024v4MI-ZADW3sT7uRNQ6aL3kNB598Em90,44468
|
22
22
|
risk/network/plot/network.py,sha256=9blVFeCp5x5XoGhPwOOdADegXC4gC72c2vrM2u4QPe0,13235
|
23
23
|
risk/network/plot/plotter.py,sha256=lN-_GDXRk9V3IFu8q7QmPjJGBZiP0QYwSvU6dVVDV2E,5770
|
24
|
-
risk/network/plot/utils/color.py,sha256=
|
24
|
+
risk/network/plot/utils/color.py,sha256=_ZLIw_uv--nTXhUhZVaF0iCaYmfURTn_WnoFYdUcPrc,15575
|
25
25
|
risk/network/plot/utils/layout.py,sha256=znssSqe2VZzzSz47hLZtTuXwMTpHR9b8lkQPL0BX7OA,1950
|
26
26
|
risk/stats/__init__.py,sha256=WcgoETQ-hS0LQqKRsAMIPtP15xZ-4eul6VUBuUx4Wzc,220
|
27
27
|
risk/stats/hypergeom.py,sha256=o6Qnj31gCAKxr2uQirXrbv7XvdDJGEq69MFW-ubx_hA,2272
|
@@ -30,8 +30,8 @@ risk/stats/stats.py,sha256=kvShov-94W6ffgDUTb522vB9hDJQSyTsYif_UIaFfSM,7059
|
|
30
30
|
risk/stats/permutation/__init__.py,sha256=neJp7FENC-zg_CGOXqv-iIvz1r5XUKI9Ruxhmq7kDOI,105
|
31
31
|
risk/stats/permutation/permutation.py,sha256=D84Rcpt6iTQniK0PfQGcw9bLcHbMt9p-ARcurUnIXZQ,10095
|
32
32
|
risk/stats/permutation/test_functions.py,sha256=lftOude6hee0pyR80HlBD32522JkDoN5hrKQ9VEbuoY,2345
|
33
|
-
risk_network-0.0.
|
34
|
-
risk_network-0.0.
|
35
|
-
risk_network-0.0.
|
36
|
-
risk_network-0.0.
|
37
|
-
risk_network-0.0.
|
33
|
+
risk_network-0.0.8b18.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
34
|
+
risk_network-0.0.8b18.dist-info/METADATA,sha256=CYJnBG0E8gmlzPx15UYKAjbbsC3zs2Mmsq42NPzi1mY,47498
|
35
|
+
risk_network-0.0.8b18.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
36
|
+
risk_network-0.0.8b18.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
|
37
|
+
risk_network-0.0.8b18.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|