You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/12/28 22:14:03 UTC

[GitHub] [airflow] xinbinhuang opened a new pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

xinbinhuang opened a new pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942
 
 
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [x] My PR addresses the following [Airflow Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
     - https://issues.apache.org/jira/browse/AIRFLOW-XXX
     - In case you are fixing a typo in the documentation you can prepend your commit with \[AIRFLOW-XXX\], code changes always need a Jira issue.
     - In case you are proposing a fundamental code change, you need to create an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)).
     - In case you are adding a dependency, check if the license complies with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   
   ### Description
   
   - [x] Here are some details about my PR, including screenshots of any UI changes:
   
   ### Tests
   
   - [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   
   ### Commits
   
   - [x] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [x] In case of new functionality, my PR adds documentation that describes how to use it.
     - All the public functions and the classes in the PR contain docstrings that explain what it does
     - If you implement backwards incompatible changes, please leave a note in the [Updating.md](https://github.com/apache/airflow/blob/master/UPDATING.md) so we can assign it to a appropriate release
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on issue #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on issue #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#issuecomment-569597644
 
 
   @potiuk Rebased and removed trailing space. Thanks!

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361925790
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,26 +91,47 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
+To create and initialize the local virtualenv:
 
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+1. Create an environment with one of the two options:
 
-To create and initialize the local virtualenv:
+   - Option 1: consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   - Option 2: create a local virtualenv with Conda
 
-1. Create an environment as follows:
+    - install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+    .. code-block:: bash
+
+      conda create -n airflow python=3.6
+      conda activate airflow
 
 2. Install Python PIP requirements:
+   
+   .. code-block:: bash
+
+    pip install -U -e ".[devel,<OTHER EXTRAS>]" # for example: pip install -U -e ".[devel,gcp,postgres]"
+
+Note: when you first initialize database (the next step), airflow by default will try to load in examples dags where 
+some of them requires dependencies ``gcp`` and ``postgres``. You can solve the problem by 
 
-   ``pip install -e ".[devel]"``
+- installing the extras i.e. ``[devel,gcp,postgres]`` or
+- disable the example dags with environment variable: ``export AIRFLOW__CORE__LOAD_EXAMPLES=False`` or
+- simply ignore the error messages and proceed
 
 Review comment:
   @potiuk Yes. Fixed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on issue #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on issue #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#issuecomment-569885434
 
 
   Thanks for reviewing and merging @nuclearpinguin @potiuk 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] nuclearpinguin commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
nuclearpinguin commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361816474
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -122,21 +141,6 @@ Simply enter the Breeze environment by using ``workon`` and, once you are in it,
 
   ./breeze --initialize-local-virtualenv
 
-Optional - create a local virtualenv with conda
------------------------------------------------
-
-- install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
-
-.. code-block:: bash
-
-  conda create -n airflow python=3.6
-  conda activate airflow
-  pip install -U -e ".[devel,gcp,postgres,ssh]"
-
-  # if necessary, start with a clean AIRFLOW_HOME, e.g.
-  # rm -rf ~/airflow
-  airflow db init
 
 Review comment:
   Why you skipped db init?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361915139
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,26 +91,47 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
+To create and initialize the local virtualenv:
 
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+1. Create an environment with one of the two options:
 
-To create and initialize the local virtualenv:
+   - Option 1: consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   - Option 2: create a local virtualenv with Conda
 
-1. Create an environment as follows:
+    - install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+    .. code-block:: bash
+
+      conda create -n airflow python=3.6
+      conda activate airflow
 
 2. Install Python PIP requirements:
+   
+   .. code-block:: bash
+
+    pip install -U -e ".[devel,<OTHER EXTRAS>]" # for example: pip install -U -e ".[devel,gcp,postgres]"
+
+Note: when you first initialize database (the next step), airflow by default will try to load in examples dags where 
+some of them requires dependencies ``gcp`` and ``postgres``. You can solve the problem by 
 
-   ``pip install -e ".[devel]"``
+- installing the extras i.e. ``[devel,gcp,postgres]`` or
+- disable the example dags with environment variable: ``export AIRFLOW__CORE__LOAD_EXAMPLES=False`` or
+- simply ignore the error messages and proceed
 
 Review comment:
   @potiuk  Do you think that I should still reference that opened issue you mentioned? (i.e. I am also aware of this problem as I have seen it a few times before, but was not sure the reason for that.)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361909556
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,22 +91,41 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
-
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
-
 To create and initialize the local virtualenv:
 
 1. Create an environment as follows:
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+   a. Consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   b. Create a local virtualenv with conda
 
 Review comment:
   @nuclearpinguin A kindly reminder :). PTAL. Thanks!

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361909277
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,26 +91,47 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
+To create and initialize the local virtualenv:
 
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+1. Create an environment with one of the two options:
 
