berryworld 1.0.0.196257__py3-none-any.whl → 1.0.0.196751__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.
- berryworld/__init__.py +1 -1
- berryworld/handy_mix.py +8 -32
- {berryworld-1.0.0.196257.dist-info → berryworld-1.0.0.196751.dist-info}/METADATA +1 -1
- {berryworld-1.0.0.196257.dist-info → berryworld-1.0.0.196751.dist-info}/RECORD +7 -7
- {berryworld-1.0.0.196257.dist-info → berryworld-1.0.0.196751.dist-info}/WHEEL +0 -0
- {berryworld-1.0.0.196257.dist-info → berryworld-1.0.0.196751.dist-info}/licenses/LICENSE +0 -0
- {berryworld-1.0.0.196257.dist-info → berryworld-1.0.0.196751.dist-info}/top_level.txt +0 -0
berryworld/__init__.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from .xml_parser import XMLparser
|
|
2
|
-
from .handy_mix import HandyMix
|
|
2
|
+
from .handy_mix import HandyMix
|
|
3
3
|
from .transportation_solver import TransportationAlgorithm
|
|
4
4
|
from .allocation_solver import AllocationSolver
|
|
5
5
|
from .pickle_management import PickleManagement
|
berryworld/handy_mix.py
CHANGED
|
@@ -226,39 +226,15 @@ class HandyMix:
|
|
|
226
226
|
:param data: DataFrame to transform its integer columns to strings
|
|
227
227
|
:return: DataFrame with its columns translated to strings
|
|
228
228
|
"""
|
|
229
|
-
float_cols = data.
|
|
230
|
-
for float_col in float_cols:
|
|
231
|
-
if data[float_col].dtype == float:
|
|
232
|
-
if all(['.0' in val for val in data[float_col].loc[~data[float_col].isnull()].astype(str).values]):
|
|
233
|
-
data.loc[~data[float_col].isnull(), float_col] = data.loc[
|
|
234
|
-
~data[float_col].isnull(), float_col].astype(str).str.replace(
|
|
235
|
-
'.0', '', regex=True).infer_objects(copy=False)
|
|
236
|
-
|
|
237
|
-
return data
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
class URLResolver:
|
|
241
|
-
@staticmethod
|
|
242
|
-
def resolve_url_requested(url_requested, endpoint_requested):
|
|
243
|
-
"""Resolve the URL requested.
|
|
244
|
-
:param url_requested: The base url that includes the project root
|
|
245
|
-
:param endpoint_requested: The endpoint that will be added to the base url
|
|
246
|
-
"""
|
|
247
|
-
url_requested = str(url_requested)
|
|
248
|
-
endpoint_requested = str(endpoint_requested)
|
|
249
|
-
|
|
250
|
-
domains = ["berryworld.com", "berryworld.net"]
|
|
229
|
+
float_cols = data.select_dtypes(include=['float']).columns
|
|
251
230
|
|
|
252
|
-
for
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
url_requested = url_requested.rstrip('/')
|
|
231
|
+
for float_col in float_cols:
|
|
232
|
+
mask = ~data[float_col].isnull()
|
|
233
|
+
values = data.loc[mask, float_col]
|
|
256
234
|
|
|
257
|
-
|
|
258
|
-
if domain in endpoint_requested:
|
|
259
|
-
path_after_domain = endpoint_requested.split(f"{domain}", 1)[-1]
|
|
235
|
+
data[float_col] = data[float_col].astype(object)
|
|
260
236
|
|
|
261
|
-
|
|
262
|
-
|
|
237
|
+
if ((values % 1) == 0).all():
|
|
238
|
+
data.loc[mask, float_col] = values.astype(int).astype(str)
|
|
263
239
|
|
|
264
|
-
return
|
|
240
|
+
return data
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
berryworld/__init__.py,sha256=
|
|
1
|
+
berryworld/__init__.py,sha256=y8vZZSv7up3H-uYHEGPDW_ucf-ynzIsoRY6jJvIPsrE,1127
|
|
2
2
|
berryworld/aks_logs.py,sha256=Gb2_cokiZbEX01Yoptd0MxpDociaug-GrXdwliyxFBo,2293
|
|
3
3
|
berryworld/allocation_solver.py,sha256=asFtaCAze6-eHUGWXA0kAp67UBS-Upj1KKdrVLj_ttQ,8513
|
|
4
4
|
berryworld/app_logs.py,sha256=MKzKPYd3JuPfOQNAapIgaeZeFHw1z_w2mbn9I6QCADE,4180
|
|
@@ -9,7 +9,7 @@ berryworld/devops.py,sha256=7mRbyZPGzk5ox-6J2etv3NxCcfP4cprG0_Xelh7prn8,9776
|
|
|
9
9
|
berryworld/email_con.py,sha256=CVyEDVnc_iVeRTwJgIU31ToFgyix7L2yn4Ih9Wu7I5s,15806
|
|
10
10
|
berryworld/email_logging.py,sha256=LeSrTExhQhar49gJR2wGC1dS0lqsNpFl9pS3eYWqnuo,4936
|
|
11
11
|
berryworld/generate_env.py,sha256=kJuBb0OOYjoa2gyAnZHgn3gpoEZ8rPbMhnKcTYfENUk,11875
|
|
12
|
-
berryworld/handy_mix.py,sha256=
|
|
12
|
+
berryworld/handy_mix.py,sha256=SqJ3UjIjmIOgjbp-_1eyKQJ3OJLN7OfpDQIASvjNZ_Q,9672
|
|
13
13
|
berryworld/logging.py,sha256=tOxzaFALQm3aVVEc3I7t8MU6PwgUI9VSnzNCH9yRryo,1013
|
|
14
14
|
berryworld/logic_apps.py,sha256=a0uU4tNO3v2w7grdBv-OOx4hUf7VBIerJpwZ9U-29dQ,14591
|
|
15
15
|
berryworld/microsoft_teams.py,sha256=8uPo0yku-euBj2VdzBoZCeX3IcsCCOqISLqaVZUVxfA,16030
|
|
@@ -26,12 +26,12 @@ berryworld/verify_keys.py,sha256=X7VUHqYDklWPDO0bGVHIOXeLq5Qi4fZRZbHYw5x7UnA,435
|
|
|
26
26
|
berryworld/vivantio.py,sha256=QfZo0UKqkzVRg_LyiwivNd3aEup4TH57x4KxLZkCJwc,10627
|
|
27
27
|
berryworld/vivantio_logging.py,sha256=ciy7gA4u3FrgUIpEBnMgocbNPp6jcu9TPoy-kLcrTZU,5736
|
|
28
28
|
berryworld/xml_parser.py,sha256=HWD71NaTN3DaIOGT6Wzxs4CEsroFhGQwe9iPLIL80Co,957
|
|
29
|
-
berryworld-1.0.0.
|
|
29
|
+
berryworld-1.0.0.196751.dist-info/licenses/LICENSE,sha256=vtkVCJM6E2af2gnsi2XxKPr4WY-uIbvzVLXieFND0UU,1074
|
|
30
30
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
31
|
tests/test_allocation_config.py,sha256=e12l6fE9U57eSPS35g6ekJ_hol7-RHg89JV60_m1BlE,4633
|
|
32
32
|
tests/test_handy_mix_config.py,sha256=Un56mz9KJmdn4K4OwzHAHLSRzDU1Xv2nFrONNuzOG04,2594
|
|
33
33
|
tests/test_xml_parser.py,sha256=3QTlhFEd6KbK6nRFKZnc35tad6wqukTbe4QrFi8mr_8,859
|
|
34
|
-
berryworld-1.0.0.
|
|
35
|
-
berryworld-1.0.0.
|
|
36
|
-
berryworld-1.0.0.
|
|
37
|
-
berryworld-1.0.0.
|
|
34
|
+
berryworld-1.0.0.196751.dist-info/METADATA,sha256=IjOCECKPRS5Xc2rhak7bE86CnQrUbYfVmijbjX8gMLY,1445
|
|
35
|
+
berryworld-1.0.0.196751.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
36
|
+
berryworld-1.0.0.196751.dist-info/top_level.txt,sha256=GIZ5qy-P5oxfEH755vA1IMFeTVdX3-40JxMe6nOe5I8,17
|
|
37
|
+
berryworld-1.0.0.196751.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|