diff --git a/Pipfile b/Pipfile index ab9fdeb..cb6ea85 100644 --- a/Pipfile +++ b/Pipfile @@ -10,6 +10,7 @@ sphinx = "*" setuptools-scm = "*" pre-commit = "*" myst-parser = "*" +sphinx-palewire-theme = "*" [packages] click = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 25fb59d..bef78d5 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "cfbf49f62d9a4572228956a4bbd809d9c7bae096ba10547e06409e7033c92313" + "sha256": "982fdb91048c9aa80213ea01dc6beec4358e95a652c59f233b17fb98009591d2" }, "pipfile-spec": 6, "requires": { @@ -813,6 +813,13 @@ "markers": "python_version >= '3.9'", "version": "==7.2.6" }, + "sphinx-palewire-theme": { + "hashes": [ + "sha256:36f9e6edda93dc8b8af308a521c503b05c62f0a79cae4d65a16099156bcf528f" + ], + "index": "pypi", + "version": "==0.0.9" + }, "sphinxcontrib-applehelp": { "hashes": [ "sha256:094c4d56209d1734e7d252f6e0b3ccc090bd52ee56807a5d9315b19c122ab15d", diff --git a/README.md b/README.md index 4f2194c..f9f9fd1 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,4 @@ -# Califire Wildfires -Download wildfires data from Calfire - -## Installation -``` -pipenv install calfire-wildfires -``` -## Command-line usage - -``` -Usage: calfirewildfires [OPTIONS] COMMAND [ARGS]... - - A command-line interface for downloading wildfires data from CalFire. - Returns GeoJSON. - -Options: - --help Show this message and exit. - -Commands: - active-fires The latest active fires - all-fires Fires year-to-date, both active and contained -``` - -From the shell: -``` -calfirewildfires all-fires -calfirewildfires active-fires -``` - -## Python usage -Import the library. -``` -import calfire_wildfires - -data = calfire_wildfires.get_all_fires() -data = calfire_wildfires.get_active_fires() -``` - -## Contributing -Install dependencies for development. -``` -pipenv install --dev -``` - -Run tests. -``` -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. -``` -pipenv run pip install --editable . -``` - -### Links +### Other resources * Docs: [palewi.re/docs/calfire-wildfires/](https://palewi.re/docs/calfire-wildfires/) * Issues: [github.com/datadesk/calfire-wildfires/issues](https://github.com/datadesk/calfire-wildfires/issues) diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css deleted file mode 100644 index b6b8bd0..0000000 --- a/docs/_static/css/custom.css +++ /dev/null @@ -1,234 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,400;0,700;0,800;1,400;1,800&display=swap'); - -div.document { - margin-top: 0; -} - -div.body { - min-width: 0 !important; -} - -div.body p, div.body li { - line-height: 1.45; -} - -div.body li { - margin-bottom: 4px; -} - -div.topic { - margin: 0; - padding: 8px 12px; -} - -p.topic-title { - margin: 0; -} - -div.topic ul { - margin-top: 6px; -} -@media screen and (max-width: 870px) { - ul { - margin: 10px 0 10px 20px; - } -} - -div.sphinxsidebar h1.logo, -div.sphinxsidebar h3 { - font-family: 'Libre Franklin', "Helvetica", "Liberation Sans", Arial, sans-serif; -} - -div.sphinxsidebarwrapper h1.logo { - font-size: 1.85em; - font-weight: 800; -} - -@media (min-width: 875px) { - div.sphinxsidebar { - margin-top: 85px; - } -} - -@media screen and (max-width: 875px) { - div.sphinxsidebar { - width: auto; - padding: 10px 20px; - margin: 50px 0 0 0; - } -} - -div.admonition { - padding: 15px; -} - -div.warning { - background-color: #EEE; - border: 1px solid #CCC; -} - -div.admonition p.admonition-title { - font-family: 'Libre Franklin', "Helvetica", "Liberation Sans", Arial, sans-serif; - margin: 0; -} - -div.related nav { - padding-right: 10px; -} - -body { - font-family: 'Libre Franklin', "Helvetica", "Liberation Sans", Arial, sans-serif; - font-size: 20px; - line-height: 1.45; - text-align: left; -} -@media screen and (max-width: 875px) { - body { - margin: 0; - padding: 0; - } - div.body > .section, - div.body > section { - padding: 0 20px; - } -} - -@media (max-width: 550px) { - body { - font-size: 0.85em; - } -} - -div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { - font-family: 'Libre Franklin', "Helvetica", "Liberation Sans", Arial, sans-serif; - font-weight: 700; -} - -div.body h1 { - font-weight: 800; - font-size: 220%; -} - -pre { - padding: 7px; -} - -.cell_output { - overflow: auto; -} - -.toctree-wrapper p.caption { - font-weight: 700; -} - -.toggle-details { - display: none; -} - -.row { - width: 100%; - max-width: 660px; - margin: 0 auto; - overflow: hidden; -} -.row .fivecol { - width: 43%; - float: right; - min-height: 1px; -} -.row .sevencol { - width: 37%; - float: left; - min-height: 1px; -} -@media (max-width: 550px) { - .row .fivecol, .row .sevencol { - padding: 0 20px; - } -} - -/* The header */ -nav { - display: block; - margin-top: 0.75em; - margin-bottom: 0.5em; - font-size: 1em; - line-height: 1.7em; -} -nav .shingle { - font-size: 1.7em; - font-weight: bold; - text-align: left; - padding-left: 0.15em; -} -nav .shingle a { - text-decoration: none; - font-weight: bold; - color: #000; -} -nav .shingle a:hover { - color: #686868; -} -@media (max-width: 550px) { - nav .shingle { - float: left; - margin-bottom: 5px; - padding-left: 0; - } -} -nav .links { - text-align: right; -} -nav .links ul { - float: right; - list-style-type: none; - margin: 4px 0 0 0; -} -nav .links li { - float: left; - list-style-position: inside; - margin-left: 0.5em; - font-size: 0.9em; - font-weight: 300; - margin-bottom: 0; -} -@media (max-width: 550px) { - nav .links li { - font-size: .825em; - } -} -nav .links li a { - text-decoration: none; -} -nav .links li a:hover { - text-decoration: underline; -} -.last { - margin-right: 0; -} - -.topbar { - border-bottom: solid 10px #e5e5e5; - margin-bottom: 20px; - width: 100%; -} - -a:link { - text-decoration: none; - color: #686868; -} -a:visited { - text-decoration: none; - color: #686868; -} -a:hover { - text-decoration: underline; -} -a:active { - text-decoration: underline; - color: #000; -} - -.contents ul p { - margin-bottom: 0; -} diff --git a/docs/_templates/nav.html b/docs/_templates/nav.html deleted file mode 100644 index cd40a0e..0000000 --- a/docs/_templates/nav.html +++ /dev/null @@ -1,49 +0,0 @@ - - - -
-
-
diff --git a/docs/conf.py b/docs/conf.py index 5e6f7c4..eac09c5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,43 +1,34 @@ """Configure Sphinx configuration.""" +from __future__ import annotations + import os import sys +from typing import Any from datetime import datetime # Insert the parent directory into the path sys.path.insert(0, os.path.abspath("..")) -extensions = [ - "myst_parser", -] -templates_path = ["_templates"] -source_suffix = ".rst" +source_suffix = ".md" master_doc = "index" project = "calfire-wildfires" year = datetime.now().year -copyright = f"{year} Ben Welsh" +copyright = f"{year} palewire" exclude_patterns = ["_build"] -html_theme = "alabaster" -html_sidebars = { - "**": [ - # "about.html", - # "navigation.html", - "relations.html", - "searchbox.html", - "donate.html", - ] -} -html_theme_options = { +html_theme = "palewire" +html_sidebars: dict[Any, Any] = {} +html_theme_options: dict[Any, Any] = { "canonical_url": f"https://palewi.re/docs/{project}/", - "show_powered_by": False, - "show_relbar_bottom": True, + "nosidebar": True, } -html_static_path = ["_static"] -html_css_files = [ - "css/custom.css", -] - pygments_style = "sphinx" + +extensions = [ + "myst_parser", + "sphinx.ext.autodoc", + "sphinx.ext.napoleon", +] diff --git a/docs/index.md b/docs/index.md index 2c52ee7..491e0b7 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,3 @@ -```{include} _templates/nav.html -``` - # calfire-wildfires Download wildfires data from CalFire @@ -72,7 +69,7 @@ The command-line interface is implemented using Click and setuptools. To install pipenv run pip install --editable . ``` -## Links +## Other resources * Docs: [palewi.re/docs/calfire-wildfires/](https://palewi.re/docs/calfire-wildfires/) * Issues: [github.com/datadesk/calfire-wildfires/issues](https://github.com/datadesk/calfire-wildfires/issues)