esgpull 0.7.3__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.
Files changed (37) hide show
  1. esgpull/cli/__init__.py +2 -2
  2. esgpull/cli/add.py +7 -1
  3. esgpull/cli/config.py +5 -21
  4. esgpull/cli/plugins.py +398 -0
  5. esgpull/cli/show.py +29 -0
  6. esgpull/cli/status.py +6 -4
  7. esgpull/cli/update.py +72 -18
  8. esgpull/cli/utils.py +16 -1
  9. esgpull/config.py +83 -25
  10. esgpull/constants.py +3 -0
  11. esgpull/context.py +15 -15
  12. esgpull/database.py +8 -2
  13. esgpull/download.py +3 -0
  14. esgpull/esgpull.py +49 -5
  15. esgpull/graph.py +1 -1
  16. esgpull/migrations/versions/0.8.0_update_tables.py +28 -0
  17. esgpull/migrations/versions/0.9.0_update_tables.py +28 -0
  18. esgpull/migrations/versions/14c72daea083_query_add_column_updated_at.py +36 -0
  19. esgpull/migrations/versions/c7c8541fa741_query_add_column_added_at.py +37 -0
  20. esgpull/migrations/versions/d14f179e553c_file_add_composite_index_dataset_id_.py +32 -0
  21. esgpull/migrations/versions/e7edab5d4e4b_add_dataset_tracking.py +39 -0
  22. esgpull/models/__init__.py +2 -1
  23. esgpull/models/base.py +31 -14
  24. esgpull/models/dataset.py +48 -5
  25. esgpull/models/options.py +1 -1
  26. esgpull/models/query.py +98 -15
  27. esgpull/models/sql.py +40 -9
  28. esgpull/plugin.py +574 -0
  29. esgpull/processor.py +3 -3
  30. esgpull/tui.py +23 -1
  31. esgpull/utils.py +19 -3
  32. {esgpull-0.7.3.dist-info → esgpull-0.9.0.dist-info}/METADATA +11 -2
  33. {esgpull-0.7.3.dist-info → esgpull-0.9.0.dist-info}/RECORD +36 -29
  34. {esgpull-0.7.3.dist-info → esgpull-0.9.0.dist-info}/WHEEL +1 -1
  35. esgpull/cli/datasets.py +0 -78
  36. {esgpull-0.7.3.dist-info → esgpull-0.9.0.dist-info}/entry_points.txt +0 -0
  37. {esgpull-0.7.3.dist-info → esgpull-0.9.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: esgpull
3
- Version: 0.7.3
3
+ Version: 0.9.0
4
4
  Summary: ESGF data discovery, download, replication tool
5
5
  Project-URL: Repository, https://github.com/ESGF/esgf-download
6
6
  Project-URL: Documentation, https://esgf.github.io/esgf-download/
@@ -23,6 +23,7 @@ Requires-Dist: click>=8.1.3
23
23
  Requires-Dist: httpx>=0.23.0
24
24
  Requires-Dist: myproxyclient>=2.1.0
25
25
  Requires-Dist: nest-asyncio>=1.5.6
26
+ Requires-Dist: packaging>=25.0
26
27
  Requires-Dist: platformdirs>=2.6.2
27
28
  Requires-Dist: pyopenssl>=22.1.0
28
29
  Requires-Dist: pyparsing>=3.0.9
@@ -99,3 +100,11 @@ Commands:
99
100
  untrack Untrack queries
100
101
  update Fetch files, link files <-> queries, send files to download...
101
102
  ```
103
+
104
+ ## Useful links
105
+ * [ESGF Webinar: An Introduction to esgpull, A Replacement for Synda](https://www.youtube.com/watch?v=xv2RVMd1iCA)
106
+
107
+
108
+ ## Contributions
109
+
110
+ You can use the common github workflow (through pull requests and issues) to contribute.
@@ -1,42 +1,43 @@
1
1
  esgpull/__init__.py,sha256=XItFDIMNmFUNNcKtUgXdfmGwUIWt4AAv0a4mZkfj5P8,240
2
2
  esgpull/auth.py,sha256=QZ-l1ySLMP0fvuwYHRLv9FZYp1gqfju_eGaTMDByUxw,5205
3
- esgpull/config.py,sha256=3E3jRGem09M_Hm1_uqWHu4dy7gzgShiUecZp-6XC9E4,12149
4
- esgpull/constants.py,sha256=fQE6vE2EU8V5m2lRNYBeMkL3u1_Em343Zs8u7i6ZRlo,1118
5
- esgpull/context.py,sha256=ZywqCvIKZrW1pJln04993yxT6dW8yJ7fnx6LJL7Ot0E,23368
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=eKipKCqj15dzCAqs1o7x5O1XClWPmDEM-qSvNwGZmXY,1233
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
34
35
  esgpull/cli/self.py,sha256=7nEEsK5W_Pth8IOSmvJHRlfwPPgXldhHAQK9yqf01S8,7932
35
- esgpull/cli/show.py,sha256=4O1TvH31x9Fg-SI0a8dtblMZuJHJ30eBXOV9bwEl9Lk,1897
36
- esgpull/cli/status.py,sha256=jgGBbmvcCjw21QTDNXdKAUo664p6junRg5kMwQ7My2I,2470
36
+ esgpull/cli/show.py,sha256=B-h7bKMrwgjnTHio2du8IPOLlKCaan56RQKAtzlQzcw,2822
37
+ esgpull/cli/status.py,sha256=HEyj6QFABblADtYf1PWmSzghKX3fs33x9p5vpSqA514,2521
37
38
  esgpull/cli/track.py,sha256=Q9ZvvV5FFGzp6wQZflAd_OFmqhAWgl1JFBad2dCbEF0,3089
38
- esgpull/cli/update.py,sha256=x_R4x7hdUp5qowcFUibIMozwWTlJybuZMY_EXWhj_kI,7024
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
@@ -66,20 +67,26 @@ esgpull/migrations/versions/0.7.0_update_tables.py,sha256=aCmR7q-1V49JIfvFR-1iVs
66
67
  esgpull/migrations/versions/0.7.1_update_tables.py,sha256=f_PakdA0ZKmekcWWDC86u5PlUrF_Kl2xzkNV3Am9sd0,541
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
- esgpull/models/__init__.py,sha256=rfa1yGLVDahFrnhq_8TPGzr7_oeBOFKNVD9EF0slUtY,725
70
- esgpull/models/base.py,sha256=3nbR2lYMHWfovWz4EiAJ2bIvKpMadRvYZDdMRQDvN7M,1237
71
- esgpull/models/dataset.py,sha256=1fOIVYIWKK5BivqvBpjfxrNpy9VfUHZng9Yc6ipPK1Q,905
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
72
+ esgpull/migrations/versions/14c72daea083_query_add_column_updated_at.py,sha256=MKqz0tfwGwRkgP4QDd-cpUmXCVr4tM_wlC2BfxqJ1_w,1031
73
+ esgpull/migrations/versions/c7c8541fa741_query_add_column_added_at.py,sha256=Al_o7fDmoRqc9vBCQgtgrNbSPIOBxdMZ5T-ztakqVeY,1033
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
72
79
  esgpull/models/facet.py,sha256=COMgFjsxQcgb4uGMLy5JDRFWeMSHO-QDdG-cWpwvYqQ,459
73
80
  esgpull/models/file.py,sha256=-8PPYtq7BWp-O_QtCDbkLdhTGTPhI1F1nodQacMnYGA,1517
74
- esgpull/models/options.py,sha256=yzADDeDgtMymFdKG31JMl8sds-LnWDmjtaCpQ6EUKQ0,4745
75
- esgpull/models/query.py,sha256=sMtwdnTRcPzK_KCIXXN9YEQ8TdaGW2z3m6RDeyQJU94,16712
81
+ esgpull/models/options.py,sha256=BUWf3IthlSvroNn05eC3MtGRq7wHIYlr1dFI1Wg9acM,4744
82
+ esgpull/models/query.py,sha256=le0BLncg7A8mG-DjaLjv1_rAPq6uJZzYJKajtgBIWlE,19659
76
83
  esgpull/models/selection.py,sha256=QCX_2eoCJcYB1ULll-J7UV5lCpkweis92FANQY8pH0o,5895
77
- esgpull/models/sql.py,sha256=Wlw9cGJ_buv51qC0grV8HvprEwoG92e2zagxkQXKosk,7481
84
+ esgpull/models/sql.py,sha256=-lrm2Xw-_DygboYWWkDambYcSzUhZeHefIhN4g-S0wI,8670
78
85
  esgpull/models/synda_file.py,sha256=6o5unPhzVJGnbpA2MxcS0r-hrBwocHYVnLrqjSGtmuk,2387
79
86
  esgpull/models/tag.py,sha256=5CQDB9rAeCqog63ec9LPFN46HOFNkHPy-maY4gkBQ3E,461
80
87
  esgpull/models/utils.py,sha256=exwlIlIKYjhhfUE82w1kU_HeSQOSY97PTvpkhW0udMA,1631
81
- esgpull-0.7.3.dist-info/METADATA,sha256=3QSuofTjEamQ7oc5Idx8N5qRswwRLxz5IaLvVfZyYU8,3199
82
- esgpull-0.7.3.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
83
- esgpull-0.7.3.dist-info/entry_points.txt,sha256=vyh7HvFrCp4iyMrTkDoSF3weaYrlNj2OJe0Fq5q4QB4,45
84
- esgpull-0.7.3.dist-info/licenses/LICENSE,sha256=lUqGPGWDHHxjkUDuYgjLLY2XQXXn_EHU7fnrQWHGugc,1540
85
- esgpull-0.7.3.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,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.25.0
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
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)