Skip to content

Commit

Permalink
Deploy preview for PR 125 🛫
Browse files Browse the repository at this point in the history
  • Loading branch information
botanical committed Feb 22, 2024
1 parent e4bcd9f commit aea15c0
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ <h3 class="anchored" data-anchor-id="get-token">3. Get token</h3>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a><span class="co"># base url for the workflows api</span></span>
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a><span class="co"># experimental / subject to change in the future</span></span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a>base_url <span class="op">=</span> <span class="st">"https://dev-api.delta-backend.com"</span></span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a>base_url <span class="op">=</span> <span class="st">"https://dev.openveda.cloud/api/workflows"</span></span>
<span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a><span class="co"># endpoint to get the token from</span></span>
<span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a>token_url <span class="op">=</span> <span class="ss">f"</span><span class="sc">{</span>base_url<span class="sc">}</span><span class="ss">/token"</span></span>
Expand Down
2 changes: 1 addition & 1 deletion pr-preview/pr-125/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"href": "contributing/dataset-ingestion/catalog-ingestion.html#step-iv-publication",
"title": "Catalog Ingestion",
"section": "STEP IV: Publication",
"text": "STEP IV: Publication\nThe publication process involves 3 steps:\n\n[VEDA] Publishing to the development STAC catalog https://dev.openveda.cloud/api/stac\n[EIS] Reviewing the collection/items published to the dev STAC catalog\n[VEDA] Publishing to the staging STAC catalog https://staging-stac.delta-backend.com\n\nTo use the VEDA Ingestion API to schedule ingestion/publication of the data follow these steps:\n\n1. Obtain credentials from a VEDA team member\nAsk a VEDA team member to create Cognito credentials (username and password) for VEDA authentication.\n\n\n2. Export username and password\nexport username=\"johndoe\"\nexport password=\"xxxx\"\n\n\n3. Get token\n# Required imports\nimport os\nimport requests\n\n# Pull username and password from environment variables\nusername = os.environ.get(\"username\")\npassword = os.environ.get(\"password\")\n\n# base url for the workflows api\n# experimental / subject to change in the future\nbase_url = \"https://dev-api.delta-backend.com\"\n\n# endpoint to get the token from\ntoken_url = f\"{base_url}/token\"\n\n# authentication credentials to be passed to the token_url\nbody = {\n \"username\": username,\n \"password\": password,\n}\n\n# request token\nresponse = requests.post(token_url, data=body)\nif not response.ok:\n raise Exception(\"Couldn't obtain the token. Make sure the username and password are correct.\")\nelse:\n # get token from response\n token = response.json().get(\"AccessToken\")\n # prepare headers for requests\n headers = {\n \"Authorization\": f\"Bearer {token}\"\n }\n\n\n4. Ingest the dataset\nThen, use the code snippet below to publish the dataset.\n# url for dataset validation / publication\nvalidate_url = f\"{base_url}/dataset/validate\"\n\npublish_url = f\"{base_url}/dataset/publish\"\n\n# prepare the body of the request,\nbody = json.load(open(\"dataset-definition.json\"))\n\n# Validate the data definition using the /validate endpoint\nvalidation_response = requests.post(\n validate_url,\n headers=headers,\n json=body\n)\n\n# look at the response\nvalidation_response.raise_for_status()\n\n# If the validation is successful, publish the dataset using /publish endpoint\npublish_response = requests.post(\n publish_url,\n headers=headers,\n json=body\n)\n\nif publish_response.ok:\n print(\"Success\")\n\n\nCheck the status of the execution\n# the id of the execution\n# should be available in the response of workflow execution request\nexecution_id = \"xxx\"\n# url for execution status\nexecution_status_url = f\"{workflow_execution_url}/{execution_id}\"\n# make the request\nresponse = requests.get(\n execution_status_url,\n headers=headers,\n)\nif response.ok:\n print(response.json())",
"text": "STEP IV: Publication\nThe publication process involves 3 steps:\n\n[VEDA] Publishing to the development STAC catalog https://dev.openveda.cloud/api/stac\n[EIS] Reviewing the collection/items published to the dev STAC catalog\n[VEDA] Publishing to the staging STAC catalog https://staging-stac.delta-backend.com\n\nTo use the VEDA Ingestion API to schedule ingestion/publication of the data follow these steps:\n\n1. Obtain credentials from a VEDA team member\nAsk a VEDA team member to create Cognito credentials (username and password) for VEDA authentication.\n\n\n2. Export username and password\nexport username=\"johndoe\"\nexport password=\"xxxx\"\n\n\n3. Get token\n# Required imports\nimport os\nimport requests\n\n# Pull username and password from environment variables\nusername = os.environ.get(\"username\")\npassword = os.environ.get(\"password\")\n\n# base url for the workflows api\n# experimental / subject to change in the future\nbase_url = \"https://dev.openveda.cloud/api/workflows\"\n\n# endpoint to get the token from\ntoken_url = f\"{base_url}/token\"\n\n# authentication credentials to be passed to the token_url\nbody = {\n \"username\": username,\n \"password\": password,\n}\n\n# request token\nresponse = requests.post(token_url, data=body)\nif not response.ok:\n raise Exception(\"Couldn't obtain the token. Make sure the username and password are correct.\")\nelse:\n # get token from response\n token = response.json().get(\"AccessToken\")\n # prepare headers for requests\n headers = {\n \"Authorization\": f\"Bearer {token}\"\n }\n\n\n4. Ingest the dataset\nThen, use the code snippet below to publish the dataset.\n# url for dataset validation / publication\nvalidate_url = f\"{base_url}/dataset/validate\"\n\npublish_url = f\"{base_url}/dataset/publish\"\n\n# prepare the body of the request,\nbody = json.load(open(\"dataset-definition.json\"))\n\n# Validate the data definition using the /validate endpoint\nvalidation_response = requests.post(\n validate_url,\n headers=headers,\n json=body\n)\n\n# look at the response\nvalidation_response.raise_for_status()\n\n# If the validation is successful, publish the dataset using /publish endpoint\npublish_response = requests.post(\n publish_url,\n headers=headers,\n json=body\n)\n\nif publish_response.ok:\n print(\"Success\")\n\n\nCheck the status of the execution\n# the id of the execution\n# should be available in the response of workflow execution request\nexecution_id = \"xxx\"\n# url for execution status\nexecution_status_url = f\"{workflow_execution_url}/{execution_id}\"\n# make the request\nresponse = requests.get(\n execution_status_url,\n headers=headers,\n)\nif response.ok:\n print(response.json())",
"crumbs": [
"Contributing",
"Dataset Ingestion",
Expand Down
88 changes: 44 additions & 44 deletions pr-preview/pr-125/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,178 +2,178 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://nasa-impact.github.io/veda-docs/contributing/docs-and-notebooks.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/contributing/dashboard-configuration/discovery-configuration.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/contributing/dataset-ingestion/file-preparation.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/contributing/dataset-ingestion/catalog-ingestion.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/contributing/dataset-ingestion/index.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/veda-operations/stac-item-creation.html</loc>
<lastmod>2024-02-22T16:43:39.109Z</lastmod>
<lastmod>2024-02-22T23:33:21.175Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/veda-operations/stac-collection-creation.html</loc>
<lastmod>2024-02-22T16:43:39.081Z</lastmod>
<lastmod>2024-02-22T23:33:21.147Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/datasets/air-quality-covid.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/datasets/volcano-so2-monitoring.html</loc>
<lastmod>2024-02-22T16:43:38.449Z</lastmod>
<lastmod>2024-02-22T23:33:20.515Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/downsample-zarr.html</loc>
<lastmod>2024-02-22T16:43:38.485Z</lastmod>
<lastmod>2024-02-22T23:33:20.551Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/open-and-plot.html</loc>
<lastmod>2024-02-22T16:43:38.685Z</lastmod>
<lastmod>2024-02-22T23:33:20.751Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/visualize-multiple-times.html</loc>
<lastmod>2024-02-22T16:43:38.721Z</lastmod>
<lastmod>2024-02-22T23:33:20.791Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/timeseries-stac-api.html</loc>
<lastmod>2024-02-22T16:43:38.689Z</lastmod>
<lastmod>2024-02-22T23:33:20.755Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/hls-visualization.html</loc>
<lastmod>2024-02-22T16:43:38.485Z</lastmod>
<lastmod>2024-02-22T23:33:20.555Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/no2-map-plot.html</loc>
<lastmod>2024-02-22T16:43:38.649Z</lastmod>
<lastmod>2024-02-22T23:33:20.719Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/templates/template-using-the-raster-api.html</loc>
<lastmod>2024-02-22T16:43:38.733Z</lastmod>
<lastmod>2024-02-22T23:33:20.799Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/tutorials/mapping-fires.html</loc>
<lastmod>2024-02-22T16:43:39.077Z</lastmod>
<lastmod>2024-02-22T23:33:21.143Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/tutorials/zonal-statistics-validation.html</loc>
<lastmod>2024-02-22T16:43:39.081Z</lastmod>
<lastmod>2024-02-22T23:33:21.147Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/tutorials/gif-generation.html</loc>
<lastmod>2024-02-22T16:43:38.733Z</lastmod>
<lastmod>2024-02-22T23:33:20.799Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/services/data-store.html</loc>
<lastmod>2024-02-22T16:43:39.109Z</lastmod>
<lastmod>2024-02-22T23:33:21.175Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/services/dashboard.html</loc>
<lastmod>2024-02-22T16:43:39.109Z</lastmod>
<lastmod>2024-02-22T23:33:21.175Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/external-resources.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/index.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/services/index.html</loc>
<lastmod>2024-02-22T16:43:39.109Z</lastmod>
<lastmod>2024-02-22T23:33:21.175Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/services/apis.html</loc>
<lastmod>2024-02-22T16:43:39.109Z</lastmod>
<lastmod>2024-02-22T23:33:21.175Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/services/jupyterhub.html</loc>
<lastmod>2024-02-22T16:43:39.109Z</lastmod>
<lastmod>2024-02-22T23:33:21.175Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/tutorials/netcdf-to-cog-cmip6.html</loc>
<lastmod>2024-02-22T16:43:39.077Z</lastmod>
<lastmod>2024-02-22T23:33:21.143Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/tutorials/stac_ipyleaflet.html</loc>
<lastmod>2024-02-22T16:43:39.077Z</lastmod>
<lastmod>2024-02-22T23:33:21.143Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/templates/template-accessing-the-data-directly.html</loc>
<lastmod>2024-02-22T16:43:38.733Z</lastmod>
<lastmod>2024-02-22T23:33:20.799Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/index.html</loc>
<lastmod>2024-02-22T16:43:38.449Z</lastmod>
<lastmod>2024-02-22T23:33:20.515Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/list-collections.html</loc>
<lastmod>2024-02-22T16:43:38.649Z</lastmod>
<lastmod>2024-02-22T23:33:20.719Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/download-assets.html</loc>
<lastmod>2024-02-22T16:43:38.449Z</lastmod>
<lastmod>2024-02-22T23:33:20.515Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/visualize-zarr.html</loc>
<lastmod>2024-02-22T16:43:38.733Z</lastmod>
<lastmod>2024-02-22T23:33:20.799Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/timeseries-rioxarray-stackstac.html</loc>
<lastmod>2024-02-22T16:43:38.685Z</lastmod>
<lastmod>2024-02-22T23:33:20.755Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/quickstarts/intake.html</loc>
<lastmod>2024-02-22T16:43:38.649Z</lastmod>
<lastmod>2024-02-22T23:33:20.719Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/datasets/nceo-biomass-statistics.html</loc>
<lastmod>2024-02-22T16:43:38.445Z</lastmod>
<lastmod>2024-02-22T23:33:20.515Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/datasets/ocean-npp-timeseries-analysis.html</loc>
<lastmod>2024-02-22T16:43:38.449Z</lastmod>
<lastmod>2024-02-22T23:33:20.515Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/veda-operations/generate-cmip6-kerchunk-historical.html</loc>
<lastmod>2024-02-22T16:43:39.081Z</lastmod>
<lastmod>2024-02-22T23:33:21.147Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/notebooks/veda-operations/publish-cmip6-kerchunk-stac.html</loc>
<lastmod>2024-02-22T16:43:39.081Z</lastmod>
<lastmod>2024-02-22T23:33:21.147Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/contributing/index.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/contributing/dataset-ingestion/stac-item-conventions.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/contributing/dataset-ingestion/stac-collection-conventions.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/contributing/dashboard-configuration/index.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
<url>
<loc>https://nasa-impact.github.io/veda-docs/contributing/dashboard-configuration/dataset-configuration.html</loc>
<lastmod>2024-02-22T16:43:38.417Z</lastmod>
<lastmod>2024-02-22T23:33:20.487Z</lastmod>
</url>
</urlset>

0 comments on commit aea15c0

Please sign in to comment.