-To create and initialize the local virtualenv:
+   - Option 1: consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   - Option 2: create a local virtualenv with Conda
 
-1. Create an environment as follows:
+    - install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+    .. code-block:: bash
+
+      conda create -n airflow python=3.6
+      conda activate airflow
 
 2. Install Python PIP requirements:
+   
+   .. code-block:: bash
+
+    pip install -U -e ".[devel,<OTHER EXTRAS>]" # for example: pip install -U -e ".[devel,gcp,postgres]"
+
+Note: when you first initialize database (the next step), airflow by default will try to load in examples dags where 
+some of them requires dependencies ``gcp`` and ``postgres``. You can solve the problem by 
 
-   ``pip install -e ".[devel]"``
+- installing the extras i.e. ``[devel,gcp,postgres]`` or
+- disable the example dags with environment variable: ``export AIRFLOW__CORE__LOAD_EXAMPLES=False`` or
+- simply ignore the error messages and proceed
 
 Review comment:
   Actually, the problem I am referring to here is not related to the migration: 
   
   there are some example dags (i.e. [example_gcs_to_bq.py](https://github.com/apache/airflow/blob/master/airflow/example_dags/example_gcs_to_bq.py) or [example_postgres_to_gcs.py](https://github.com/apache/airflow/blob/master/airflow/example_dags/example_postgres_to_gcs.py) ) require the `gcp`/`postgres` extra to be installed. When we do `airflow db init`, by default it will try to load in the example dags, but it will raise `ModuleNotFoundError` when parsing these example dags. This also happens when we do `airflow webserver/scheduler`. 
   The note here is to notify this behaviors to contributors that are not familiar with Airflow. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on issue #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on issue #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#issuecomment-569455395
 
 
   @potiuk I recreate the PR here. I combine the `conda` and `virtualenvwrapper` into the same section. Also, add a note on installing extras.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] potiuk commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361843664
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,26 +91,47 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
+To create and initialize the local virtualenv:
 
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+1. Create an environment with one of the two options:
 
-To create and initialize the local virtualenv:
+   - Option 1: consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   - Option 2: create a local virtualenv with Conda
 
-1. Create an environment as follows:
+    - install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+    .. code-block:: bash
+
+      conda create -n airflow python=3.6
+      conda activate airflow
 
 2. Install Python PIP requirements:
+   
+   .. code-block:: bash
+
+    pip install -U -e ".[devel,<OTHER EXTRAS>]" # for example: pip install -U -e ".[devel,gcp,postgres]"
+
+Note: when you first initialize database (the next step), airflow by default will try to load in examples dags where 
+some of them requires dependencies ``gcp`` and ``postgres``. You can solve the problem by 
 
-   ``pip install -e ".[devel]"``
+- installing the extras i.e. ``[devel,gcp,postgres]`` or
+- disable the example dags with environment variable: ``export AIRFLOW__CORE__LOAD_EXAMPLES=False`` or
+- simply ignore the error messages and proceed
 
 Review comment:
   Would be great to refer the opened https://issues.apache.org/jira/browse/AIRFLOW-6265 issue here. This whole description will be not needed when we solve it (hopefully soon :))

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361915139
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,26 +91,47 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
+To create and initialize the local virtualenv:
 
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+1. Create an environment with one of the two options:
 
-To create and initialize the local virtualenv:
+   - Option 1: consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   - Option 2: create a local virtualenv with Conda
 
-1. Create an environment as follows:
+    - install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+    .. code-block:: bash
+
+      conda create -n airflow python=3.6
+      conda activate airflow
 
 2. Install Python PIP requirements:
+   
+   .. code-block:: bash
+
+    pip install -U -e ".[devel,<OTHER EXTRAS>]" # for example: pip install -U -e ".[devel,gcp,postgres]"
+
+Note: when you first initialize database (the next step), airflow by default will try to load in examples dags where 
+some of them requires dependencies ``gcp`` and ``postgres``. You can solve the problem by 
 
-   ``pip install -e ".[devel]"``
+- installing the extras i.e. ``[devel,gcp,postgres]`` or
+- disable the example dags with environment variable: ``export AIRFLOW__CORE__LOAD_EXAMPLES=False`` or
+- simply ignore the error messages and proceed
 
 Review comment:
   @potiuk  Do you think that I should still reference that opened issue you mentioned? (i.e. I am also aware of this problem as I have seen it a few times before.)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361819374
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -122,21 +141,6 @@ Simply enter the Breeze environment by using ``workon`` and, once you are in it,
 
   ./breeze --initialize-local-virtualenv
 
-Optional - create a local virtualenv with conda
------------------------------------------------
-
-- install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
-
-.. code-block:: bash
-
-  conda create -n airflow python=3.6
-  conda activate airflow
-  pip install -U -e ".[devel,gcp,postgres,ssh]"
-
-  # if necessary, start with a clean AIRFLOW_HOME, e.g.
-  # rm -rf ~/airflow
-  airflow db init
 
 Review comment:
   This is repeated in the original doc for the conda section. Under the change of this PR, I grouped conda and virtualenvwrapper as two different ways to create virtual environment. So the suggested change will follow something like this.
   
   1. Create local virtualenv 
       - using virtualenv wrapper; or
       - using conda
   2. Pip install
   3. airflow db init

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] nuclearpinguin merged pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
nuclearpinguin merged pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361819374
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -122,21 +141,6 @@ Simply enter the Breeze environment by using ``workon`` and, once you are in it,
 
   ./breeze --initialize-local-virtualenv
 
