Skip to content

Commit

Permalink
Merge pull request #295 from ocefpaf/docs
Browse files Browse the repository at this point in the history
Re-write docs to avoid bad servers
  • Loading branch information
ocefpaf authored Feb 21, 2023
2 parents a500438 + db33501 commit 15a0ec4
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 161 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ jobs:
micromamba activate TEST
python -m pip install -e . --no-deps --force-reinstall
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(python setup.py --version)

- name: Build documentation
shell: bash -l {0}
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:
- name: Test wheels
run: |
cd dist && python -m pip install erddapy*.whl
cd dist && python -m pip install *.whl
python -m twine check *
- name: Publish a Python distribution to PyPI
if: ${{ github.event_name == 'release' }}
uses: pypa/gh-action-pypi-publish@v1.6.4
if: success() && github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ repos:
.*\.yaml
)$
args:
- --quiet-level=2
- --ignore-words-list=pres

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
Expand Down
56 changes: 22 additions & 34 deletions notebooks/00-quick_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@
"\n",
"```shell\n",
"pip install erddapy\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First we need to instantiate the ERDDAP URL constructor for a server. In this\n",
"example we will use\n",
"[https://upwell.pfeg.noaa.gov/erddap](https://upwell.pfeg.noaa.gov/erddap/index.html).\n"
"```\n",
"\n",
"\n",
"First we need to instantiate the ERDDAP URL constructor for a server.\n",
"In this example we will use\n",
"[https://erddap.ifremer.fr/erddap](https://erddap.ifremer.fr/erddap/index.html)."
]
},
{
Expand All @@ -38,7 +34,7 @@
"\n",
"\n",
"e = ERDDAP(\n",
" server=\"UAF\", # NOAA UAF (Unified Access Framework)\n",
" server=\"ifremer\",\n",
" protocol=\"tabledap\",\n",
" response=\"csv\",\n",
")"
Expand All @@ -59,15 +55,15 @@
"metadata": {},
"outputs": [],
"source": [
"e.dataset_id = \"scrippsGliders\"\n",
"e.dataset_id = \"OceanGlidersGDACTrajectories\"\n",
"\n",
"e.variables = [\n",
" \"depth\",\n",
" \"time\",\n",
" \"latitude\",\n",
" \"longitude\",\n",
" \"salinity\",\n",
" \"temperature\",\n",
" \"time\",\n",
" \"PRES\",\n",
" \"PSAL\",\n",
" \"TEMP\",\n",
"]\n",
"\n",
"e.constraints = {\n",
Expand Down Expand Up @@ -101,17 +97,13 @@
"constraints = {\n",
" \"time>=\": \"now-14days\",\n",
" \"time<=\": \"now-7days\",\n",
" \"latitude>=\": \"min(latitude)+5\",\n",
" \"latitude<=\": \"max(latitude)-5\",\n",
" \"longitude>=\": \"min(longitude)+5\",\n",
" \"longitude<=\": \"min(longitude)+10\",\n",
" \"depth>=\": \"min(depth)+5\",\n",
" \"depth<=\": \"max(depth)-40\",\n",
" \"longitude>=\": \"min(longitude)\",\n",
"}\n",
"\n",
"\n",
"url = e.get_download_url(\n",
" response=\"html\",\n",
" response=\"htmlTable\",\n",
" constraints=constraints,\n",
")\n",
"\n",
Expand All @@ -133,14 +125,10 @@
"outputs": [],
"source": [
"constraints = {\n",
" \"time>=\": \"2021-09-11T23:26:55Z\",\n",
" \"time<=\": \"2021-09-18T23:26:55Z\",\n",
" \"latitude>=\": -7.52,\n",
" \"latitude<=\": 46.67,\n",
" \"longitude>=\": -121.48,\n",
" \"longitude<=\": -116.48,\n",
" \"depth>=\": -3.82,\n",
" \"depth<=\": 1001.59,\n",
" \"time>=\": \"2023-02-06T19:12:32Z\",\n",
" \"time<=\": \"2023-02-13T19:12:32Z\",\n",
" \"longitude>=\": -149.60,\n",
" \"longitude<=\": -139.60,\n",
"}\n",
"\n",
"url = e.get_download_url(\n",
Expand All @@ -155,7 +143,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We can search all datasets with a set of constraints by setting `dataset_id` to `\"allDatasets\"`. Note that these variables are different than the ones available at the individual dataset level. For a reference of the possible variables to query all datasets see the `<server-url>/erddap/<protocol>/allDatasets.html` page, like [this one](https://upwell.pfeg.noaa.gov/erddap/tabledap/allDatasets.html) for the UAF ERDDAP server."
"We can search all datasets with a set of constraints by setting `dataset_id` to `\"allDatasets\"`. Note that these variables are different than the ones available at the individual dataset level. For a reference of the possible variables to query all datasets see the `<server-url>/erddap/<protocol>/allDatasets.html` page, like [this one](https://erddap.ifremer.fr/erddap/tabledap/allDatasets.html) for the Ifremer ERDDAP server."
]
},
{
Expand All @@ -177,9 +165,9 @@
" \"maxLongitude\",\n",
"]\n",
"\n",
"\n",
"e.constraints = {\n",
" \"minTime>=\": \"2010-01-01T00:00:00Z\",\n",
" \"maxTime<=\": \"2011-01-01T00:00:00Z\",\n",
" \"minTime>=\": \"1997-01-01T00:00:00Z\",\n",
"}\n",
"\n",
"\n",
Expand Down Expand Up @@ -222,7 +210,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.11.0"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 15a0ec4

Please sign in to comment.