Skip to content

Commit

Permalink
Merge pull request #1 from ZihengSun/main
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
ZihengSun authored Apr 16, 2023
2 parents 0dbc350 + 2566850 commit af18e56
Show file tree
Hide file tree
Showing 39 changed files with 737 additions and 65 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish PyGeoweaver Python 🐍 distributions 📦 to PyPI and TestPyPI

on: push

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
build/*
dist/*
*egg-info*
*.pyc
*/*.pyc
.idea/
*/__pycache__/*
*.pyc
*.pyc
344 changes: 344 additions & 0 deletions example.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,344 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 6,
"id": "511fe880",
"metadata": {},
"outputs": [],
"source": [
"import pygeoweaver"
]
},
{
"cell_type": "markdown",
"source": [
"## List Hosts"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 7,
"id": "b655ecc6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"+---------+-----------+-----------------+------+------------+\n",
"| Host Id | Hostname | IP | Port | Username |\n",
"+---------+-----------+-----------------+------+------------+\n",
"| 2c9z4s | Local | | | - |\n",
"| 100001 | Localhost | 127.0.0.1 | 22 | publicuser |\n",
"| 3yvozx | New Host | | | - |\n",
"| jf7wuu | Remote | 129.174.131.229 | 22 | chetana |\n",
"+---------+-----------+-----------------+------+------------+\n"
]
}
],
"source": [
"pygeoweaver.list_hosts()"
]
},
{
"cell_type": "markdown",
"source": [
"## Start server"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 8,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"start Geoweaver instance..\n",
"Stop running Geoweaver if any..\n",
"Start Geoweaver..\n",
"GeoWeaver is started and ready for use..\n",
"URL: http://localhost:8070/Geoweaver\n",
"Success: Geoweaver is up\n"
]
}
],
"source": [
"pygeoweaver.start()"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"## Show a specific host detail"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 11,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"HostId: 100001\n",
"+---------+-----------+-----------+------+------------+--------+------+-------------------+---------------+\n",
"| Host Id | Hostname | IP | Port | Username | Owner | type | url | Confidential? |\n",
"+---------+-----------+-----------+------+------------+--------+------+-------------------+---------------+\n",
"| 100001 | Localhost | 127.0.0.1 | 22 | publicuser | 111111 | ssh | http://localhost/ | FALSE |\n",
"+---------+-----------+-----------+------+------------+--------+------+-------------------+---------------+\n"
]
}
],
"source": [
"pygeoweaver.detail_host('100001')"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"## List workflows"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 13,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"+-----------------------+----------------------+\n",
"| Workflow Id | Name |\n",
"+-----------------------+----------------------+\n",
"| gr3ykr8dynu12vrwq11oy | snowcast_wormhole500 |\n",
"| ejthsf0nkll1ccdvvssg | test new |\n",
"| grlgu9mkbry3qe8qxdg1 | tada |\n",
"+-----------------------+----------------------+\n"
]
}
],
"source": [
"pygeoweaver.list_workflows()"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"## Show details of a specific workflow"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 14,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"WorkflowId: gr3ykr8dynu12vrwq11oy\n",
"+-----------------------+----------------------+-------------------------------------------------------------------------------------------------+--------+---------------+\n",
"| Workflow Id | Name | Description | Owner | Confidential? |\n",
"+-----------------------+----------------------+-------------------------------------------------------------------------------------------------+--------+---------------+\n",
"| gr3ykr8dynu12vrwq11oy | snowcast_wormhole500 | The complete workflow for snowcast workflow creation, train, test, validation, deploy, predict. | 111111 | FALSE |\n",
"+-----------------------+----------------------+-------------------------------------------------------------------------------------------------+--------+---------------+\n"
]
}
],
"source": [
"pygeoweaver.detail_workflow('gr3ykr8dynu12vrwq11oy')"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"## Show a specific workflow history"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 18,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"+-------------+---------+---------------------+---------------------+---------------+---------+-------+\n",
"| History Id | Status | Begin Time | End Time | Input | Output | Notes |\n",
"+-------------+---------+---------------------+---------------------+---------------+---------+-------+\n",
"| 5lwj8tt9wl6 | Stopped | 03/08/2023 04:47:10 | 03/08/2023 04:47:45 | No code saved | Skipped | - |\n",
"+-------------+---------+---------------------+---------------------+---------------+---------+-------+\n"
]
}
],
"source": [
"pygeoweaver.history_workflow('5lwj8tt9wl6')"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"## List Processes"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 19,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"+------------+-------------------------------------+----------+-------------+\n",
"| Process Id | Name | Language | Description |\n",
"+------------+-------------------------------------+----------+-------------+\n",
"| 8orlpp | sample bash | shell | shell |\n",
"| rfgoeg | current_dir | python | - |\n",
"| de8djk | sample-bash | shell | shell |\n",
"| 78vedq | data_sentinel2 | python | - |\n",
"| mxpyqt | model_creation_lstm | python | python |\n",
"| c2xkhz | model_creation_rf | python | - |\n",
"| rauqsh | model_creation_ghostnet | python | python |\n",
"| mi3e5n | model_comparison | python | - |\n",
"| u7xh2p | data_integration | python | - |\n",
"| 2wkl6e | service_deployment | python | python |\n",
"| i2fynz | service_prediction | python | - |\n",
"| e8k4wq | model_train_validate | python | - |\n",
"| h1qp9v | model_test | python | - |\n",
"| urd0nk | data_terrainFeatures | python | - |\n",
"| 525l8q | data_gee_modis_station_only | python | - |\n",
"| 7temiv | data_gee_sentinel1_station_only | python | - |\n",
"| rmxece | data_associate_station_grid_cell | python | - |\n",
"| illwc1 | data_gee_modis_real_time | python | - |\n",
"| sjs5by | data_gee_sentinel1_real_time | python | - |\n",
"| y7nb46 | base_hole | python | - |\n",
"| a8p3n7 | data_gee_gridmet_station_only | python | - |\n",
"| smsdr0 | data_gee_gridmet_real_time | python | - |\n",
"| 4i0sop | model_creation_xgboost | python | - |\n",
"| b63prf | testing_data_integration | python | - |\n",
"| zh38b6 | snowcast_utils | python | - |\n",
"| wdh394 | model_create_kehan | python | - |\n",
"| p87wh1 | data_snotel_real_time | python | - |\n",
"| ilbqzg | all_dependencies | python | - |\n",
"| do86ae | data_WUS_UCLA_SR | python | python |\n",
"| gkhtc0 | data_nsidc_4km_swe | python | - |\n",
"| lbd6cp | model_creation_et | python | python |\n",
"| 8ovvln | data_nsidc_4km_swe_testing | python | - |\n",
"| 6z5it4 | install_dependencies | python | - |\n",
"| 2l4pid | interpreter-exec | python | python |\n",
"| vzrekq | plot_utilities | python | - |\n",
"| 2u9n3d | subglacial_topography_plot | python | - |\n",
"| oikovr | gridded_topography_plot | python | - |\n",
"| r5qlro | normal_score_transformation | python | - |\n",
"| hyf9o1 | transformed_data_plot | python | python |\n",
"| a9jrs1 | isotropic_experimental_variogram | python | - |\n",
"| 8hyi80 | anisotropoic_experimental_variogram | python | - |\n",
"| 0qutu4 | plot_test | jupyter | jupyter |\n",
"| 8sv3o6 | gridmet_region_selection_download | python | python |\n",
"| 11iolq | gridmet_modis | python | python |\n",
"+------------+-------------------------------------+----------+-------------+\n"
]
}
],
"source": [
"pygeoweaver.list_processes()"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "markdown",
"source": [
"## Show history of a specific process"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 23,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"+--------------+--------+---------------------+---------------------+--------------------------------------------------------------------+------------------------------------------------+-------+\n",
"| History Id | Status | Begin Time | End Time | Input | Output | Notes |\n",
"+--------------+--------+---------------------+---------------------+--------------------------------------------------------------------+------------------------------------------------+-------+\n",
"| jbt9iT3SfNdf | Done | 02/28/2023 05:41:56 | 02/28/2023 05:41:57 | import os\n",
"\n",
"print(str(os.path.dirname(os.path.realpath(__file__)))) | /Users/gokulprathin/gw-workspace/jbt9iT3SfNdf\n",
" | - |\n",
"+--------------+--------+---------------------+---------------------+--------------------------------------------------------------------+------------------------------------------------+-------+\n"
]
}
],
"source": [
"pygeoweaver.history_process('jbt9iT3SfNdf')"
],
"metadata": {
"collapsed": false
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit af18e56

Please sign in to comment.