Skip to content

Commit 35e3705

Browse files
committed
chore(docs): Clean up documentation and build script
Our docs have been available in readthedocs.io for a while now, yet we still have a github workflow pushing docs to a github page. We do care about docs building properly, but can do without the github page deployment. Moreover, the documentation needed some updating in a few sections.
1 parent d241dd8 commit 35e3705

7 files changed

Lines changed: 44 additions & 38 deletions

File tree

.github/workflows/docs_pages.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,12 @@ jobs:
2525
python-version: ${{ matrix.python-version }}
2626

2727
- name: Install airflow-dbt-python with uv
28-
run: uv sync --dev --extra airflow-providers
28+
run: uv sync --all-extras --group docs
2929

3030
- name: Install Graphviz
3131
run: sudo apt-get install graphviz
3232

3333
- name: Build documentation
3434
run: |
35-
mkdir gh-pages
36-
touch gh-pages/.nojekyll
3735
cd docs/
38-
uv run sphinx-build -b html . _build
39-
cp -r _build/* ../gh-pages/
40-
41-
- name: Deploy documentation
42-
if: ${{ github.ref_type == 'tag' }}
43-
uses: JamesIves/github-pages-deploy-action@v4
44-
with:
45-
branch: gh-pages
46-
folder: gh-pages
36+
python -m sphinx -T -b dirhtml -d _build/doctrees . html
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"""Hooks module provides DbtHooks and DbtFSHooks."""
1+
"""The hooks module provides Airflow hooks used to interact with dbt."""

airflow_dbt_python/hooks/dbt.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
"""Provides a hook to interact with a dbt project."""
1+
"""Provides a hook to interact with dbt.
2+
3+
Interacting with dbt mainly means setting up a dbt project and running a dbt
4+
task.
5+
"""
26

37
from __future__ import annotations
48

airflow_dbt_python/hooks/fs/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
"""The DbtFSHook interface includes methods for downloading and uploading files.
1+
"""A ``DbtFSHook`` can download and upload dbt project files to a filesystem.
22
3-
Internally, DbtFSHooks can use Airflow hooks to execute the actual operations.
4-
5-
Currently, only AWS S3 and the local filesystem are supported as remotes.
3+
By filesystem we understand any storage that can hold dbt project files, like an
4+
S3 bucket or a git repository.
65
"""
76

87
from abc import ABC, abstractmethod

airflow_dbt_python/hooks/target.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
"""Provides a hook to get a dbt profile based on the Airflow connection."""
1+
"""Provides hooks to establish a dbt connection with supported targets.
2+
3+
The connection details will be extracted from an Airflow connection, and each
4+
target can interpret connection information differently according to its
5+
specific connection requirements.
6+
"""
27

38
from __future__ import annotations
49

docs/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ When Airflow is installed is running on a multi- machine or cloud installation,
228228

229229
For these deployments we must rely on a *dbt* remote to download and, eventually, upload all required *dbt* files. The remote *dbt* URL may be used in place of a local ``project_dir`` or ``profiles_dir`` to have *airflow-dbt-python* download the *dbt* files in the remote into a temporary directory for execution.
230230

231-
Interactions with storages are supported by subclasses of ``DbtFSHook``. Read the documentation :ref:`dbt_remote_hooks` to learn more about these hooks.
231+
Interactions with storages are supported by subclasses of ``DbtFSHook``. Read the documentation :ref:`dbt_fs_hooks` to learn more about these hooks.
232232

233233
As an example, let's upload our *dbt* project to an AWS S3 bucket. The files may end up structured in the bucket as:
234234

docs/reference/hooks.rst

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,49 @@
11
airflow_dbt_python.hooks
22
========================
33

4-
Core *dbt* hooks
5-
----------------
4+
Core *dbt* hook
5+
---------------
66

77
.. automodule:: airflow_dbt_python.hooks.dbt
88
:members:
9+
:no-index:
10+
11+
Target hooks
12+
------------
913

10-
Supported *dbt* remote hooks
11-
----------------------------
14+
.. automodule:: airflow_dbt_python.hooks.target
15+
:members:
16+
:no-index:
17+
18+
Filesystem hooks
19+
----------------
1220

13-
The DbtFSHook interface
21+
The ``DbtFSHook`` interface
1422
^^^^^^^^^^^^^^^^^^^^^^^^^^^
1523

16-
.. automodule:: airflow_dbt_python.hooks.remote
24+
.. automodule:: airflow_dbt_python.hooks.fs.__init__
1725
:members:
1826

19-
*dbt* git remote
20-
^^^^^^^^^^^^^^^^
27+
Git
28+
^^^
2129

22-
.. automodule:: airflow_dbt_python.hooks.remote.git
30+
.. automodule:: airflow_dbt_python.hooks.fs.git
2331
:members:
2432

25-
*dbt* localfs remote
26-
^^^^^^^^^^^^^^^^^^^^
33+
Local
34+
^^^^^
2735

28-
.. automodule:: airflow_dbt_python.hooks.remote.localfs
36+
.. automodule:: airflow_dbt_python.hooks.fs.local
2937
:members:
3038

31-
*dbt* S3 remote
32-
^^^^^^^^^^^^^^^^
39+
S3
40+
^^^
3341

34-
.. automodule:: airflow_dbt_python.hooks.remote.s3
42+
.. automodule:: airflow_dbt_python.hooks.fs.s3
3543
:members:
3644

37-
*dbt* GCS remote
38-
^^^^^^^^^^^^^^^^
45+
GCS
46+
^^^
3947

40-
.. automodule:: airflow_dbt_python.hooks.remote.gcs
48+
.. automodule:: airflow_dbt_python.hooks.fs.gcs
4149
:members:

0 commit comments

Comments
 (0)