CyberGIS-Compute Python SDK
CyberGIS-Compute is a scalable middleware framework for enabling high-performance and data-intensive geospatial research and education on CyberGISX. This API can be used to send supported jobs to various supported HPC & computing resources.
Installation
Requirements
- Python3 + pip3
- Jupyter server (Hub/Lab) with fixed domain
- System environment variables:
JUPYTERHUB_API_TOKEN: user access token, comes with JupyterHub/Lab.JUPYTER_INSTANCE_URL: server url
From Pip:
pip install cybergis-compute-client
From Github:
git clone https://github.com/cybergis/cybergis-compute-python-sdk.git
cd cybergis-compute-python-sdk
python3 setup.py install
Hello World Example
In this example, you will be using the SDK's Pilot UI to run the hello world GitHub project on the Keeling Computing Cluster.
- Run the Pilot UI
from cybergis_compute_client import CyberGISCompute
cybergis = CyberGISCompute(url="xxx") # replace xxx with CyberGIS-Compute server url
cybergis.show_ui() # run Pilot UI
- Select
hello worldfrom 📦 Job Template - Select
keeling_communityfrom 🖥 Computing Resource - Configure the following, or leave it as default
- Slurm Computing Configurations
- Input Parameters
- Receive Email
- Select a file to upload under Upload Data
- Click Submit
❓ If you wonder where the customized configuration options comes from, they are defined in the
manifest.jsonfile of each project. Please refer to https://github.com/cybergis/cybergis-compute-hello-world/blob/main/manifest.json
SDK Usage
cybergis = CyberGISCompute(url="xxx")
- Query and resume jobs that you own.
# CyberGISCompute.list_job -> return a list of jobs that you submitted
cybergis.list_job()
# CyberGISCompute.get_job_by_id -> return a Job object referred by that id
cybergis.get_job_by_id(id)
- Query CyberGIS-Compute server support information
# CyberGISCompute.list_hpc -> prints a list of hpc resources that the server supports
cybergis.list_hpc()
# CyberGISCompute.list_git -> prints a list of Git projects that the server supports
cybergis.list_git()
- Use Pilot UI
# Renders a IPython Widget UI in Jupyter (async)
# CyberGISCompute.create_job_by_ui -> return None
cybergis.show_ui()
# Get the job submitted by the UI (after you press the submit button)
# CyberGISCompute.get_latest_created_job -> return Job object
cybergis.get_latest_created_job()
- Submit job using programming style (in progress)
# the Job object is an interface for a job
# CyberGISCompute.create_job -> return Job object & print the job's information
job = cybergis.create_job(hpc="some HPC")
# Job.submit -> print the job's information
job.submit()
Related Documentation and Projects
Metadata
Release files for cybergis-compute-client 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cybergis_compute_client-0.2.6.tar.gz | 4.6 MB | Without provenance | Details for cybergis_compute_client-0.2.6.tar.gz |
Release files / cybergis_compute_client-0.2.6.tar.gz
| Download URL | cybergis_compute_client-0.2.6.tar.gz |
|---|---|
| Size | 4.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17c9d542828f7e9216a07a6c43367917392805c8d7f5f7045bef7384439fef68
|
|
BLAKE2b-256 checksum How to use checksums |
8df585f9f9867519d7a3d900461311b6005a454e52e07f1b185f8df08c59c431
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for cybergis-compute-client 0.2.6
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.