-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
685 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Build documentation" | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docs: | ||
name: "Build and deploy" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ammaraskar/sphinx-action@master | ||
with: | ||
docs-folder: "docs/" | ||
|
||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: documentation-html | ||
path: docs/_build/html/ | ||
|
||
- uses: shallwefootball/s3-upload-action@master | ||
with: | ||
aws_key_id: ${{ secrets.PALEWIRE_DOCS_AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.PALEWIRE_DOCS_AWS_SECRET_ACCESS_KEY }} | ||
aws_bucket: ${{ secrets.PALEWIRE_DOCS_AWS_BUCKET }} | ||
source_dir: docs/_build/html/ | ||
destination_dir: nws-wwa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,6 @@ | ||
Download watch, warning and advisory data from the National Weather Service | ||
### Links | ||
|
||
Hourly scrapes powered by a GitHub Action are stored in the `data` directory. | ||
|
||
## Installation | ||
|
||
```bash | ||
pipenv install nws-wwa | ||
``` | ||
|
||
## Command-line usage | ||
|
||
```bash | ||
Usage: nwswwa [OPTIONS] COMMAND [ARGS]... | ||
|
||
A command-line interface for downloading watch, warning and advisory data | ||
from the National Weather Service. Returns GeoJSON. | ||
|
||
Options: | ||
--help Show this message and exit. | ||
|
||
Commands: | ||
all All watch, warning and advisory data | ||
hazards All hazard data | ||
warnings All warnings data | ||
``` | ||
|
||
Download data from the National Weather Service. | ||
|
||
```bash | ||
nwswwa all | ||
nwswwa hazards | ||
nwswwa warnings | ||
``` | ||
|
||
## Python usage | ||
|
||
Import the library. | ||
|
||
```python | ||
import nws_wwa | ||
|
||
data = nws_wwa.get_all() | ||
data = nws_wwa.get_hazards() | ||
data = nws_wwa.get_warnings() | ||
``` | ||
|
||
## Contributing | ||
|
||
Install dependencies for development. | ||
|
||
```bash | ||
pipenv install --dev | ||
``` | ||
|
||
Run tests. | ||
|
||
```bash | ||
pipenv run python setup.py test | ||
``` | ||
|
||
## Developing the CLI | ||
|
||
The command-line interface is implemented using Click and setuptools. To install it locally for development inside your virtual environment, run the following installation command, as prescribed by the [Click documentation](https://click.palletsprojects.com/en/7.x/setuptools/#setuptools-integration). | ||
|
||
```bash | ||
pipenv run pip install --editable . | ||
``` | ||
* Docs: [palewi.re/docs/nws-wwa/](https://palewi.re/docs/nws-wwa/) | ||
* Issues: [github.com/datadesk/nws-wwa/issues](https://github.com/datadesk/nws-wwa/issues) | ||
* Packaging: [pypi.python.org/pypi/nws-wwa](https://pypi.python.org/pypi/nws-wwa) | ||
* Testing: [github.com/datadesk/nws-wwa/actions](https://github.com/datadesk/nws-wwa/actions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
Oops, something went wrong.