Skip to main content

rda_python_miscs

RDA Python package to hold miscellaneous utility programs for the NSF NCAR Geoscience Data Exchange (GDEX).

Programs

The package provides two categories of programs:

Run as current user (no setuid required):

Command Alias Description
bashqsub Submit a job as a bash batch job on a PBS node via qsub
tcshqsub Submit a job as a tcsh batch job on a PBS node via qsub
gdexsub rdasub Submit a command as a nohup background process on the local machine
pgwget Download remote files by root name pattern, combining downloaded parts into a single file
gdexls List local files and directories with matching metadata from the GDEX database
gdexps rdaps Show process status for local or PBS batch processes, with filtering by PID, owner, or name
gdexzip rdazip Compress or uncompress files using a supported format
gdexown rdaown Change ownership of files and directories to gdexdata (must be run as root)
pgrst Convert .usg files to RST and push to gdex-docs-* repos on GitHub for readthedocs.io

Run as gdexdata via setuid (requires setup below):

Command Alias Connector script Description
gdexcp rdacp setuid_gdexcp / setuid_rdacp Copy files and directories across local, remote, Object Store, or Globus endpoints
gdexdrop setuid_gdexdrop Copy local files into a GDEX dataset directory as gdexdata, for data providers outside the DECS group
gdexkill rdakill setuid_gdexkill / setuid_rdakill Kill local processes and their children, or cancel PBS batch jobs
gdexmod rdamod setuid_gdexmod / setuid_rdamod Change permission modes for files and directories owned by gdexdata
decsdata_storage setuid_decsdata_storage Move decsdata datasets into the GLADE HSM cold storage to migrate them onto tape
decsdata_restore setuid_decsdata_restore Recall decsdata datasets out of the GLADE HSM cold storage and copy them back

Environment setup

Create a Python environment first; package installs in the next section run inside whichever environment you activate here.

Option A — Python venv (DECS machines)

python3 -m venv $ENVHOME          # e.g. /glade/u/home/gdexdata/gdexmsenv
source $ENVHOME/bin/activate

Option B — Conda (DAV/Casper)

conda create --prefix $ENVHOME python=3.12   # e.g. /glade/work/gdexdata/conda-envs/pg-gdex
conda activate $ENVHOME

Installing rda-python-miscs

Pick whichever install mode fits your workflow. All four pull in the transitive dependencies (rda_python_common, rda_python_setuid) automatically.

For local development, clone this repo alongside your project and install it in editable mode so that changes are picked up without re-installing:

git clone https://github.com/NCAR/rda-python-miscs.git
cd rda-python-miscs
pip install -e .

To test a specific branch (e.g. an in-progress feature or fix branch), pass -b/--branch to git clone:

git clone -b <branch-name> https://github.com/NCAR/rda-python-miscs.git
cd rda-python-miscs
pip install -e .

For a regular (non-editable) install from a checkout:

pip install /path/to/rda-python-miscs

For a production install on a system that uses the published distribution:

pip install rda_python_miscs

Setuid Setup

The setuid programs (gdexcp, gdexdrop, gdexkill, gdexmod, decsdata_storage, decsdata_restore and the rda* aliases) execute as the common user PGLOG['COMMONUSER'] (default gdexdata) via the rda_python_setuid mechanism, which is pulled in automatically as a dependency. After pip install above, choose one of the wiring options below.

Note: If rda_python_setuid is already installed and fully set up in your environment, you can skip the compile step (-c/--compile) and the optional pgstart step (-p/--pgstart). The -l/--link step is still required to wire up this package's own setuid programs.

Full setuid install (requires sudo access to COMMONUSER)

Run these steps once per environment:

# 1. Compile the pywrapper C binary (once per environment):
pywrapper-install -c|--compile -n|--username gdexdata

# 2. Wire up all setuid programs in one pass:
pywrapper-install -l|--link all

# 3. Optionally, install a pgstart_<loginname> binary so <loginname> (any
#    user in the same group as PGLOG['COMMONUSER']) can run commands as
#    themselves.  Run either by PGLOG['ADMINUSER'] (default zji, if it has
#    'sudo -u <loginname>'), or by <loginname> directly:
pywrapper-install -p|--pgstart -n|--username <loginname>