-Optional - create a local virtualenv with conda
------------------------------------------------
-
-- install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
-
-.. code-block:: bash
-
-  conda create -n airflow python=3.6
-  conda activate airflow
-  pip install -U -e ".[devel,gcp,postgres,ssh]"
-
-  # if necessary, start with a clean AIRFLOW_HOME, e.g.
-  # rm -rf ~/airflow
-  airflow db init
 
 Review comment:
   This is repeated in the original doc for the conda section. Under the change of this PR, I grouped conda and virtualenvwrapper as two different ways to create virtual environment. So the suggested change will follow something like this.
   
   1. Create local virtualenv 
       - using virtualenv wrapper
       - using conda
   2. Pip install
   3. airflow db init

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] potiuk commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361917178
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,26 +91,47 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
+To create and initialize the local virtualenv:
 
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+1. Create an environment with one of the two options:
 
-To create and initialize the local virtualenv:
+   - Option 1: consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   - Option 2: create a local virtualenv with Conda
 
-1. Create an environment as follows:
+    - install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+    .. code-block:: bash
+
+      conda create -n airflow python=3.6
+      conda activate airflow
 
 2. Install Python PIP requirements:
+   
+   .. code-block:: bash
+
+    pip install -U -e ".[devel,<OTHER EXTRAS>]" # for example: pip install -U -e ".[devel,gcp,postgres]"
+
+Note: when you first initialize database (the next step), airflow by default will try to load in examples dags where 
+some of them requires dependencies ``gcp`` and ``postgres``. You can solve the problem by 
 
