esgpull 0.8.0__py3-none-any.whl → 0.9.0__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.
@@ -1,33 +1,34 @@
1
1
  esgpull/__init__.py,sha256=XItFDIMNmFUNNcKtUgXdfmGwUIWt4AAv0a4mZkfj5P8,240
2
2
  esgpull/auth.py,sha256=QZ-l1ySLMP0fvuwYHRLv9FZYp1gqfju_eGaTMDByUxw,5205
3
- esgpull/config.py,sha256=4i3_XKpdpWSi1s5fcHmUvSt9UVZiWj4kybO42cU1u7A,12201
4
- esgpull/constants.py,sha256=fQE6vE2EU8V5m2lRNYBeMkL3u1_Em343Zs8u7i6ZRlo,1118
5
- esgpull/context.py,sha256=iia_IsN_2vi8WbygHzAFGY0MDdaMuR_0zstxYh7ELRo,23392
6
- esgpull/database.py,sha256=TDo5xIXWyMEPFpaeygVhLZkeDAwYlkBG9UWhmL6ntfo,6144
7
- esgpull/download.py,sha256=3YcGLrffzAmuiV49tYsW-7PuVYcSFtbsZnH2Q26khm0,5491
8
- esgpull/esgpull.py,sha256=R7lnlyOo92FB_Qem5ST4hNA5Iwn9PHYsvCpKxqRX-qM,17717
3
+ esgpull/config.py,sha256=34rxps0SduGj_d-4756KDI7suA13OYrOAZnYB0d4pbc,13425
4
+ esgpull/constants.py,sha256=WjG7xzMZNckOv5GhRehBtI7hoSwwLZvwkvEq5RG-dv4,1189
5
+ esgpull/context.py,sha256=_XBAA9XM-fcJXLsqFlg1ziwQdndDoFxketdcFhi4oSM,23430
6
+ esgpull/database.py,sha256=sPRxbUHVTKxUAyPMS5uMrYZ7LOZP-8MyISbBsW3x6Ec,6420
7
+ esgpull/download.py,sha256=aR2c_SOuZtgX7tI2a9_N4Mn86ABq1k7Mxq_BdojFrP4,5600
8
+ esgpull/esgpull.py,sha256=-OwaWvwmkur_mdVNKKxdxlASeK93tmOceV__jGRMwqo,19666
9
9
  esgpull/exceptions.py,sha256=wgLyhyIITdusNucPjnnURJX1Jxv1VVIr9PzJV_77qhg,3275
10
10
  esgpull/fs.py,sha256=O52QD7DVJImYYf9wWECMNWYrGt8EcHQ3z9TzroK6VAY,7623
11
- esgpull/graph.py,sha256=CeaRcIAWMpVAJ-o6v6b3ffzy-ter-8HZ3tmxoN-Z-FM,15925
11
+ esgpull/graph.py,sha256=Yl2VuF8PNn0R5xRyEK58Q1Xlx8B1PfhbTwt1JftFDro,15929
12
12
  esgpull/install_config.py,sha256=hzYpcHMtPMOK9fYcvVH-Hn_8zYsbs3yXlYgMumXo1zE,5598
13
- esgpull/processor.py,sha256=noenWExukON2P4klMN8Vt1ALzApmvc5gpsFqd7J5g78,5446
13
+ esgpull/plugin.py,sha256=wW19V55E1Fn2_ooZ5aTc58uJVSQ0WT43P29G3TlMD6A,18748
14
+ esgpull/processor.py,sha256=WLf4NFO_dp27E0GhZAiekiRD-gT6uyFJJnFZKbFV5vU,5484
14
15
  esgpull/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
16
  esgpull/result.py,sha256=f64l9gPFpFWgctmHVYrNWJvuXXB1sxpxXzJEIssLXxc,1020
16
- esgpull/tui.py,sha256=GTk86277Vv4msP2YJGpFWMQqxFhW_WSvxViU9nDFeAU,10407
17
- esgpull/utils.py,sha256=c1S9Veb3h7N5xg8UgJAVuFVMD-VvjYwZf6t5SOk3szg,1502
17
+ esgpull/tui.py,sha256=jpfDK_g_taNPEu0FeJ4MM1vtNJfOJY5x3dkUxRkoPEA,11210
18
+ esgpull/utils.py,sha256=Rw_pU_rDvD6b2_h4Hzi8b5Hmb0ufuhrdL0Xwr8kLFcg,1584
18
19
  esgpull/version.py,sha256=IHT4mKrIr8eV-C3HtmIVD85iGVH25n2ohoff31kaJ1A,93
