Lee-W commented on code in PR #43604:
URL: https://github.com/apache/airflow/pull/43604#discussion_r1826569884
##########
contributing-docs/07_local_virtualenv.rst:
##########
@@ -61,26 +62,114 @@ of required packages.
released wheel packages.
-Installing Airflow
-..................
+Creating and maintaining local virtualenv with uv
+-------------------------------------------------
+
+As of November 2024 we are recommending to use ``uv`` for local virtualenv
management for Airflow development.
+Th e``uv`` is a build frontend tool that is designed to manage python,
virtualenvs and workspaces for development
+and testing of Python projects. It is a modern tool that is designed to work
with PEP 517/518 compliant projects
+and it is much faster than "reference" ``pip`` tool. It has extensive support
to not only create development
+environment but also to manage python versions, development environments,
workspaces and Python tools used
+to develop Airflow (via ``uv tool`` command - such as ``pre-commit`` and
others, you can also use ``uv tool``
+to install ``breeze`` - containerized development environment that we use to
be able to reproduce the
+CI environment locally and to run release-management and certain development
tasks.
+
+You can read more about ``uv`` in `UV Getting started
<https://docs.astral.sh/uv/getting-started/>`_ but
+below you will find a few typical steps to get you started with ``uv``.
+
+Installing uv
+.............
+
+You can follow the `installation instructions
<https://docs.astral.sh/uv/getting-started/installation/>`_ to install
+``uv`` on your system. Once you have ``uv`` installed, you can do all the
environment preparation tasks using
+``uv`` commands.
+
+Installing Python versions
+..........................
+
+You can install Python versions using ``uv python install`` command. For
example, to install Python 3.9.7, you can run:
+
+.. code:: bash
+
+ uv python install 3.9.7
+
+This is optional step - UV will automatically install the Python version you
need when you create a virtualenv.
Review Comment:
```suggestion
This is optional step - ``uv`` will automatically install the Python version
you need when you create a virtualenv.
```
##########
contributing-docs/07_local_virtualenv.rst:
##########
@@ -61,26 +62,114 @@ of required packages.
released wheel packages.
-Installing Airflow
-..................
+Creating and maintaining local virtualenv with uv
+-------------------------------------------------
+
+As of November 2024 we are recommending to use ``uv`` for local virtualenv
management for Airflow development.
+Th e``uv`` is a build frontend tool that is designed to manage python,
virtualenvs and workspaces for development
Review Comment:
```suggestion
``uv`` is a build frontend tool that is designed to manage python,
virtualenvs and workspaces for development
```
##########
contributing-docs/07_local_virtualenv.rst:
##########
@@ -61,26 +62,114 @@ of required packages.
released wheel packages.
-Installing Airflow
-..................
+Creating and maintaining local virtualenv with uv
+-------------------------------------------------
+
+As of November 2024 we are recommending to use ``uv`` for local virtualenv
management for Airflow development.
+Th e``uv`` is a build frontend tool that is designed to manage python,
virtualenvs and workspaces for development
+and testing of Python projects. It is a modern tool that is designed to work
with PEP 517/518 compliant projects
+and it is much faster than "reference" ``pip`` tool. It has extensive support
to not only create development
+environment but also to manage python versions, development environments,
workspaces and Python tools used
+to develop Airflow (via ``uv tool`` command - such as ``pre-commit`` and
others, you can also use ``uv tool``
+to install ``breeze`` - containerized development environment that we use to
be able to reproduce the
+CI environment locally and to run release-management and certain development
tasks.
+
+You can read more about ``uv`` in `UV Getting started
<https://docs.astral.sh/uv/getting-started/>`_ but
+below you will find a few typical steps to get you started with ``uv``.
+
+Installing uv
+.............
+
+You can follow the `installation instructions
<https://docs.astral.sh/uv/getting-started/installation/>`_ to install
+``uv`` on your system. Once you have ``uv`` installed, you can do all the
environment preparation tasks using
+``uv`` commands.
+
+Installing Python versions
+..........................
+
+You can install Python versions using ``uv python install`` command. For
example, to install Python 3.9.7, you can run:
+
+.. code:: bash
+
+ uv python install 3.9.7
+
+This is optional step - UV will automatically install the Python version you
need when you create a virtualenv.
+
+Creating virtualenvs with uv
+............................
+
+.. code:: bash
+
+ uv venv
+
+This will create a default venv in your project's ``.venv`` directory. You can
also create a venv
+with a specific Python version by running:
+
+.. code:: bash
+
+ uv venv --python 3.9.7
-The simplest way to install Airflow in local virtualenv is to use ``pip``:
+You can also create a venv with a different folder name by running:
.. code:: bash
- pip install -e ".[devel,<OTHER EXTRAS>]" # for example: pip install -e
".[devel,google,postgres]"
+ uv venv .my-venv
+
+However UV creation/re-creation of venvs is so fast that you can easily create
and delete venvs as needed.
Review Comment:
```suggestion
However ``uv`` creation/re-creation of venvs is so fast that you can easily
create and delete venvs as needed.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]