rda-python-dsarch 2.0.18__py3-none-any.whl → 2.0.20__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.
@@ -45,15 +45,15 @@ SETUP_GUIDE = """
45
45
  ------------------------------------------------------
46
46
 
47
47
  # Compile the pywrapper C binary (once per environment):
48
- pywrapper-install -u gdexdata
48
+ pywrapper-install -c|--compile -u|--user gdexdata
49
49
 
50
50
  # Wire up dsarch as a setuid entry:
51
- pywrapper-install -l dsarch -u gdexdata
51
+ pywrapper-install -l|--link dsarch -u|--user gdexdata
52
52
 
53
53
  Simple Install (no sudo required, runs as current user)
54
54
  -------------------------------------------------------
55
55
 
56
- pywrapper-install -l dsarch -s
56
+ pywrapper-install -l|--link dsarch -s|--simple
57
57
 
58
58
  This creates bin/dsarch -> bin/setuid_dsarch.
59
59
  The program runs as the current user with no privilege change.
@@ -0,0 +1,128 @@
1
+ Metadata-Version: 2.4
2
+ Name: rda_python_dsarch
3
+ Version: 2.0.20
4
+ Summary: RDA Python package for utility program dsarch archive RDA data
5
+ Author-email: Zaihua Ji <zji@ucar.edu>
6
+ Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Requires-Python: >=3.7
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: rda_python_common
15
+ Requires-Dist: rda_python_setuid
16
+ Requires-Dist: rda_python_miscs
17
+ Dynamic: license-file
18
+
19
+ # dsarch
20
+
21
+ Python project to archive and maintain datasets for the [NSF NCAR Geoscience Data Exchange (GDEX)](https://gdex.ucar.edu).
22
+
23
+ The user guide for this utility tool can be viewed at: [User guide](https://gdex-docs-dsarch.readthedocs.io).
24
+
25
+ ## Code overview
26
+
27
+ The package is built around three Python modules in `src/rda_python_dsarch/`:
28
+
29
+ - **`dsarch.py`** — Command-line entry point. Defines `DsArch`, the action
30
+ class that inherits from `PgArch` and `PgMeta`. Its two driver methods
31
+ `read_parameters()` and `start_actions()` parse the CLI and dispatch to
32
+ the matching handler (archive, get, set, move, delete, restore) for web,
33
+ saved, help, and Quasar-backup files, plus dataset, group, and version
34
+ metadata. After the primary action, it also performs cross-cutting
35
+ follow-up: dataset period updates, file-count resets (`-WN`/`-WM`/`-RT`),
36
+ final logging, and optional email notification.
37
+
38
+ - **`pg_arch.py`** — Shared state and helpers. Defines the `PgArch` mixin
39
+ (extends `PgOPT`, `PgCMD`, `PgSplit` from `rda_python_common`). Holds the
40
+ master `OPTS` table that maps short action codes (e.g. `AW`, `GD`, `SG`,
41
+ `RQ`) to their bit flags, names, and write-mode levels; the runtime path
42
+ cache (`RTPATH`, `webpaths`, `savedpaths`); and group-type/display-order
43
+ caches. Provides the utility methods used across all actions: SQL
44
+ condition building, path resolution, file-name validation, and dataset/
45
+ group metadata caching.
46
+
47
+ - **`pg_meta.py`** — File-count bookkeeping and metadata-XML queueing.
48
+ Defines the `PgMeta` mixin (extends `PgCMD`, `PgSplit`). Tracks pending
49
+ changes to per-dataset/per-group file counts in `GCOUNTS` (a 13-slot
50
+ array covering MSS, web-D/N, and saved buckets) and flushes them to RDADB
51
+ in batch. Maintains `META`, a queue of metadata operations dispatched
52
+ to the external tools `gatherxml`, `dcm`, `rcm`, `scm`, and `sml`. Also
53
+ provides `switch_logfile()` for redirecting per-action log/error output.
54
+
55
+ The inheritance chain is `DsArch -> PgArch -> PgMeta -> PgCMD/PgSplit`, so
56
+ `DsArch` instances expose every option, path, count, and database helper
57
+ through a single object.
58
+
59
+ ## Setuid Setup
60
+
61
+ `dsarch` is executed as the common user `gdexdata` via the `rda_python_setuid`
62
+ setuid mechanism. `rda_python_setuid` is declared as a dependency and is
63
+ installed automatically with this package.
64
+
65
+ ### Environment setup
66
+
67
+ #### Option A — Python venv (DECS machines)
68
+
69
+ ```bash
70
+ python3 -m venv $ENVHOME # e.g. /glade/u/home/gdexdata/gdexmsenv
71
+ source $ENVHOME/bin/activate
72
+ pip install rda_python_dsarch
73
+ ```
74
+
75
+ #### Option B — Conda (DAV/Casper)
76
+
77
+ ```bash
78
+ conda activate pg-gdex # e.g. /glade/work/gdexdata/conda-envs/pg-gdex
79
+ pip install rda_python_dsarch
80
+ ```
81
+
82
+ ### Full setuid install (requires sudo access to gdexdata)
83
+
84
+ Run these steps once per environment after `pip install`:
85
+
86
+ ```bash
87
+ # Compile the pywrapper C binary (once per environment):
88
+ pywrapper-install -c|--compile -u|--user gdexdata
89
+
90
+ # Wire up dsarch as a setuid entry:
91
+ pywrapper-install -l|--link dsarch -u|--user gdexdata
92
+ ```
93
+
94
+ `pywrapper-install` with no arguments displays the full user guide.
95
+
96
+ ### Simple install (no sudo required, runs as current user)
97
+
98
+ Users who do not need the setuid mechanism can create a direct symlink instead:
99
+
100
+ ```bash
101
+ pywrapper-install -l|--link dsarch -s|--simple
102
+ ```
103
+
104
+ This creates `bin/dsarch -> bin/setuid_dsarch` and the program runs as the
105
+ current user with no privilege change.
106
+
107
+ ### Setup guide
108
+
109
+ After `pip install`, run `dsarch-setup` at any time to display the setup guide:
110
+
111
+ ```bash
112
+ dsarch-setup
113
+ ```
114
+
115
+ The guide is also shown automatically if `setuid_dsarch` is invoked directly
116
+ before the setuid wrapper has been configured.
117
+
118
+ ## Documentation sync
119
+
120
+ The user guide rendered at
121
+ [gdex-docs-dsarch.readthedocs.io](https://gdex-docs-dsarch.readthedocs.io) is
122
+ generated from `src/rda_python_dsarch/dsarch.usg` in this repository. When a
123
+ pull request that modifies `dsarch.usg` is merged here, an automated workflow
124
+ converts the updated `dsarch.usg` into the RST-format source files in the
125
+ [gdex-docs-dsarch](https://github.com/NCAR/gdex-docs-dsarch) repository and
126
+ opens a pull request there with the regenerated docs, ready for review and
127
+ merge. No manual RST editing is required — keep all user-facing content in
128
+ `dsarch.usg` and let the sync produce the docs.
@@ -4,12 +4,12 @@ rda_python_dsarch/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs
4
4
  rda_python_dsarch/ds_arch.py,sha256=6bR0y6_rhIXyvbuYd-oZfL1YcaHhWBkojjzYz1yCrVg,233810
5
5
  rda_python_dsarch/dsarch.py,sha256=NEConPE8kIPGoEsmPjBdpeYqZW8p-OKMD1W8rxLO4Io,255368
6
6
  rda_python_dsarch/dsarch.usg,sha256=w26gjVm5BYZAX9h_6vHsDvFR6bLVeLFmWa4R7ROd-X4,105687
7
- rda_python_dsarch/dsarch_setup.py,sha256=LwPjWkFFXugOXl_LlXAbPMvpVFBeM-b46j1wioTFR5g,2070
7
+ rda_python_dsarch/dsarch_setup.py,sha256=9mSdSB_SLNviO07brFqploPJgKqW6nxN4fuyxTWqbLA,2120
8
8
  rda_python_dsarch/pg_arch.py,sha256=0mZGlQT9ecJr-92dloXDNtwF8EnPnY76IGLksqYsyYo,81057
9
9
  rda_python_dsarch/pg_meta.py,sha256=FFEkphGAT--66zvMNDPfiFG4nZQpXed_yVGMARdZb-o,46981
10
- rda_python_dsarch-2.0.18.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
11
- rda_python_dsarch-2.0.18.dist-info/METADATA,sha256=MMGm7r92JPIrWkBVVuso3XzMajtB3qVsUlO9voI4Ytk,2397
12
- rda_python_dsarch-2.0.18.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
13
- rda_python_dsarch-2.0.18.dist-info/entry_points.txt,sha256=9P6XioifNVKguvlnW716G1HP0Oloezo6ZWPOa_pVwZQ,115
14
- rda_python_dsarch-2.0.18.dist-info/top_level.txt,sha256=-vwcMgUXbBdHscvAKB3De9zKac3m_s_FaKIdApP1FGY,18
15
- rda_python_dsarch-2.0.18.dist-info/RECORD,,
10
+ rda_python_dsarch-2.0.20.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
11
+ rda_python_dsarch-2.0.20.dist-info/METADATA,sha256=xDJaMndeHTnGmvH1AeKtfx9eWxJ8Q08MAo976BwHRmY,4993
12
+ rda_python_dsarch-2.0.20.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
13
+ rda_python_dsarch-2.0.20.dist-info/entry_points.txt,sha256=9P6XioifNVKguvlnW716G1HP0Oloezo6ZWPOa_pVwZQ,115
14
+ rda_python_dsarch-2.0.20.dist-info/top_level.txt,sha256=-vwcMgUXbBdHscvAKB3De9zKac3m_s_FaKIdApP1FGY,18
15
+ rda_python_dsarch-2.0.20.dist-info/RECORD,,
@@ -1,82 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: rda_python_dsarch
3
- Version: 2.0.18
4
- Summary: RDA Python package for utility program dsarch archive RDA data
5
- Author-email: Zaihua Ji <zji@ucar.edu>
6
- Project-URL: Homepage, https://github.com/NCAR/rda-python-dsarch
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Classifier: Development Status :: 5 - Production/Stable
11
- Requires-Python: >=3.7
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: rda_python_common
15
- Requires-Dist: rda_python_setuid
16
- Requires-Dist: rda_python_miscs
17
- Dynamic: license-file
18
-
19
- # dsarch
20
-
21
- Python project to archive and maintain datasets for the [NSF NCAR Geoscience Data Exchange (GDEX)](https://gdex.ucar.edu).
22
-
23
- The user guide for this utility tool can be viewed at: [User guide](https://gdex-docs-dsarch.readthedocs.io).
24
-
25
- ## Setuid Setup
26
-
27
- `dsarch` is executed as the common user `gdexdata` via the `rda_python_setuid`
28
- setuid mechanism. `rda_python_setuid` is declared as a dependency and is
29
- installed automatically with this package.
30
-
31
- ### Environment setup
32
-
33
- #### Option A — Python venv (DECS machines)
34
-
35
- ```bash
36
- python3 -m venv $ENVHOME # e.g. /glade/u/home/gdexdata/gdexmsenv
37
- source $ENVHOME/bin/activate
38
- pip install rda_python_dsarch
39
- ```
40
-
41
- #### Option B — Conda (DAV/Casper)
42
-
43
- ```bash
44
- conda activate pg-gdex # e.g. /glade/work/gdexdata/conda-envs/pg-gdex
45
- pip install rda_python_dsarch
46
- ```
47
-
48
- ### Full setuid install (requires sudo access to gdexdata)
49
-
50
- Run these steps once per environment after `pip install`:
51
-
52
- ```bash
53
- # Compile the pywrapper C binary (once per environment):
54
- pywrapper-install -u gdexdata
55
-
56
- # Wire up dsarch as a setuid entry:
57
- pywrapper-install -l dsarch -u gdexdata
58
- ```
59
-
60
- `pywrapper-install` with no arguments displays the full user guide.
61
-
62
- ### Simple install (no sudo required, runs as current user)
63
-
64
- Users who do not need the setuid mechanism can create a direct symlink instead:
65
-
66
- ```bash
67
- pywrapper-install -l dsarch -s
68
- ```
69
-
70
- This creates `bin/dsarch -> bin/setuid_dsarch` and the program runs as the
71
- current user with no privilege change.
72
-
73
- ### Setup guide
74
-
75
- After `pip install`, run `dsarch-setup` at any time to display the setup guide:
76
-
77
- ```bash
78
- dsarch-setup
79
- ```
80
-
81
- The guide is also shown automatically if `setuid_dsarch` is invoked directly
82
- before the setuid wrapper has been configured.