19
- esgpull/cli/__init__.py,sha256=mvxiV7bRJlJ3uAfxr6hHDcuQDvy70TGkKyY5W4wE4SY,1686
20
- esgpull/cli/add.py,sha256=PhTe-jY7CNWYVtD1qYptGgIwYat2RYUfV-RHG_-SWbU,3270
20
+ esgpull/cli/__init__.py,sha256=Q-U7opBTHxF5yUyyv15Cj-4Y9MaDMJ4i5FxNL-EmHfs,1683
21
+ esgpull/cli/add.py,sha256=h8xFy5ORzY9O4SPPo4VCtTybeJJ5GcA18w4TZeL0DqU,3507
21
22
  esgpull/cli/autoremove.py,sha256=g76_qnc3q84zSO7W0JsbWtGN4AfWBXTkQJO6gPCs2Pw,1336
22
- esgpull/cli/config.py,sha256=JbSa2NvXxccbOpEyvJd4vSlBnwb_NClx5sCJp_WY7-k,4048
23
+ esgpull/cli/config.py,sha256=g7Me173B_SWtdnQcitcTDnj-06-1SW0f8Z8SOcjMAcQ,3683
23
24
  esgpull/cli/convert.py,sha256=Nonu49aijY3OFq2MNCqs7EQ08NXFiT0ehvNxoGp4NCE,9847
24
- esgpull/cli/datasets.py,sha256=wO_gZUhvWy027q2jX2hAW25wJkIGrYHHCYuGAbcTmG8,2374
25
25
  esgpull/cli/decorators.py,sha256=X5Ja6HlB_AgpTohpbF2EjtT5sA0IdPxX20g-j1K7raM,6727
26
26
  esgpull/cli/download.py,sha256=3_Fm8JJYBWKs63oQ1OLaHJCv9ccbeY2gIW8SDasaYNE,2356
27
27
  esgpull/cli/facet.py,sha256=V1u-DxNkhswwSt0qpXvuHrCI_tE8jAJGEe6_fMhYbaM,584
28
28
  esgpull/cli/get.py,sha256=2WXL01Ri0P_2Rf1xrp9bnsrrxir6whxkAC0SnohjFpg,678
29
29
  esgpull/cli/install.py,sha256=fd8nKwIFvOivgn_gOGn7XIk1BB9LXnhQB47KuIIy5AU,2880
30
30
  esgpull/cli/login.py,sha256=FZ63SsB4fCDixwf7gMUR697Dk89W1OvpgeadKE4IqEU,2153
31
+ esgpull/cli/plugins.py,sha256=eTAwWqvrzDKs122_Wa3sOkuriSoInymxWySQQahrlHg,13357
31
32
  esgpull/cli/remove.py,sha256=p26hPhsgAgmAF4IsvjAI3jtzlIUq3k8Rxb0GTKYoEQM,2517
32
33
  esgpull/cli/retry.py,sha256=UVpAjW_N7l6RTJ-T5qXojwcXPzzjT7sDKb_wBdvavrg,1310
33
34
  esgpull/cli/search.py,sha256=c2OI0Xvw6h2zBnC8msjxidKJZ0KKUuWJK9FuAmQ15ZU,6369
@@ -35,8 +36,8 @@ esgpull/cli/self.py,sha256=7nEEsK5W_Pth8IOSmvJHRlfwPPgXldhHAQK9yqf01S8,7932
35
36
  esgpull/cli/show.py,sha256=B-h7bKMrwgjnTHio2du8IPOLlKCaan56RQKAtzlQzcw,2822
36
37
  esgpull/cli/status.py,sha256=HEyj6QFABblADtYf1PWmSzghKX3fs33x9p5vpSqA514,2521
37
38
  esgpull/cli/track.py,sha256=Q9ZvvV5FFGzp6wQZflAd_OFmqhAWgl1JFBad2dCbEF0,3089
38
- esgpull/cli/update.py,sha256=i8bGkYn94jnwn-O6O2fzGOg7fZzRR11y8WMFN9ytLB4,7499
39
- esgpull/cli/utils.py,sha256=tTmEiti8UgBYf_eWUozGjCGCGIJ-mPPXGwBf0jK8wuQ,6826
39
+ esgpull/cli/update.py,sha256=dPF6LJtaF9r91xcXXYHG6VrOcwSTWXKEvTlOSqbQX0s,9371
40
+ esgpull/cli/utils.py,sha256=dE5dIH6tWmhItarLDrNldiUuuX5qUjnVpnu4KkE6V1g,7199
40
41
  esgpull/migrations/README,sha256=heMzebYwlGhnE8_4CWJ4LS74WoEZjBy-S-mIJRxAEKI,39
