Home 00 Datalabs 01 Scooter Explorati... 02 211 Web Scraper 03 Nbdev Create Clea...04 Wordclouds 05 Amivi Meetup 06 Courts Mechanical... 07 Nb 2 Html Tests 08 Apis 09 Looking At Data

Don't Look! I'm changing!

URL Copied

Musical loops

BinderBinderBinderOpen Source Love svg3

NPM LicenseActiveGitHub last commit

GitHub starsGitHub watchersGitHub forksGitHub followers

TweetTwitter Follow

Creating the Notebook

First I created a template

Then I cloned it

! git clone https://github.com/bnia/VitalSigns.git /content/drive/My Drive/VitalSigns

Established some 1-time git hooks for frictionless commits into the future

00_core.ipynb docker-compose.yml index.ipynb MANIFEST.in settings.ini CONTRIBUTING.md docs/ LICENSE README.md setup.py

Then changed its Settings.ini file with my settings

Click to toggle#@title Example form fields #@markdown Forms support many types of fields. # Name of the project folder_name = "VitalSigns" #@param {type:"string"} company_name = "BNIA-JFI" #@param {type:"string"} # GitHub Username github_username = 'bniajfi' #@param {type:"string"} description = "Python Scripts for BNIA-JFI's Vital Signs Data" #@param {type:"string"} keywords = "Community Data" #@param {type:"string"} # Who are you? author = "Charles Karpati" #@param {type:"string"} author_email = 'charles.karpati@gmail.com' #@param {type:"string"} # Where are your notebooks? They are currently at the basepath. path_to_locate_notebooks = "." #@param {type:"string"} # Where should your documentation be put? {type:"string"} path_to_place_documentation = "docs" #@param {type:"string"} #@markdown --- user=github_username nbs_path=path_to_locate_notebooks doc_path=path_to_place_documentation lib_name=folder_name # Now let's rewrite the settings.ini file. innertext = """ [DEFAULT] # All sections below are required unless otherwise specified host = github lib_name = """+lib_name+""" company_name = """+company_name+""" user = """+user+""" description = """+description+""" keywords = """+keywords+""" author = """+author+""" author_email = """+author_email+""" copyright = MIT branch = master version = 0.0.1 min_python = 3.6 audience = Developers language = English # Set to True if you want to create a more fancy sidebar.json than the default custom_sidebar = False # Add licenses and see current list in `setup.py` license = apache2 # From 1-7: Planning Pre-Alpha Alpha Beta Production Mature Inactive status = 2 # Optional. Same format as setuptools requirements # requirements = # Optional. Same format as setuptools console_scripts # console_scripts = # Optional. Same format as setuptools dependency-links # dep_links = ### # You probably won't need to change anything under here, # unless you have some special requirements ### # Change to, e.g. "nbs", to put your notebooks in nbs dir instead of repo root nbs_path = """+nbs_path+""" doc_path = """+doc_path+""" # Whether to look for library notebooks recursively in the `nbs_path` dir recursive = False # Anything shown as '%(...)s' is substituted with that setting automatically doc_host = https://%(user)s.github.io #For Enterprise Git pages use: #doc_host = https://pages.github.%(company_name)s.com. doc_baseurl = /%(lib_name)s/ # For Enterprise Github pages docs use: # doc_baseurl = /%(repo_name)s/%(lib_name)s/ git_url = https://github.com/%(user)s/%(lib_name)s/tree/%(branch)s/ # For Enterprise Github use: #git_url = https://github.%(company_name)s.com/%(repo_name)s/%(lib_name)s/tree/%(branch)s/ lib_path = %(lib_name)s title = %(lib_name)s #Optional advanced parameters #Monospace docstings: adds
 tags around the doc strings, preserving newlines/indentation.
 #monospace_docstrings = False
 #Test flags: introduce here the test flags you want to use separated by |
 #tst_flags = 
 #Custom sidebar: customize sidebar.json yourself for advanced sidebars (False/True)
 #custom_sidebar = 
 #Cell spacing: if you want cell blocks in code separated by more than one new line
 #cell_spacing = 
 #Custom jekyll styles: if you want more jekyll styles than tip/important/warning, set them here
 #jekyll_styles = note,warning,tip,important
 """
 
 # Write-Overwrites 
 file1 = open("settings.ini", "w")  # write mode 
 file1.write(innertext) 
 file1.close() 

And then were set to test publish

!nbdev_build_lib Converted 00_core.ipynb. Converted index.ipynb. 00_core.ipynb docs/ Makefile README.md VitalSigns/ CONTRIBUTING.md index.ipynb MANIFEST.in settings.ini docker-compose.yml LICENSE notebooks/ setup.py # ! nbdev_build_lib --fname RBIntel.ipynb from VitalSigns.core import * 'hi hi '

Managing it

# https://karpatic.github.io/datalabs/nbdev/ %cd /content/drive/My Drive/'Software Development Documents'/ %ls # this will reload imported modules whenever the .py file changes. # whenever the .py file changes via nbdev_build_lib or _update_lib. %load_ext autoreload %autoreload 2 /content/drive/My Drive/Software Development Documents 0000_READ.ME.gdoc DevelopersDocumentation/ 'Site - Project_VItal'/ dataguide/ 'Site - BPM'/ temp_misc/ datalabs/ 'Site - DLLR'/ VitalSigns/ dataplay/ 'Site - Green Patterns'/ # https://nbdev.fast.ai/tutorial.html#Add-in-notebook-export-cell # https://nbdev.fast.ai/sync#nbdev_update_lib # first. builds the .py files from from .ipynbs !nbdev_build_lib # --fname filename.ipynb # second. Push .pu changes back to their original .ipynbs !nbdev_update_lib # sometimes. Update .ipynb import statements if the .py filename.classname changes. !relimport2name # nbdev_build_docs builds the documentation from the notebooks !nbdev_build_docs --force_all True --mk_readme True ! git add * ! git config --global user.name "karpatic" ! git config --global user.email "charles.karpati@gmail.com" ! git commit -m "Collapse Experiments P2" # git push -f origin master ! git push -u ORIGIN main # ! pip install twine # ! nbdev_bump_version # ! make pypi