atomicshop 2.16.23__py3-none-any.whl → 2.16.24__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.

Potentially problematic release.


This version of atomicshop might be problematic. Click here for more details.

atomicshop/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Atomic Basic functions and classes to make developer life easier"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '2.16.23'
4
+ __version__ = '2.16.24'
@@ -353,7 +353,8 @@ def deviation_calculator_by_moving_average(
353
353
  get_deviation_for_last_day_only: bool = False,
354
354
  summary: bool = False,
355
355
  output_file_path: str = None,
356
- output_file_type: Literal['json', 'csv'] = 'json'
356
+ output_file_type: Literal['json', 'csv'] = 'json',
357
+ convert_sizes_lists_and_ma_data_to_string: bool = False
357
358
  ) -> Union[list, None]:
358
359
  """
359
360
  This function is the main function for the moving average calculator.
@@ -383,6 +384,8 @@ def deviation_calculator_by_moving_average(
383
384
  to calculate the averages and the moving average data.
384
385
  :param output_file_path: string, if None, no file will be written.
385
386
  :param output_file_type: string, the type of the output file. 'json' or 'csv'.
387
+ :param convert_sizes_lists_and_ma_data_to_string: bool, if True, the 'request_sizes', 'response_sizes' and 'ma_data'
388
+ will be converted to string. This is useful when writing to files, so the view will be more readable.
386
389
  -----------------------------
387
390
  :return: the deviation list of dicts.
388
391
 
@@ -428,6 +431,12 @@ def deviation_calculator_by_moving_average(
428
431
  )
429
432
 
430
433
  if deviation_list:
434
+ if convert_sizes_lists_and_ma_data_to_string:
435
+ for deviation_list_index, deviation in enumerate(deviation_list):
436
+ convert_data_value_to_string('request_sizes', deviation_list_index)
437
+ convert_data_value_to_string('response_sizes', deviation_list_index)
438
+ convert_value_to_string('ma_data', deviation_list_index)
439
+
431
440
  if summary:
432
441
  for deviation in deviation_list:
433
442
  _ = deviation.pop('check_type')
@@ -438,12 +447,6 @@ def deviation_calculator_by_moving_average(
438
447
  _ = deviation.pop('ma_data')
439
448
 
440
449
  if output_file_path:
441
- if not summary:
442
- for deviation_list_index, deviation in enumerate(deviation_list):
443
- convert_data_value_to_string('request_sizes', deviation_list_index)
444
- convert_data_value_to_string('response_sizes', deviation_list_index)
445
- convert_value_to_string('ma_data', deviation_list_index)
446
-
447
450
  print_api(f'Deviation Found, saving to file: {output_file_path}', color='blue')
448
451
 
449
452
  if output_file_type == 'csv':
@@ -501,8 +504,10 @@ def deviation_calculator_by_moving_average_main():
501
504
 
502
505
  if args.full_details:
503
506
  summary = False
507
+ convert_sizes_lists_and_ma_data_to_string = True
504
508
  else:
505
509
  summary = True
510
+ convert_sizes_lists_and_ma_data_to_string = False
506
511
 
507
512
  _ = deviation_calculator_by_moving_average(
508
513
  statistics_file_directory=args.directory,
@@ -512,6 +517,7 @@ def deviation_calculator_by_moving_average_main():
512
517
  summary=summary,
513
518
  output_file_path=args.output_file,
514
519
  output_file_type=args.output_type,
520
+ convert_sizes_lists_and_ma_data_to_string=convert_sizes_lists_and_ma_data_to_string
515
521
  )
516
522
 
517
523
  return 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.16.23
3
+ Version: 2.16.24
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=nFFyrQAHTstcKiEqAJ9esDeQ3MmcErpmeonwOprd9VU,124
1
+ atomicshop/__init__.py,sha256=CTmlCQGjYSV8TXiXGaZZB1S8I3hG61RNpEbQc104SF8,124
2
2
  atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
3
3
  atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
4
4
  atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
@@ -131,7 +131,7 @@ atomicshop/mitm/message.py,sha256=d_sm3O_aoZf87dDQP44xOMNEG-uZBN1ZecQgMCacbZs,18
131
131
  atomicshop/mitm/mitm_main.py,sha256=gA8sV7hI107OnoeedCHpy8f3zcE4vAsBc44l_VTjVFo,21622
132
132
  atomicshop/mitm/recs_files.py,sha256=B8fSuvYXlh50LWfwLRw_bYswreTjmdZLuHJzbDC5Gss,2930
133
133
  atomicshop/mitm/shared_functions.py,sha256=hplm98tz8pgJ4WHUVI9sf_oVqUM2KJ1Y2pD6EFSb8P0,1879
134
- atomicshop/mitm/statistic_analyzer.py,sha256=c1Iv9qGy6_IGg95VxhRQ06sleygLdJi_B13MjZ0FJAU,26183
134
+ atomicshop/mitm/statistic_analyzer.py,sha256=mBmwEe68WAjnIskGndQTRldnsAsDHuaOW0O7UXlM3Pc,26702
135
135
  atomicshop/mitm/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
136
  atomicshop/mitm/engines/create_module_template.py,sha256=tRjVSm1sD6FzML71Qbuwvita0qsusdFGm8NZLsZ-XMs,4853
137
137
  atomicshop/mitm/engines/create_module_template_example.py,sha256=X5xhvbV6-g9jU_bQVhf_crZmaH50LRWz3bS-faQ18ds,489
@@ -309,8 +309,8 @@ atomicshop/wrappers/socketw/ssl_base.py,sha256=kmiif84kMhBr5yjQW17p935sfjR5JKG0L
309
309
  atomicshop/wrappers/socketw/statistics_csv.py,sha256=V_m1D0KpizQox3IEWp2AUcncwWy5kG25hbFrc-mBSJE,3029
310
310
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
311
311
  atomicshop/wrappers/winregw/winreg_network.py,sha256=bQ8Jql8bVGBJ0dt3VQ56lga_1LBOMLI3Km_otvvbU6c,7138
312
- atomicshop-2.16.23.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
313
- atomicshop-2.16.23.dist-info/METADATA,sha256=Ye4Ij67GZEdRL0YppIdiL1YjtpKcJWWbIzIG3ldpxsg,10473
314
- atomicshop-2.16.23.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
315
- atomicshop-2.16.23.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
316
- atomicshop-2.16.23.dist-info/RECORD,,
312
+ atomicshop-2.16.24.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
313
+ atomicshop-2.16.24.dist-info/METADATA,sha256=172BnmXPSDlG-AxPVViiY5xQNY2m7UqFq6DQ0ytD9zM,10473
314
+ atomicshop-2.16.24.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
315
+ atomicshop-2.16.24.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
316
+ atomicshop-2.16.24.dist-info/RECORD,,