41
42
  esgpull/migrations/env.py,sha256=am2HhFrlIZNlXCaA5Ye7yKbIJ2MRSO5UFmUwB8l9fyE,2285
42
43
  esgpull/migrations/script.py.mako,sha256=HNlf26BI1xvQKjiUojnj15BPrVUfVVr81IOgliJf83c,510
@@ -67,22 +68,25 @@ esgpull/migrations/versions/0.7.1_update_tables.py,sha256=f_PakdA0ZKmekcWWDC86u5
67
68
  esgpull/migrations/versions/0.7.2_update_tables.py,sha256=cBWEhfYQlhGpE55NOY9eD2psIb3HS7KOa9g-_3y0nQA,541
68
69
  esgpull/migrations/versions/0.7.3_update_tables.py,sha256=4pNkM7VaGQqkLuIoLKuM0ftefLjDBVFRaV8Nkq5OL-Y,541
69
70
  esgpull/migrations/versions/0.8.0_update_tables.py,sha256=5rr3guWipnnuciFuviUxZUasdPw6x06WZCmY5nNCn5k,555
71
+ esgpull/migrations/versions/0.9.0_update_tables.py,sha256=nXfPiyuseD5BXvu59zkeSTzb6EA7txpBudclU-MIyU0,555
70
72
  esgpull/migrations/versions/14c72daea083_query_add_column_updated_at.py,sha256=MKqz0tfwGwRkgP4QDd-cpUmXCVr4tM_wlC2BfxqJ1_w,1031
71
73
  esgpull/migrations/versions/c7c8541fa741_query_add_column_added_at.py,sha256=Al_o7fDmoRqc9vBCQgtgrNbSPIOBxdMZ5T-ztakqVeY,1033
72
- esgpull/models/__init__.py,sha256=rfa1yGLVDahFrnhq_8TPGzr7_oeBOFKNVD9EF0slUtY,725
73
- esgpull/models/base.py,sha256=3nbR2lYMHWfovWz4EiAJ2bIvKpMadRvYZDdMRQDvN7M,1237
74
- esgpull/models/dataset.py,sha256=1fOIVYIWKK5BivqvBpjfxrNpy9VfUHZng9Yc6ipPK1Q,905
74
+ esgpull/migrations/versions/d14f179e553c_file_add_composite_index_dataset_id_.py,sha256=0vJvttugWmgKns4g-K4i3EU6eid2Z_K2e3H6Ktevf7c,860
75
+ esgpull/migrations/versions/e7edab5d4e4b_add_dataset_tracking.py,sha256=QqZIDF9yF2Xx_pcYLST676jTbOjEAx2fB9QchD3lRAM,1297
76
+ esgpull/models/__init__.py,sha256=F7h0v7kTMImVD8slQyDnF8cKhxiy7nKtIPmeQR0L4HQ,761
77
+ esgpull/models/base.py,sha256=DopxyXvmJsvrWkjwS9FJaMzm_5cLOIcNgj2Dt3pQq80,1751
78
+ esgpull/models/dataset.py,sha256=tTc6u1Q871fnpAzB-54U7Y6rKeQymjjr7DwsSHMTn0o,2292
75
79
  esgpull/models/facet.py,sha256=COMgFjsxQcgb4uGMLy5JDRFWeMSHO-QDdG-cWpwvYqQ,459
76
80
  esgpull/models/file.py,sha256=-8PPYtq7BWp-O_QtCDbkLdhTGTPhI1F1nodQacMnYGA,1517
77
81
  esgpull/models/options.py,sha256=BUWf3IthlSvroNn05eC3MtGRq7wHIYlr1dFI1Wg9acM,4744
78
- esgpull/models/query.py,sha256=RjnZ4Z33KXfRQZKHAaMjd1DV91VJPUCQYIX3vnEmg9U,18085
82
+ esgpull/models/query.py,sha256=le0BLncg7A8mG-DjaLjv1_rAPq6uJZzYJKajtgBIWlE,19659
79
83
  esgpull/models/selection.py,sha256=QCX_2eoCJcYB1ULll-J7UV5lCpkweis92FANQY8pH0o,5895
80
- esgpull/models/sql.py,sha256=Wlw9cGJ_buv51qC0grV8HvprEwoG92e2zagxkQXKosk,7481
84
+ esgpull/models/sql.py,sha256=-lrm2Xw-_DygboYWWkDambYcSzUhZeHefIhN4g-S0wI,8670
81
85
  esgpull/models/synda_file.py,sha256=6o5unPhzVJGnbpA2MxcS0r-hrBwocHYVnLrqjSGtmuk,2387
