Browse Source

prog

master
Florian Boergel 3 years ago
parent
commit
3e0e00b29e
  1. 29
      00_core.ipynb
  2. 37
      Makefile
  3. 24
      README.md
  4. 63
      docs/_config.yml
  5. 22
      docs/_data/sidebars/home_sidebar.yml
  6. 10
      docs/_data/topnav.yml
  7. 99
      docs/core.html
  8. 100
      docs/index.html
  9. 10
      docs/sidebar.json
  10. 1
      drcstools/__init__.py
  11. 13
      drcstools/_nbdev.py
  12. 8
      drcstools/core.py
  13. 8
      index.ipynb
  14. 12
      settings.ini

29
00_core.ipynb

@ -13,7 +13,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# module name here\n",
"# drcstools\n",
"\n",
"> API details."
]
@ -33,7 +33,32 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"#export\n",
"def say_hello(to):\n",
" \"Say hello to somebody\"\n",
" return f'Hello {to}!'"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Hello Sylvain!'"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"say_hello(\"Sylvain\")"
]
}
],
"metadata": {

37
Makefile

@ -0,0 +1,37 @@
.ONESHELL:
SHELL := /bin/bash
SRC = $(wildcard ./*.ipynb)
all: drcstools docs
drcstools: $(SRC)
nbdev_build_lib
touch drcstools
sync:
nbdev_update_lib
docs_serve: docs
cd docs && bundle exec jekyll serve
docs: $(SRC)
nbdev_build_docs
touch docs
test:
nbdev_test_nbs
release: pypi conda_release
nbdev_bump_version
conda_release:
fastrelease_conda_package
pypi: dist
twine upload --repository pypi dist/*
dist: clean
python setup.py sdist bdist_wheel
clean:
rm -rf dist

24
README.md

@ -1,4 +1,24 @@
# nbdev template
# Dynamics of Regional Climate Systems (DRCS) - Tools
> For data analysis
This file will become your README and also the index of your documentation.
## Install
`pip install drcstools`
## How to use
Fill me in please! Don't forget code examples:
```python
1+1
```
2
Use this template to more easily create your nbdev project.

63
docs/_config.yml

@ -0,0 +1,63 @@
repository: florianboergel/drcstools
output: web
topnav_title: drcstools
site_title: drcstools
company_name: Florian Boergel
description: Tools for climate analysis
# Set to false to disable KaTeX math
use_math: true
# Add Google analytics id if you have one and want to use it here
google_analytics:
# See http://nbdev.fast.ai/search for help with adding Search
google_search:
host: 127.0.0.1
# the preview server used. Leave as is.
port: 4000
# the port where the preview is rendered.
exclude:
- .idea/
- .gitignore
- vendor
exclude: [vendor]
highlighter: rouge
markdown: kramdown
kramdown:
input: GFM
auto_ids: true
hard_wrap: false
syntax_highlighter: rouge
collections:
tooltips:
output: false
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "page"
comments: true
search: true
sidebar: home_sidebar
topnav: topnav
-
scope:
path: ""
type: "tooltips"
values:
layout: "page"
comments: true
search: true
tooltip: true
sidebars:
- home_sidebar
theme: jekyll-theme-cayman
baseurl: /drcstools/

22
docs/_data/sidebars/home_sidebar.yml

@ -7,24 +7,12 @@ entries:
- folders:
- folderitems:
- output: web,pdf
title: Export to modules
url: /export.html
title: Overview
url: /
- output: web,pdf
title: Convert to html
url: /export2html.html
- output: web,pdf
title: Show doc
url: /showdoc.html
- output: web,pdf
title: Test functions
url: /test.html
- output: web,pdf
title: Core functions
url: /core.html
- output: web,pdf
title: Command line functions
url: /cli.html
title: drcstools
url: core.html
output: web
title: Notebook
title: drcstools
output: web
title: Sidebar

10
docs/_data/topnav.yml

@ -0,0 +1,10 @@
topnav:
- title: Topnav
items:
- title: github
external_url: https://github.com/florianboergel/drcstools/tree/master/
#Topnav dropdowns
topnav_dropdowns:
- title: Topnav dropdowns
folders:

99
docs/core.html

@ -0,0 +1,99 @@
---
title: drcstools
keywords: fastai
sidebar: home_sidebar
summary: "API details."
description: "API details."
nb_path: "00_core.ipynb"
---
<!--
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: 00_core.ipynb
# command to build the docs after a change: nbdev_build_docs
-->
<div class="container" id="notebook-container">
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
</div>
{% endraw %}
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="say_hello" class="doc_header"><code>say_hello</code><a href="https://github.com/florianboergel/drcstools/tree/master/drcstools/core.py#L6" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>say_hello</code>(<strong><code>to</code></strong>)</p>
</blockquote>
<p>Say hello to somebody</p>
</div>
</div>
</div>
</div>
</div>
{% endraw %}
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
</div>
{% endraw %}
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">say_hello</span><span class="p">(</span><span class="s2">&quot;Sylvain&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_text output_subarea output_execute_result">
<pre>&#39;Hello Sylvain!&#39;</pre>
</div>
</div>
</div>
</div>
</div>
{% endraw %}
</div>

100
docs/index.html

@ -0,0 +1,100 @@
---
title: Dynamics of Regional Climate Systems (DRCS) - Tools
keywords: fastai
sidebar: home_sidebar
summary: "For data analysis"
description: "For data analysis"
nb_path: "index.ipynb"
---
<!--
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: index.ipynb
# command to build the docs after a change: nbdev_build_docs
-->
<div class="container" id="notebook-container">
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
</div>
{% endraw %}
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>This file will become your README and also the index of your documentation.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Install">Install<a class="anchor-link" href="#Install"> </a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p><code>pip install drcstools</code></p>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="How-to-use">How to use<a class="anchor-link" href="#How-to-use"> </a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Fill me in please! Don't forget code examples:</p>
</div>
</div>
</div>
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="mi">1</span><span class="o">+</span><span class="mi">1</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_text output_subarea output_execute_result">
<pre>2</pre>
</div>
</div>
</div>
</div>
</div>
{% endraw %}
</div>

10
docs/sidebar.json

@ -1,10 +1,6 @@
{
"Notebook": {
"Export to modules": "/export",
"Convert to html": "/export2html",
"Show doc": "/showdoc",
"Test functions": "/test",
"Core functions": "/core",
"Command line functions": "/cli"
"drcstools": {
"Overview": "/",
"drcstools": "core.html"
}
}

1
drcstools/__init__.py

@ -0,0 +1 @@
__version__ = "0.0.1"

13
drcstools/_nbdev.py

@ -0,0 +1,13 @@
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"say_hello": "00_core.ipynb"}
modules = ["core.py"]
doc_url = "https://florianboergel.github.io/drcstools/"
git_url = "https://github.com/florianboergel/drcstools/tree/master/"
def custom_doc_links(name): return None

8
drcstools/core.py

@ -0,0 +1,8 @@
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_core.ipynb (unless otherwise specified).
__all__ = ['say_hello']
# Cell
def say_hello(to):
"Say hello to somebody"
return f'Hello {to}!'

8
index.ipynb

@ -7,16 +7,16 @@
"outputs": [],
"source": [
"#hide\n",
"from your_lib.core import *"
"from drcstools.core import *"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Project name here\n",
"# Dynamics of Regional Climate Systems (DRCS) - Tools\n",
"\n",
"> Summary description here."
"> For data analysis"
]
},
{
@ -37,7 +37,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"`pip install your_project_name`"
"`pip install drcstools`"
]
},
{

12
settings.ini

@ -1,17 +1,17 @@
[DEFAULT]
# All sections below are required unless otherwise specified
host = github
lib_name = nbdev_template
lib_name = drcstools
# For Enterprise Git add variable repo_name and company name
# repo_name = analytics
# company_name = nike
user = fastai
# description = A description of your project
user = florianboergel
description = Tools for climate analysis
# keywords = some keywords
# author = Your Name
# author_email = email@example.com
# copyright = Your Name or Company Name
author = Florian Boergel
author_email = florianboergel@gmail.com
copyright = Florian Boergel
branch = master
version = 0.0.1
min_python = 3.6

Loading…
Cancel
Save