rdxz2-utill 0.1.1__py3-none-any.whl → 0.1.2__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 rdxz2-utill might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdxz2-utill
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Your daily Python utility
5
5
  Author-email: Richard Dharmawan <richard.dharmawan@gmail.com>
6
6
  License: MIT License
@@ -1,6 +1,6 @@
1
- rdxz2_utill-0.1.1.dist-info/licenses/LICENSE,sha256=PF9CUvzP8XFYopEAzrMzSCovF7RdBdscPqJCDC6KjPc,1073
1
+ rdxz2_utill-0.1.2.dist-info/licenses/LICENSE,sha256=PF9CUvzP8XFYopEAzrMzSCovF7RdBdscPqJCDC6KjPc,1073
2
2
  utill/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- utill/my_bq.py,sha256=ANyKcw4VDn3L868ezYUFSgbmbaUjD_PW6XZ0fqxUx6s,25093
3
+ utill/my_bq.py,sha256=Y2zNCx7V71N8iNNEE-IB3KQuQDUeV7ZQbLJ4jY-N12Q,25108
4
4
  utill/my_compare.py,sha256=619QbVk3GihWxen95yVnivKHkah8GgPTLGiSkgHxykw,886
5
5
  utill/my_const.py,sha256=88dOqn6NPQ5-hfRqdkew5POoAIyO91XXOGvN76oNsdo,251
6
6
  utill/my_csv.py,sha256=AT5sAbAlYqnAmNgQMTSqEueRXM4D42yNPb5C3Hedy6c,2921
@@ -9,7 +9,7 @@ utill/my_dict.py,sha256=jPaPfdn4WYpm0uIBPiYFinpHhx1jXpFVDJ9npmvxGZQ,391
9
9
  utill/my_encryption.py,sha256=SCF7PPur39cW4RHidsRhw-9BZP-ymUH-6LZ9nAHJDsY,2105
10
10
  utill/my_env.py,sha256=E7XW3fuhxbDlFqmLPHrziJJZVRogzGh6rfQdyNV49f8,2130
11
11
  utill/my_file.py,sha256=-b6_dGDDBdS228kgwTYpmIa3vxW1c1TtWrLdzdlHjKY,1873
12
- utill/my_gcs.py,sha256=VBJ8lsJ-fHr_BzMoSuT5JUrvxidGyMc2VNtE6Um1T_M,3060
12
+ utill/my_gcs.py,sha256=qFH47gQmk6_v0DajihymX7Xx1ZVp4xWuxDQh90PrY0g,3088
13
13
  utill/my_input.py,sha256=OyKLoutXpwISReltuL_Gw2oojv16tYWJqQpqabBOQx4,350
14
14
  utill/my_json.py,sha256=WgW6mavGhfs4h1N5XbhsDnRk2dbh_ttJWdJUj4iWDN4,1473
15
15
  utill/my_mb.py,sha256=IyrySs92TqtjBUvPMeUN3P2kRK8EttTFRPZsv5Cr-xw,15090
@@ -28,8 +28,8 @@ utill/cmd/_pg.py,sha256=RVxEiSifyIwMDYDM69vt6WSLdVDr1cMzY6r4T2PzNRA,492
28
28
  utill/cmd/utill.py,sha256=TlHfiwOUcK1m58PrRCjX9sARiPYZUsoTk-KOTCOz1vM,3558
29
29
  utill/templates/mb.json,sha256=M46ZHSaSh4rbD_KGUViGr2B2ZV8_PC-O5Evqi35JK5g,59
30
30
  utill/templates/pg.json,sha256=LkJt0VV3zcyt7Tpn6gulsoVQgUc-9uImXOStvzu8cdU,271
31
- rdxz2_utill-0.1.1.dist-info/METADATA,sha256=qroXZ2Hm-L-YQHR8xuIcpTqrbEuy4_CDceCZeNqTi1Q,4401
32
- rdxz2_utill-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
33
- rdxz2_utill-0.1.1.dist-info/entry_points.txt,sha256=9n5NWz5Wi9jDvYhB_81_4icgT5xABZ-QivHD8ibcafg,47
34
- rdxz2_utill-0.1.1.dist-info/top_level.txt,sha256=tuAYZoCsr02JYbpZj7I6fl1IIo53v3GG0uoj-_fINVk,6
35
- rdxz2_utill-0.1.1.dist-info/RECORD,,
31
+ rdxz2_utill-0.1.2.dist-info/METADATA,sha256=6tzVkvnpQcGVE24Zn3Z__yGHJeyP-mopwN35cY_gMiw,4401
32
+ rdxz2_utill-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
33
+ rdxz2_utill-0.1.2.dist-info/entry_points.txt,sha256=9n5NWz5Wi9jDvYhB_81_4icgT5xABZ-QivHD8ibcafg,47
34
+ rdxz2_utill-0.1.2.dist-info/top_level.txt,sha256=tuAYZoCsr02JYbpZj7I6fl1IIo53v3GG0uoj-_fINVk,6
35
+ rdxz2_utill-0.1.2.dist-info/RECORD,,
utill/my_bq.py CHANGED
@@ -399,7 +399,7 @@ class BQ():
399
399
  for tmp_blobs in gcs.list_blobs(dst_gcs_prefix):
400
400
  local_tmp_filepath = os.path.join(tmp_dirname, tmp_blobs.name.split('/')[-1])
401
401
  gcs.download(tmp_blobs, local_tmp_filepath, move=True)
402
- logger.debug(f'Downloaded {tmp_blobs.name} to {local_tmp_filepath}')
402
+ # logger.debug(f'Downloaded {tmp_blobs.name} to {local_tmp_filepath}')
403
403
  local_tmp_filepaths.append(local_tmp_filepath)
404
404
 
405
405
  # Combine downloaded files
@@ -435,7 +435,7 @@ class BQ():
435
435
  for part in range(parts):
436
436
  dst_filepath_part = f'{dst_filepath.removesuffix(".csv")}_{part + 1:06}.csv'
437
437
  _export_download_combine(
438
- f'SELECT * EXCEPT(_rn) FROM `{tmp_table_fqn_rn}` WHERE _rn BETWEEN {(part * csv_row_limit) + 1} AND {(part + 1) * csv_row_limit}',
438
+ f'SELECT * EXCEPT(_rn) FROM `{tmp_table_fqn_rn}` WHERE _rn BETWEEN {(part * csv_row_limit) + 1} AND {(part + 1) * csv_row_limit} ORDER BY _rn',
439
439
  dst_gcs_prefix=gcs.build_tmp_dirpath(),
440
440
  dst_filepath=dst_filepath_part,
441
441
  )
utill/my_gcs.py CHANGED
@@ -16,7 +16,7 @@ class GCS:
16
16
 
17
17
  self.client = storage.Client(project=project_id or envs.GCP_PROJECT_ID)
18
18
  self.bucket = self.client.bucket(bucket or envs.GCS_BUCKET)
19
- logger.debug(f'GCS client open, project: {self.client.project}')
19
+ logger.debug(f'GCS client open, project: {self.client.project}, bucket: {self.bucket.name}')
20
20
 
21
21
  def get_blob(self, blobpath: str) -> storage.Blob:
22
22
  return self.bucket.blob(blobpath)