Skip to content

Commit 1734176

Browse files
authored
move constraints to constraints file (#5612)
* move constraints to constraints file * fix noxfile indentation
1 parent e8509ca commit 1734176

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions)
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
apache-airflow[gcp]==1.10.14
2-
SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions)
32
apache-airflow-backport-providers-google==2021.3.3

composer/workflows/constraints.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pandas-gbq==0.14.1 # must be under 0.15.0 until https://github.com/apache/airflow/issues/15113 is addressed
2+
SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions)

composer/workflows/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
apache-airflow[gcp]==1.10.14
2-
SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions)
32
kubernetes==12.0.1
43
scipy==1.4.1; python_version > '3.0'
54
scipy==1.2.3; python_version < '3.0'

noxfile-template.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,16 @@ def blacken(session: nox.sessions.Session) -> None:
175175
def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None:
176176
"""Runs py.test for a particular project."""
177177
if os.path.exists("requirements.txt"):
178-
if os.path.exists("constraints.txt"):
179-
session.install("-r", "requirements.txt", "-c", "constraints.txt")
180-
session.install("-r", "requirements.txt")
178+
if os.path.exists("constraints.txt"):
179+
session.install("-r", "requirements.txt", "-c", "constraints.txt")
180+
else:
181+
session.install("-r", "requirements.txt")
181182

182183
if os.path.exists("requirements-test.txt"):
183-
if os.path.exists("constraints-test.txt"):
184-
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
185-
session.install("-r", "requirements-test.txt")
184+
if os.path.exists("constraints-test.txt"):
185+
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
186+
else:
187+
session.install("-r", "requirements-test.txt")
186188

187189
if INSTALL_LIBRARY_FROM_SOURCE:
188190
session.install("-e", _get_repo_root())

0 commit comments

Comments
 (0)