generated from palewire/python-open-source-template
-
Notifications
You must be signed in to change notification settings - Fork 3
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
10 changed files
with
553 additions
and
77 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@v2 | ||
|
||
- 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: noaa-wildfires |
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,41 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
args: ['--maxkb=10000'] | ||
- id: check-case-conflict | ||
- id: mixed-line-ending | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/asottile/blacken-docs | ||
rev: v1.12.1 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black] | ||
|
||
- repo: https://github.com/timothycrosley/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.31.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py37-plus] |
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,78 +1,6 @@ | ||
Download wildfires data from NOAA satellites | ||
### Links | ||
|
||
## Installation | ||
|
||
```sh | ||
pipenv install noaa-wildfires | ||
``` | ||
|
||
## Command-line usage | ||
|
||
```sh | ||
Usage: noaawildfires [OPTIONS] COMMAND [ARGS]... | ||
|
||
A command-line interface for downloading wildfires data from NOAA. | ||
|
||
Returns GeoJSON. | ||
|
||
Options: | ||
--help Show this message and exit. | ||
|
||
Commands: | ||
hms-fires The latest fires from Hazard Mapping System satellites | ||
hms-smoke The latest smoke data from Hazard Mapping System satellites | ||
``` | ||
|
||
Download the latest fires from Hazard Mapping System satellites. | ||
|
||
```sh | ||
noaawildfires hms-fires | ||
``` | ||
|
||
Download the latest smoke data from Hazard Mapping System satellites. | ||
|
||
```sh | ||
noaawildfires hms-smoke | ||
``` | ||
|
||
## Python usage | ||
|
||
Import the library. | ||
|
||
```python | ||
import noaa_wildfires | ||
``` | ||
|
||
Download the latest fires from Hazard Mapping System satellites. | ||
|
||
```python | ||
noaa_wildfires.get_hms_fires() | ||
``` | ||
|
||
Download the latest smoke data from Hazard Mapping System satellites. | ||
|
||
```python | ||
noaa_wildfires.get_hms_smoke() | ||
``` | ||
|
||
## Contributing | ||
|
||
Install dependencies for development. | ||
|
||
```sh | ||
pipenv install --dev | ||
``` | ||
|
||
Run tests. | ||
|
||
```sh | ||
pipenv run python test.py | ||
``` | ||
|
||
## 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). | ||
|
||
```sh | ||
pipenv run pip install --editable . | ||
``` | ||
* Docs: [palewi.re/docs/noaa-wildfires/](https://palewi.re/docs/noaa-wildfires/) | ||
* Issues: [github.com/datadesk/noaa-wildfires/issues](https://github.com/datadesk/noaa-wildfires/issues) | ||
* Packaging: [pypi.python.org/pypi/noaa-wildfires](https://pypi.python.org/pypi/noaa-wildfires) | ||
* Testing: [github.com/datadesk/noaa-wildfires/actions](https://github.com/datadesk/noaa-wildfires/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.