Merge pull request #21 from srcarter3/master

Changes made to support automatically build and deployment of documentation website

Add a new directory and yml file for the auto-build/deployment:
.github/workflows/ dir was created
sphinx_build_deploy.yml was created which is triggered when a change is made to the docs/ or examples/ directories. This action builds the html pages using sphinx and then deploys them to our webpage by pushing them into the gh-pages branch

Updated the docs/requirements.txt file to include numpy so sphinx can build all the pages properly

Modified the index.rst page to have some of the environment install instructions in code blocks instead of a bulleted list

Updated notebooks to have the '%matplotlib inline' call after the imports in the code so that the webpage renders properly:
Colored_Surface_Tempertature_Plot.ipynb
METAR_Station_Plot_with_MetPy.ipynb
Regional_Surface_Obs_Plot.ipynb
This commit is contained in:
srcarter3 2020-09-09 14:01:18 -06:00 committed by GitHub
commit e356f47129
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 75 additions and 35 deletions

View file

@ -0,0 +1,58 @@
name: Publish Sphinx Built Webpages to Github Pages
on:
push:
branches:
- master
paths:
- 'docs/**'
- 'examples/**'
jobs:
release:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
# Caching works, but then it reinstalls the regular dependencies anyway, so defeats the purpose of caching.
# - name: Install pip
# run: |
# python -m pip install --upgrade pip
# - name: Get pip cache dir
# id: pip-cache
# run : echo "::set-output name=dir::$(pip cache dir)"
# - name: Cache dependencies
# uses: actions/cache@v1
# with:
# path: ${{ steps.pip-cache.outputs.dir }}
# key: ${{ runner.os }}-pip-${{ hashFiles('**/docs/requirements.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-
- name: Install dependencies
run: |
sudo apt install pandoc
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Install ReadTheDocs theme
run: |
pip install sphinx_rtd_theme
- name: Build Sphinx documentation
run: |
cd docs
make html
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html

View file

@ -3,3 +3,4 @@ nbconvert>=4.1
enum34
jupyter
shapely
numpy

View file

@ -11,20 +11,25 @@ The python-awips package provides a data access framework for requesting grid an
Pip Install
-----------
- pip install python-awips
::
pip install python-awips
Conda Environment Install
-------------------------
To install the latest version of python-awips, with all required and optional packages:
- git clone https://github.com/Unidata/python-awips.git
- cd python-awips
- conda env create -f environment.yml
- conda activate python3-awips
- conda update - -all
- python setup.py install - -force
- jupyter notebook examples
::
git clone https://github.com/Unidata/python-awips.git
cd python-awips
conda env create -f environment.yml
conda activate python3-awips
python setup.py install --force
jupyter notebook examples
Requirements
------------

View file

@ -1,14 +1,5 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 63,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
@ -53,6 +44,7 @@
"from cartopy.feature import ShapelyFeature\n",
"from shapely.geometry import Polygon\n",
"from metpy.plots import StationPlot\n",
"%matplotlib inline\n",
"\n",
"# CONUS bounding box and envelope geometry\n",
"bbox=[-120, -70, 15, 55]\n",

View file

@ -1,14 +1,5 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
@ -33,6 +24,7 @@
"from metpy.plots import StationPlot, StationPlotLayout\n",
"from metpy.units import units\n",
"import warnings\n",
"%matplotlib inline\n",
"warnings.filterwarnings(\"ignore\",category =RuntimeWarning)\n",
"\n",
"def get_cloud_cover(code):\n",

View file

@ -1,14 +1,5 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
@ -35,6 +26,7 @@
"from metpy.calc import wind_components\n",
"from metpy.plots import simple_layout, StationPlot, StationPlotLayout\n",
"import warnings\n",
"%matplotlib inline\n",
"\n",
"def get_cloud_cover(code):\n",
" if 'OVC' in code:\n",