pywrapper-install with no arguments displays the full user guide.

Simple install (no sudo required, runs as current user)

Users who do not need the setuid mechanism can create direct symlinks instead:

pywrapper-install -l|--link all -s|--simple

This creates bin/<name> -> bin/setuid_<name> for every setuid program and they run as the current user with no privilege change.

Update an existing installation (no sudo required)

When the package is upgraded and a new pywrapper.c is bundled, recompile and reinstall all setuid binaries using the existing pgstart_* binaries:

pywrapper-install -u|--update

Setup guide

The shared setuid setup guide is shown automatically if any setuid_* connector script is invoked directly before the setuid wrapper has been configured.

gdexdrop access list

gdexdrop lets data providers who are not in the DECS group copy files into a dataset directory so that the result is owned by gdexdata. It is a deliberately narrow alternative to gdexcp: the destination is always /glade/campaign/collections/gdex/data/<dsid>, a path that escapes the dataset directory is rejected, and every source must be readable by the calling user rather than only by gdexdata.

Who may drop into which dataset is read from the access list /glade/u/home/gdexdata/config/gdexdrop.conf. It must be owned by gdexdata and must not be writable by group or others, otherwise gdexdrop refuses to run. Each line is a login name, a colon, and the colon-separated dataset IDs that login may drop into, or all for every dataset; # starts a comment:

# login: dsid1[:...:dsidn]
jdoe: d123456:d654321
asmith: d111222
gdexhelp: all

The root path, the access list path and the log path are compiled into the program rather than taken from PGLOG, because PGLOG['DSDHOME'], PGLOG['DSSHOME'] and PGLOG['LOGPATH'] are all settable from environment variables of the same name, which the caller controls.

Cold storage setup

decsdata_storage and decsdata_restore drive the GLADE HSM through the glade_hsm script, which is not part of this package. They look it up at ~benkirk/glade_hsm unless the environment variable GLADE_HSM names another copy of it:

export GLADE_HSM=/path/to/glade_hsm

Both programs work on the decsdata directory PGLOG['DECSHOME'] (default /glade/campaign/collections/gdex/decsdata, also reachable as /gdex/decsdata), which option -w overrides. Only members of the DECS group may run them, and decsdata_restore reads Table sfile in RDADB to size a restore, so a working RDADB login is required as well.

Because the decsdata quota is limited, check the space left with gladequota before a large restore:

pgstart_gdexdata gladequota    # or plain 'gladequota' when logged in as gdexdata

decsdata_restore -x runs the same check itself and refuses to request a recall unless twice the size of the data is still available.

Metadata

Release files for rda-python-miscs 3.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rda-python-miscs 3.0.6
File Size Uploaded
rda_python_miscs-3.0.6.tar.gz 93.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rda-python-miscs 3.0.6
File Interpreter ABI Platform
rda_python_miscs-3.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 223.5 kB

Release files / rda_python_miscs-3.0.6.tar.gz

Download URL rda_python_miscs-3.0.6.tar.gz
Size 93.1 kB
Tags Source
SHA-256 checksum
How to use checksums
645901dba0a75d1719d61fe36a7ddcb1e8b3c6e508e2c007e86adcd9ad42b3cf
BLAKE2b-256 checksum
How to use checksums
c113a48304932ff2fd58635beb0a0bd01daf362e9798ca8df29c20112474df67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / rda_python_miscs-3.0.6-py3-none-any.whl

Download URL rda_python_miscs-3.0.6-py3-none-any.whl
Size 130.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f2f756072ad8a70d3b74d1f05c7a69945316c20858d90abeea319c8173da0e0
BLAKE2b-256 checksum
How to use checksums
16367c92b4133c40f75866ae57cc5156188d17b4b482bba63e2b922e1c914b2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

3.0.8

2 release files

3.0.7

2 release files

This release

3.0.6 This release

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.12

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page