Skip to content

Commit

Permalink
After running nbdev_new
Browse files Browse the repository at this point in the history
  • Loading branch information
tylere committed Dec 11, 2023
1 parent 0c84d5e commit 12da186
Show file tree
Hide file tree
Showing 17 changed files with 407 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -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]
7 changes: 7 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -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]
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# pixi environments
.pixi

/.quarto/
61 changes: 61 additions & 0 deletions 00_core.ipynb
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 5 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include settings.ini
include LICENSE
include CONTRIBUTING.md
include README.md
recursive-exclude * __pycache__
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# sar-asf-to-gee

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

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
8 changes: 8 additions & 0 deletions _docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Redirect to 00_core.html</title>
<meta http-equiv="refresh" content="0;URL='00_core.html'" />
</head>
<body>
</body>
</html>
1 change: 1 addition & 0 deletions _docs/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sitemap: https://gee-community.github.io/sar-asf-to-gee/sitemap.xml
3 changes: 3 additions & 0 deletions _docs/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
</urlset>
37 changes: 37 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -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
96 changes: 96 additions & 0 deletions index.ipynb
Original file line number Diff line number Diff line change
@@ -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
}
1 change: 1 addition & 0 deletions sar_asf_to_gee/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.1"
8 changes: 8 additions & 0 deletions sar_asf_to_gee/_modidx.py
Original file line number Diff line number Diff line change
@@ -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')}}}
7 changes: 7 additions & 0 deletions sar_asf_to_gee/core.py
Original file line number Diff line number Diff line change
@@ -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
41 changes: 41 additions & 0 deletions settings.ini
Original file line number Diff line number Diff line change
@@ -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 =
57 changes: 57 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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)


Loading

0 comments on commit 12da186

Please sign in to comment.