Skip to content

Commit

Permalink
Deploying to gh-pages from @ 5cd7863 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Dec 2, 2023
1 parent 9d58320 commit ee2eb6a
Show file tree
Hide file tree
Showing 36 changed files with 733 additions and 14,731 deletions.
690 changes: 0 additions & 690 deletions _modules/airflow_dbt_python/hooks/dbt.html

This file was deleted.

70 changes: 46 additions & 24 deletions _modules/airflow_dbt_python/hooks/localfs.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>airflow_dbt_python.hooks.localfs &mdash; airflow-dbt-python 1.0.5 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/copybutton.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/hack-font/3.3.0/web/hack.min.css" type="text/css" />
<title>airflow_dbt_python.hooks.localfs &mdash; airflow-dbt-python 2.0.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../../_static/graphviz.css?v=eafc0fe6" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/hack-font/3.3.0/web/hack.min.css" />


<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/sphinx_highlight.js"></script>
<script src="../../../_static/clipboard.min.js"></script>
<script src="../../../_static/copybutton.js"></script>
<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=51b770b3"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../../../_static/copybutton.js?v=f281be69"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
Expand All @@ -38,7 +39,7 @@
airflow-dbt-python
</a>
<div class="version">
1.0.5
2.0.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
Expand Down Expand Up @@ -101,7 +102,9 @@ <h1>Source code for airflow_dbt_python.hooks.localfs</h1><div class="highlight">
<span class="kn">from</span> <span class="nn">airflow_dbt_python.utils.url</span> <span class="kn">import</span> <span class="n">URL</span>


<div class="viewcode-block" id="DbtLocalFsRemoteHook"><a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook">[docs]</a><span class="k">class</span> <span class="nc">DbtLocalFsRemoteHook</span><span class="p">(</span><span class="n">FSHook</span><span class="p">,</span> <span class="n">DbtRemoteHook</span><span class="p">):</span>
<div class="viewcode-block" id="DbtLocalFsRemoteHook">
<a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook">[docs]</a>
<span class="k">class</span> <span class="nc">DbtLocalFsRemoteHook</span><span class="p">(</span><span class="n">FSHook</span><span class="p">,</span> <span class="n">DbtRemoteHook</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;A concrete dbt remote for a local filesystem.</span>

<span class="sd"> This remote is intended to be used when running Airflow with a LocalExecutor, and</span>
Expand All @@ -123,7 +126,9 @@ <h1>Source code for airflow_dbt_python.hooks.localfs</h1><div class="highlight">
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">fs_conn_id</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fs_conn_id</span> <span class="o">=</span> <span class="n">fs_conn_id</span>

<div class="viewcode-block" id="DbtLocalFsRemoteHook.get_url"><a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook.get_url">[docs]</a> <span class="k">def</span> <span class="nf">get_url</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">url</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">URL</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">URL</span><span class="p">:</span>
<div class="viewcode-block" id="DbtLocalFsRemoteHook.get_url">
<a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook.get_url">[docs]</a>
<span class="k">def</span> <span class="nf">get_url</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">url</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">URL</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">URL</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Return an url relative to this hook&#39;s basepath.</span>

<span class="sd"> If the given url is absolute, simply return the url. If it&#39;s none,</span>
Expand All @@ -137,7 +142,10 @@ <h1>Source code for airflow_dbt_python.hooks.localfs</h1><div class="highlight">

<span class="k">return</span> <span class="n">URL</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">basepath</span><span class="p">)</span> <span class="o">/</span> <span class="n">url</span></div>

<div class="viewcode-block" id="DbtLocalFsRemoteHook.download"><a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook.download">[docs]</a> <span class="k">def</span> <span class="nf">download</span><span class="p">(</span>

<div class="viewcode-block" id="DbtLocalFsRemoteHook.download">
<a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook.download">[docs]</a>
<span class="k">def</span> <span class="nf">download</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">source</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span>
<span class="n">destination</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span>
Expand All @@ -155,7 +163,10 @@ <h1>Source code for airflow_dbt_python.hooks.localfs</h1><div class="highlight">
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">copy_one</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">destination</span><span class="p">,</span> <span class="n">replace</span><span class="p">)</span></div>

