mik-laj commented on a change in pull request #18343:
URL: https://github.com/apache/airflow/pull/18343#discussion_r711720038
##########
File path: tests/models/test_taskinstance.py
##########
@@ -17,15 +17,16 @@
# under the License.
import datetime
+import math
import os
import signal
-import time
import urllib
from tempfile import NamedTemporaryFile
from typing import List, Optional, Union, cast
from unittest import mock
from unittest.mock import call, mock_open, patch
+import numpy as np
Review comment:
We have a lot of transitive dependencies. In this case, we have
installed `numpy` on CI, because. it is required by `apache-beam`, `pandas` and
`pyarrow`.
```
$ pipdeptree -r -p numpy
numpy==1.19.5
- apache-beam==2.32.0 [requires: numpy>=1.14.3,<1.21.0]
- pandas==1.1.5 [requires: numpy>=1.15.4]
- pandas-gbq==0.14.1 [requires: pandas>=0.20.1]
- scrapbook==0.5.0 [requires: pandas]
- pyarrow==4.0.1 [requires: numpy>=1.16.6]
- apache-beam==2.32.0 [requires: pyarrow>=0.15.1,<5.0.0]
- scrapbook==0.5.0 [requires: pyarrow]
```
Airflow does not depend on these dependencies, so if we want to use this
library, we should add it.
```
$ curl -s
https://raw.githubusercontent.com/apache/airflow/main/setup.{py,cfg} | grep -C
10 numpy | wc -l
0
```
> In general, is there a preference of whether to add (not strictly
necessary) libraries to the devel extra?
In this case, we should add this library to `devel`, because itis needed for
core.
extra | command | description
-- | -- | --
devel | pip install 'apache-airflow[devel]' | Minimum dev tools requirements
(without providers)
devel_hadoop | pip install 'apache-airflow[devel_hadoop]' | Same as devel +
dependencies for developing the Hadoop stack
devel_all | pip install 'apache-airflow[devel_all]' | Everything needed for
development (devel_hadoop + providers)
devel_ci | pip install 'apache-airflow[devel_ci]' | All dependencies
required for CI build.
See:
http://airflow.apache.org/docs/apache-airflow/stable/extra-packages-ref.html#bundle-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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]