Skip to content

Commit

Permalink
Add env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Sep 1, 2024
1 parent ca14da2 commit 9704924
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ jobs:
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }}
timeout-minutes: 10
11 changes: 11 additions & 0 deletions docs/examples/_earthaccess.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@
"source": [
"hypercoast.download_pace(results[:1], out_dir=\"data\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"filepath = \"data/PACE_OCI.20240730T181157.L2.OC_AOP.V2_0.NRT.nc\"\n",
"if not os.path.exists(filepath):\n",
" raise FileNotFoundError(filepath)"
]
}
],
"metadata": {
Expand Down
12 changes: 12 additions & 0 deletions docs/workshops/pace.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@
"import hypercoast"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"if os.environ.get(\"EARTHDATA_USERNAME\") is None:\n",
" raise ValueError(\"Please set the EARTHDATA_USERNAME environment variable\")\n",
"if os.environ.get(\"EARTHDATA_PASSWORD\") is None:\n",
" raise ValueError(\"Please set the EARTHDATA_PASSWORD environment variable\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 9704924

Please sign in to comment.