from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github('https://github.com/dsbowen/docstr-md/blob/master') soup = PySoup(path='test.py', parser='sklearn', src_href=src_href) compile_md(soup, compiler='sklearn', outfile='docs_md/test.md')
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github('https://github.com/dsbowen/hemlock-berlin/blob/master') path = 'hemlock_berlin/__init__.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) compile_md(soup, compiler='sklearn', outfile='docs_md/api.md')
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github('https://github.com/dsbowen/sqlalchemy-nav/blob/master') path = 'sqlalchemy_nav/__init__.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.rm_properties() for obj in soup.objects: if hasattr(obj, 'name'): if obj.name == 'NavbarMixin': obj.rm_methods('navitems') elif obj.name == 'NavitemMixin': obj.rm_methods('dropdownitems') compile_md(soup, compiler='sklearn', outfile='docs_md/api.md')
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github('https://github.com/dsbowen/docstr-md/blob/master') path = 'docstr_md/python/__init__.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.rm_properties() compile_md(soup, compiler='sklearn', outfile='docs_md/python/basic_use.md') path = 'docstr_md/src_href/github.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.objects.insert(0, '#Linking to source code') compile_md(soup, compiler='sklearn', outfile='docs_md/src_href.md') path = 'docstr_md/python/soup_objects.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.keep_objects('Expr', 'FunctionDef', 'ClassDef') soup.rm_properties() soup.import_path = 'docstr_md/python' compile_md(soup, compiler='sklearn', outfile='docs_md/python/soup_objects.md') path = 'docstr_md/python/parsers/sklearn.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.import_path = 'docstr_md/python/parsers' soup.objects.insert(0, '#Parsers') compile_md(soup, compiler='sklearn', outfile='docs_md/python/parsers.md') path = 'docstr_md/python/compilers/sklearn.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.import_path = 'docstr_md/python/compilers'
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github('https://github.com/dsbowen/sqlalchemy-mutable/blob/master') path = 'sqlalchemy_mutable/mutable.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.rm_properties() mutable = [ obj for obj in soup.objects if hasattr(obj, 'name') and obj.name == 'Mutable' ][0] mutable.methods = [m for m in mutable.methods if m.name != 'coerce'] soup.import_path = 'sqlalchemy_mutable' compile_md(soup, compiler='sklearn', outfile='docs_md/basic.md') path = 'sqlalchemy_mutable/coerced_types.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.objects = soup.objects[0:1] compile_md(soup, compiler='sklearn', outfile='docs_md/coerced_types.md') path = 'sqlalchemy_mutable/model_shell.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) compile_md(soup, compiler='sklearn', outfile='docs_md/model_shell.md') path = 'sqlalchemy_mutable/mutable_list.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) for obj in soup.objects: if hasattr(obj, 'name'): if obj.name == 'MutableListType': obj.methods.clear()
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github( 'https://github.com/dsbowen/hemlock-demographics/blob/master') path = 'hemlock_demographics/__init__.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.keep_objects('demographics', 'comprehensive_demographics', 'basic_demographics', 'family_demographics', 'country_demographics', 'status_demographics', 'register') compile_md(soup, compiler='sklearn', outfile='docs_md/api.md')
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github('https://github.com/dsbowen/gshap/blob/master') soup = PySoup(path='gshap/__init__.py', parser='sklearn', src_href=src_href) soup.rm_properties() compile_md(soup, compiler='sklearn', outfile='docs_md/kernel_explainer.md') g_functions = ('hypothesis', 'intergroup', 'probability_distance') for g in g_functions: soup = PySoup(path='gshap/{}.py'.format(g), parser='sklearn', src_href=src_href) compile_md(soup, compiler='sklearn', outfile='docs_md/{}.md'.format(g)) soup = PySoup(path='gshap/datasets/__init__.py', parser='sklearn', src_href=src_href) compile_md(soup, compiler='sklearn', outfile='docs_md/datasets.md')
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github import os src_href = Github('https://github.com/dsbowen/smoother/blob/master') path = 'smoother/smoother.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.import_path = 'smoother' soup.rm_properties() compile_md(soup, compiler='sklearn', outfile='docs_md/smoother.md') path = 'smoother/max_entropy.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.import_path = 'smoother' soup.rm_properties compile_md(soup, compiler='sklearn', outfile='docs_md/max_entropy.md') path = 'smoother/utils.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.import_path = 'smoother' compile_md(soup, compiler='sklearn', outfile='docs_md/utils.md')
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github('https://github.com/dsbowen/selenium-tools/blob/master') path = 'selenium_tools/__init__.py' soup = PySoup(path=path, src_href=src_href) compile_md(soup, outfile='docs_md/api.md')
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github import os src_href = Github('https://github.com/dsbowen/dash-fcast/blob/master') path = 'dash_fcast/table.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.import_path = 'dash_fcast' table_cls = soup.objects[-1] table_cls.rm_methods('to_plotly_json') compile_md(soup, compiler='sklearn', outfile='docs_md/table.md') dist_path = 'dash_fcast/distributions' outfile_path = 'docs_md/distributions' path = os.path.join(dist_path, '__init__.py') soup = PySoup(path=path, parser='sklearn', src_href=src_href) outfile = os.path.join(outfile_path, 'utils.md') compile_md(soup, compiler='sklearn', outfile=outfile) dist_files = ('moments', 'table') for f in dist_files: path = os.path.join(dist_path, f + '.py') soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.import_path = dist_path for obj in soup.objects: try: obj.rm_methods('to_plotly_json')
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github('https://github.com/dsbowen/hemlock-crt/blob/master') path = 'hemlock_crt/__init__.py' soup = PySoup(path=path, src_href=src_href) soup.keep_objects('crt', 'register') compile_md(soup, outfile='docs_md/api.md')
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github('https://github.com/dsbowen/hemlock-big5/blob/master') soup = PySoup(path='hemlock_big5/__init__.py', parser='sklearn', src_href=src_href) compile_md(soup, compiler='sklearn', outfile='docs_md/api.md')
from docstr_md.python import PySoup, compile_md from docstr_md.src_href import Github src_href = Github('https://github.com/dsbowen/flask-download-btn/blob/master') path = 'flask_download_btn/__init__.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) compile_md(soup, compiler='sklearn', outfile='docs_md/manager.md') path = 'flask_download_btn/download_btn_mixin.py' soup = PySoup(path=path, parser='sklearn', src_href=src_href) soup.rm_properties() soup.objects[-1].rm_methods('handle_form_functions', 'create_file_functions') soup.import_path = 'flask_download_btn' compile_md(soup, compiler='sklearn', outfile='docs_md/download_btn_mixin.md')