Skip to content

Commit 626f984

Browse files
potiukkaxilamoghrajesh
authored
Add simple instructions for installing providers in editable mode (#43468)
* Add simple instructions for installing providers in editable mode After #42505, you need to get through extra hoops to develop providers in Airflow's monorepo. This is a simple (not yet uv-specific) documentation on how to install providers in editable mode when you want to develop providers, so that you can run unit test. Copied mostly from #43082 It's not yet full set of docs explaining how to use workspaces and UV. This shoudl be handled via #43200 * Apply suggestions from code review Co-authored-by: Amogh Desai <[email protected]> --------- Co-authored-by: Kaxil Naik <[email protected]> Co-authored-by: Amogh Desai <[email protected]>
1 parent 49d0584 commit 626f984

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

INSTALL

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ or you can install all packages needed to run tests for core, providers, and all
9393

9494
You can see the list of all available extras below.
9595

96+
Additionally when you want to develop providers you need to install providers code in editable mode:
97+
98+
pip install -e "./providers"
99+
96100
# Using Hatch to manage your Python, virtualenvs, and build packages
97101

98102
Airflow uses [hatch](https://hatch.pypa.io/) as a build and development tool. It is one of the popular

contributing-docs/07_local_virtualenv.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,25 @@ The full list of extras is available in `pyproject.toml <../pyproject.toml>`_ an
125125
If you wish to install airflow using those tools you should use the constraint files and convert
126126
them to appropriate format and workflow that your tool requires.
127127

128+
Developing community providers in local virtualenv
129+
..................................................
130+
131+
While the above installation is good enough to work on Airflow code, in order to develop
132+
providers, you also need to install them in the virtualenv you work on (after installing
133+
the extras in airflow, that correspond to the provider you want to develop).
134+
135+
If you want to develop google providers, for example you can run the following commands:
136+
137+
.. code:: bash
138+
139+
pip install -e ".[devel,devel-tests,google]"
140+
pip install -e "./providers"
141+
142+
The first command installs airflow, it's development dependencies, test dependencies and
143+
both runtime and development dependencies of the google provider.
144+
145+
The second one installs providers source code in development mode, so that modifications
146+
to the code are automatically reflected in your installed virtualenv.
128147

129148
Using Hatch
130149
-----------

0 commit comments

Comments
 (0)