-   ``pip install -e ".[devel]"``
+- installing the extras i.e. ``[devel,gcp,postgres]`` or
+- disable the example dags with environment variable: ``export AIRFLOW__CORE__LOAD_EXAMPLES=False`` or
+- simply ignore the error messages and proceed
 
 Review comment:
   Yeah. I think a separate note would be nice as a reminder that we have to do something about it and that users aware this is a temporary problem.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] potiuk commented on issue #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#issuecomment-569497224
 
 
   And Trailing whitespace to remove :)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361819597
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,22 +91,41 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
-
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
-
 To create and initialize the local virtualenv:
 
 1. Create an environment as follows:
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+   a. Consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   b. Create a local virtualenv with conda
 
 Review comment:
   Reorganize with a cleaner structure. Let me know how you think.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] potiuk commented on issue #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#issuecomment-569645778
 
 
   LGTM. @nuclearpinguin - are you OK with this ?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] nuclearpinguin commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
nuclearpinguin commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361816423
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,22 +91,41 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
-
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
-
 To create and initialize the local virtualenv:
 
 1. Create an environment as follows:
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+   a. Consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   b. Create a local virtualenv with conda
 
 Review comment:
   This structure suggest that I should follow point a) then b) and that's not true.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361819223
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,22 +91,41 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
-
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
-
 To create and initialize the local virtualenv:
 
 1. Create an environment as follows:
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+   a. Consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   b. Create a local virtualenv with conda
 
 Review comment:
   Would it be better if I change the ordered list into unordered list? My intention is to group the two ways of creating virtualenvs: using virtualenvwrapper etc vs conda into one big section as creating virtualenvs, as one equvilant to the other. So we don't need to repeat pip install and DB init separately.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361819223
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,22 +91,41 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
-
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
-
 To create and initialize the local virtualenv:
 
 1. Create an environment as follows:
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+   a. Consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   b. Create a local virtualenv with conda
 
 Review comment:
   Would it be better if I change the ordered list into unordered list? My intention is to group the two ways of creating virtualenvs: using virtualenvwrapper etc vs conda into one big section as creating virtualenvs, as one equvilant to the other. So we don't need to repeat pip install and DB init separately in the doc.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions

Posted by GitBox <gi...@apache.org>.
xinbinhuang commented on a change in pull request #6942: [AIRFLOW-XXXX] Fix development packages installtion instructions
URL: https://github.com/apache/airflow/pull/6942#discussion_r361915139
 
 

 ##########
 File path: LOCAL_VIRTUALENV.rst
 ##########
 @@ -91,26 +91,47 @@ To use your IDE for Airflow development and testing, you need to configure a vir
 environment. Ideally you should set up virtualenv for all Python versions that Airflow
 supports (3.5, 3.6).
 
-Consider using one of the following utilities to create virtual environments and easily
-switch between them with the ``workon`` command:
+To create and initialize the local virtualenv:
 
-- `pyenv <https://github.com/pyenv/pyenv>`_
-- `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
-- `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+1. Create an environment with one of the two options:
 
-To create and initialize the local virtualenv:
+   - Option 1: consider using one of the following utilities to create virtual environments and easily switch between them with the ``workon`` command:
+
+    - `pyenv <https://github.com/pyenv/pyenv>`_
+    - `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
+    - `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_
+
+    ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+  
+   - Option 2: create a local virtualenv with Conda
 
-1. Create an environment as follows:
+    - install `miniconda3 <https://docs.conda.io/en/latest/miniconda.html>`_
 
-   ``mkvirtualenv <ENV_NAME> --python=python<VERSION>``
+    .. code-block:: bash
+
+      conda create -n airflow python=3.6
+      conda activate airflow
 
 2. Install Python PIP requirements:
+   
+   .. code-block:: bash
+
+    pip install -U -e ".[devel,<OTHER EXTRAS>]" # for example: pip install -U -e ".[devel,gcp,postgres]"
+
+Note: when you first initialize database (the next step), airflow by default will try to load in examples dags where 
+some of them requires dependencies ``gcp`` and ``postgres``. You can solve the problem by 
 
-   ``pip install -e ".[devel]"``
+- installing the extras i.e. ``[devel,gcp,postgres]`` or
+- disable the example dags with environment variable: ``export AIRFLOW__CORE__LOAD_EXAMPLES=False`` or
+- simply ignore the error messages and proceed
 
 Review comment:
   @potiuk  Do you think that I should still reference that opened issue you mentioned, maybe as a separate note? (i.e. I am also aware of this problem as I have seen it a few times before, but was not sure the reason for that.)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services