82
86
  esgpull/models/tag.py,sha256=5CQDB9rAeCqog63ec9LPFN46HOFNkHPy-maY4gkBQ3E,461
83
87
  esgpull/models/utils.py,sha256=exwlIlIKYjhhfUE82w1kU_HeSQOSY97PTvpkhW0udMA,1631
84
- esgpull-0.8.0.dist-info/METADATA,sha256=9Vn3zY1slxEiNJ5zRFeDpx8fLRLSEX3V0CUtez9NLV8,3440
85
- esgpull-0.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
86
- esgpull-0.8.0.dist-info/entry_points.txt,sha256=vyh7HvFrCp4iyMrTkDoSF3weaYrlNj2OJe0Fq5q4QB4,45
87
- esgpull-0.8.0.dist-info/licenses/LICENSE,sha256=lUqGPGWDHHxjkUDuYgjLLY2XQXXn_EHU7fnrQWHGugc,1540
88
- esgpull-0.8.0.dist-info/RECORD,,
88
+ esgpull-0.9.0.dist-info/METADATA,sha256=acC9Ldx5T3-f38Gxu04DkCL-cS6y0ysAITkxonwmBDs,3471
89
+ esgpull-0.9.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
90
+ esgpull-0.9.0.dist-info/entry_points.txt,sha256=vyh7HvFrCp4iyMrTkDoSF3weaYrlNj2OJe0Fq5q4QB4,45
91
+ esgpull-0.9.0.dist-info/licenses/LICENSE,sha256=lUqGPGWDHHxjkUDuYgjLLY2XQXXn_EHU7fnrQWHGugc,1540
92
+ esgpull-0.9.0.dist-info/RECORD,,
esgpull/cli/datasets.py DELETED
@@ -1,78 +0,0 @@
1
- from collections import defaultdict
2
- from dataclasses import dataclass
3
-
4
- import click
5
- from click.exceptions import Abort, Exit
6
- from rich.box import MINIMAL_DOUBLE_HEAD
7
- from rich.table import Table
8
-
9
- from esgpull.cli.decorators import args, groups, opts
10
- from esgpull.cli.utils import init_esgpull, valid_name_tag
11
- from esgpull.models import FileStatus
12
- from esgpull.tui import Verbosity
13
-
14
-
15
- @dataclass
16
- class DatasetCounter:
17
- done: int = 0
18
- total: int = 0
19
-
20
- def is_complete(self) -> int:
21
- return self.done == self.total
22
-
23
- def asdict(self) -> dict:
24
- return {
25
- "done": self.done,
26
- "total": self.total,
27
- "complete": self.is_complete(),
28
- }
29
-
30
-
31
- @click.command()
32
- @args.query_id_required
33
- @groups.json_yaml
34
- @opts.verbosity
35
- def datasets(
36
- query_id: str,
37
- json: bool,
38
- yaml: bool,
39
- verbosity: Verbosity,
40
- ):
41
- """
42
- View datasets completeness per query.
43
- """
44
- esg = init_esgpull(verbosity)
45
- with esg.ui.logging("datasets", onraise=Abort):
46
- if not valid_name_tag(esg.graph, esg.ui, query_id, None):
47
- raise Exit(1)
48
- query = esg.graph.get(query_id)
49
- datasets: defaultdict[str, DatasetCounter] = defaultdict(
50
- DatasetCounter
51
- )
52
- for file in query.files:
53
- datasets[file.dataset_id].total += 1
54
- if file.status == FileStatus.Done:
55
- datasets[file.dataset_id].done += 1
56
- if json or yaml:
57
- datasets_dict = {
58
- dataset_id: counts.asdict()
59
- for dataset_id, counts in datasets.items()
60
- }
61
- if json:
62
- esg.ui.print(datasets_dict, json=True)
63
- elif yaml:
64
- esg.ui.print(datasets_dict, yaml=True)
65
- else:
66
- table = Table(box=MINIMAL_DOUBLE_HEAD, show_edge=False)
67
- table.add_column("dataset_id", justify="right", style="bold blue")
68
- table.add_column("done", justify="center")
69
- table.add_column("total", justify="center")
70
- table.add_column("complete", justify="center")
71
- for dataset_id, counts in datasets.items():
72
- table.add_row(
73
- dataset_id,
74
- str(counts.done),
75
- str(counts.total),
76
- str(counts.is_complete()),
77
- )
78
- esg.ui.print(table)