diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..29bfc57 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,14 @@ +name: Deploy to GitHub Pages + +permissions: + contents: write + pages: write + +on: + push: + branches: [ "main", "master" ] + workflow_dispatch: +jobs: + deploy: + runs-on: ubuntu-latest + steps: [uses: fastai/workflows/quarto-ghp@master] diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..5608592 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,7 @@ +name: CI +on: [workflow_dispatch, pull_request, push] + +jobs: + test: + runs-on: ubuntu-latest + steps: [uses: fastai/workflows/nbdev-ci@master] diff --git a/.gitignore b/.gitignore index c9314b7..d3d7c57 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ # pixi environments .pixi + +/.quarto/ diff --git a/00_core.ipynb b/00_core.ipynb new file mode 100644 index 0000000..6671b71 --- /dev/null +++ b/00_core.ipynb @@ -0,0 +1,61 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# core\n", + "\n", + "> Fill in a module description here" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#| default_exp core" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#| hide\n", + "from nbdev.showdoc import *" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#| export\n", + "def foo(): pass" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#| hide\n", + "import nbdev; nbdev.nbdev_export()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "python3", + "language": "python", + "name": "python3" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..5c0e7ce --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,5 @@ +include settings.ini +include LICENSE +include CONTRIBUTING.md +include README.md +recursive-exclude * __pycache__ diff --git a/README.md b/README.md new file mode 100644 index 0000000..38f7024 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# sar-asf-to-gee + + + +This file will become your README and also the index of your +documentation. + +## Install + +``` sh +pip install sar_asf_to_gee +``` + +## How to use + +Fill me in please! Don’t forget code examples: + +``` python +1+1 +``` + + 2 diff --git a/_docs/index.html b/_docs/index.html new file mode 100644 index 0000000..c9eed17 --- /dev/null +++ b/_docs/index.html @@ -0,0 +1,8 @@ + + + Redirect to 00_core.html + + + + + diff --git a/_docs/robots.txt b/_docs/robots.txt new file mode 100644 index 0000000..826f1ce --- /dev/null +++ b/_docs/robots.txt @@ -0,0 +1 @@ +Sitemap: https://gee-community.github.io/sar-asf-to-gee/sitemap.xml diff --git a/_docs/sitemap.xml b/_docs/sitemap.xml new file mode 100644 index 0000000..7962ef4 --- /dev/null +++ b/_docs/sitemap.xml @@ -0,0 +1,3 @@ + + + diff --git a/_quarto.yml b/_quarto.yml new file mode 100644 index 0000000..95fc7a2 --- /dev/null +++ b/_quarto.yml @@ -0,0 +1,37 @@ +ipynb-filters: [nbdev_filter] + +project: + type: website + output-dir: _docs + preview: + port: 3000 + browser: false + +format: + html: + theme: cosmo + css: styles.css + toc: true + toc-depth: 4 + +website: + title: "sar-asf-to-gee" + site-url: "https://gee-community.github.io/sar-asf-to-gee" + description: "Facilitates transferring on-demand SAR products processed by ASF's HyP3 to Google Earth Engine." + twitter-card: true + open-graph: true + repo-branch: master + repo-url: "https://github.com/gee-community/sar-asf-to-gee" + repo-actions: [issue] + navbar: + background: primary + search: true + right: + - icon: github + href: "https://github.com/gee-community/sar-asf-to-gee" + sidebar: + style: "floating" + +metadata-files: + - sidebar.yml + - custom.yml diff --git a/index.ipynb b/index.ipynb new file mode 100644 index 0000000..44f8daa --- /dev/null +++ b/index.ipynb @@ -0,0 +1,96 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#| hide\n", + "from sar_asf_to_gee.core import *" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# sar-asf-to-gee\n", + "\n", + "> Facilitates transferring on-demand SAR products processed by ASF's HyP3 to Google Earth Engine." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This file will become your README and also the index of your documentation." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Install" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "```sh\n", + "pip install sar_asf_to_gee\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## How to use" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Fill me in please! Don't forget code examples:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2" + ] + }, + "execution_count": null, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "1+1" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "python3", + "language": "python", + "name": "python3" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/sar_asf_to_gee/__init__.py b/sar_asf_to_gee/__init__.py new file mode 100644 index 0000000..f102a9c --- /dev/null +++ b/sar_asf_to_gee/__init__.py @@ -0,0 +1 @@ +__version__ = "0.0.1" diff --git a/sar_asf_to_gee/_modidx.py b/sar_asf_to_gee/_modidx.py new file mode 100644 index 0000000..09e6ba7 --- /dev/null +++ b/sar_asf_to_gee/_modidx.py @@ -0,0 +1,8 @@ +# Autogenerated by nbdev + +d = { 'settings': { 'branch': 'master', + 'doc_baseurl': '/sar-asf-to-gee', + 'doc_host': 'https://gee-community.github.io', + 'git_url': 'https://github.com/gee-community/sar-asf-to-gee', + 'lib_path': 'sar_asf_to_gee'}, + 'syms': {'sar_asf_to_gee.core': {'sar_asf_to_gee.core.foo': ('core.html#foo', 'sar_asf_to_gee/core.py')}}} \ No newline at end of file diff --git a/sar_asf_to_gee/core.py b/sar_asf_to_gee/core.py new file mode 100644 index 0000000..a909a06 --- /dev/null +++ b/sar_asf_to_gee/core.py @@ -0,0 +1,7 @@ +# AUTOGENERATED! DO NOT EDIT! File to edit: ../00_core.ipynb. + +# %% auto 0 +__all__ = ['foo'] + +# %% ../00_core.ipynb 3 +def foo(): pass diff --git a/settings.ini b/settings.ini new file mode 100644 index 0000000..75cd37e --- /dev/null +++ b/settings.ini @@ -0,0 +1,41 @@ +[DEFAULT] +# All sections below are required unless otherwise specified. +# See https://github.com/fastai/nbdev/blob/master/settings.ini for examples. + +### Python library ### +repo = sar-asf-to-gee +lib_name = %(repo)s +version = 0.0.1 +min_python = 3.11 +license = apache2 + +### nbdev ### +doc_path = _docs +lib_path = sar_asf_to_gee +nbs_path = . +recursive = False +tst_flags = notest + +### Docs ### +branch = master +custom_sidebar = False +doc_host = https://%(user)s.github.io +doc_baseurl = /%(repo)s +git_url = https://github.com/%(user)s/%(repo)s +title = %(lib_name)s + +### PyPI ### +audience = Developers +author = Tyler Erickson +author_email = tyler@vorgeo.com +copyright = 2023 ownwards, %(author)s +description = Facilitates transferring on-demand SAR products processed by ASF's HyP3 to Google Earth Engine. +keywords = nbdev jupyter notebook python +language = English +status = 3 +user = gee-community + +### Optional ### +# requirements = fastcore pandas +# dev_requirements = +# console_scripts = \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e3281ae --- /dev/null +++ b/setup.py @@ -0,0 +1,57 @@ +from pkg_resources import parse_version +from configparser import ConfigParser +import setuptools, shlex +assert parse_version(setuptools.__version__)>=parse_version('36.2') + +# note: all settings are in settings.ini; edit there, not here +config = ConfigParser(delimiters=['=']) +config.read('settings.ini', encoding='utf-8') +cfg = config['DEFAULT'] + +cfg_keys = 'version description keywords author author_email'.split() +expected = cfg_keys + "lib_name user branch license status min_python audience language".split() +for o in expected: assert o in cfg, "missing expected setting: {}".format(o) +setup_cfg = {o:cfg[o] for o in cfg_keys} + +licenses = { + 'apache2': ('Apache Software License 2.0','OSI Approved :: Apache Software License'), + 'mit': ('MIT License', 'OSI Approved :: MIT License'), + 'gpl2': ('GNU General Public License v2', 'OSI Approved :: GNU General Public License v2 (GPLv2)'), + 'gpl3': ('GNU General Public License v3', 'OSI Approved :: GNU General Public License v3 (GPLv3)'), + 'bsd3': ('BSD License', 'OSI Approved :: BSD License'), +} +statuses = [ '1 - Planning', '2 - Pre-Alpha', '3 - Alpha', + '4 - Beta', '5 - Production/Stable', '6 - Mature', '7 - Inactive' ] +py_versions = '3.6 3.7 3.8 3.9 3.10'.split() + +requirements = shlex.split(cfg.get('requirements', '')) +if cfg.get('pip_requirements'): requirements += shlex.split(cfg.get('pip_requirements', '')) +min_python = cfg['min_python'] +lic = licenses.get(cfg['license'].lower(), (cfg['license'], None)) +dev_requirements = (cfg.get('dev_requirements') or '').split() + +setuptools.setup( + name = cfg['lib_name'], + license = lic[0], + classifiers = [ + 'Development Status :: ' + statuses[int(cfg['status'])], + 'Intended Audience :: ' + cfg['audience'].title(), + 'Natural Language :: ' + cfg['language'].title(), + ] + ['Programming Language :: Python :: '+o for o in py_versions[py_versions.index(min_python):]] + (['License :: ' + lic[1] ] if lic[1] else []), + url = cfg['git_url'], + packages = setuptools.find_packages(), + include_package_data = True, + install_requires = requirements, + extras_require={ 'dev': dev_requirements }, + dependency_links = cfg.get('dep_links','').split(), + python_requires = '>=' + cfg['min_python'], + long_description = open('README.md', encoding='utf-8').read(), + long_description_content_type = 'text/markdown', + zip_safe = False, + entry_points = { + 'console_scripts': cfg.get('console_scripts','').split(), + 'nbdev': [f'{cfg.get("lib_path")}={cfg.get("lib_path")}._modidx:d'] + }, + **setup_cfg) + + diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..66ccc49 --- /dev/null +++ b/styles.css @@ -0,0 +1,37 @@ +.cell { + margin-bottom: 1rem; +} + +.cell > .sourceCode { + margin-bottom: 0; +} + +.cell-output > pre { + margin-bottom: 0; +} + +.cell-output > pre, .cell-output > .sourceCode > pre, .cell-output-stdout > pre { + margin-left: 0.8rem; + margin-top: 0; + background: none; + border-left: 2px solid lightsalmon; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.cell-output > .sourceCode { + border: none; +} + +.cell-output > .sourceCode { + background: none; + margin-top: 0; +} + +div.description { + padding-left: 2px; + padding-top: 5px; + font-style: italic; + font-size: 135%; + opacity: 70%; +}