<div class="viewcode-block" id="DbtLocalFsRemoteHook.upload"><a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook.upload">[docs]</a> <span class="k">def</span> <span class="nf">upload</span><span class="p">(</span>

<div class="viewcode-block" id="DbtLocalFsRemoteHook.upload">
<a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook.upload">[docs]</a>
<span class="k">def</span> <span class="nf">upload</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">source</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span>
<span class="n">destination</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span>
Expand All @@ -173,7 +184,10 @@ <h1>Source code for airflow_dbt_python.hooks.localfs</h1><div class="highlight">
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">copy_one</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">destination</span><span class="p">,</span> <span class="n">replace</span><span class="p">)</span></div>

<div class="viewcode-block" id="DbtLocalFsRemoteHook.copy_one"><a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook.copy_one">[docs]</a> <span class="k">def</span> <span class="nf">copy_one</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">source</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span> <span class="n">destination</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span> <span class="n">replace</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>

<div class="viewcode-block" id="DbtLocalFsRemoteHook.copy_one">
<a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook.copy_one">[docs]</a>
<span class="k">def</span> <span class="nf">copy_one</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">source</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span> <span class="n">destination</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span> <span class="n">replace</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Pull many files from local path.</span>

<span class="sd"> If the file already exists, it will be ignored if replace is False (the</span>
Expand All @@ -188,7 +202,10 @@ <h1>Source code for airflow_dbt_python.hooks.localfs</h1><div class="highlight">
<span class="k">return</span>
<span class="n">shutil</span><span class="o">.</span><span class="n">copy</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">destination</span><span class="p">)</span></div>

<div class="viewcode-block" id="DbtLocalFsRemoteHook.copy"><a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook.copy">[docs]</a> <span class="k">def</span> <span class="nf">copy</span><span class="p">(</span>

<div class="viewcode-block" id="DbtLocalFsRemoteHook.copy">
<a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.DbtLocalFsRemoteHook.copy">[docs]</a>
<span class="k">def</span> <span class="nf">copy</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">source</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span>
<span class="n">destination</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span>
Expand Down Expand Up @@ -216,10 +233,14 @@ <h1>Source code for airflow_dbt_python.hooks.localfs</h1><div class="highlight">
<span class="k">else</span><span class="p">:</span>
<span class="n">shutil</span><span class="o">.</span><span class="n">copytree</span><span class="p">(</span> <span class="c1"># type: ignore</span>
<span class="n">source</span><span class="p">,</span> <span class="n">destination</span><span class="p">,</span> <span class="n">copy_function</span><span class="o">=</span><span class="n">copy_function</span><span class="p">,</span> <span class="n">dirs_exist_ok</span><span class="o">=</span><span class="kc">True</span>
<span class="p">)</span></div></div>
<span class="p">)</span></div>
</div>


<div class="viewcode-block" id="py37_copytree"><a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.py37_copytree">[docs]</a><span class="k">def</span> <span class="nf">py37_copytree</span><span class="p">(</span><span class="n">source</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span> <span class="n">destination</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span> <span class="n">replace</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>

<div class="viewcode-block" id="py37_copytree">
<a class="viewcode-back" href="../../../reference/hooks.html#airflow_dbt_python.hooks.localfs.py37_copytree">[docs]</a>
<span class="k">def</span> <span class="nf">py37_copytree</span><span class="p">(</span><span class="n">source</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span> <span class="n">destination</span><span class="p">:</span> <span class="n">URL</span><span class="p">,</span> <span class="n">replace</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;A (probably) poor attempt at replicating shutil.copytree for Python 3.7.</span>

<span class="sd"> shutil.copytree is available in Python 3.7, however it doesn&#39;t have the</span>
Expand All @@ -241,6 +262,7 @@ <h1>Source code for airflow_dbt_python.hooks.localfs</h1><div class="highlight">
<span class="n">shutil</span><span class="o">.</span><span class="n">copy</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="n">target_url</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">shutil</span><span class="o">.</span><span class="n">copytree</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">destination</span><span class="p">)</span></div>

</pre></div>

</div>
Expand Down
Loading

0 comments on commit ee2eb6a

Please sign in to comment.