Skip to content

Commit

Permalink
move constraints to constraints file (#5612)
Browse files Browse the repository at this point in the history
* move constraints to constraints file

* fix noxfile indentation
  • Loading branch information
leahecole authored Apr 2, 2021
1 parent e8509ca commit 1734176
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions)
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
apache-airflow[gcp]==1.10.14
SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions)
apache-airflow-backport-providers-google==2021.3.3
2 changes: 2 additions & 0 deletions composer/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pandas-gbq==0.14.1 # must be under 0.15.0 until https://github.com/apache/airflow/issues/15113 is addressed
SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions)
1 change: 0 additions & 1 deletion composer/workflows/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apache-airflow[gcp]==1.10.14
SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions)
kubernetes==12.0.1
scipy==1.4.1; python_version > '3.0'
scipy==1.2.3; python_version < '3.0'
Expand Down
14 changes: 8 additions & 6 deletions noxfile-template.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,16 @@ def blacken(session: nox.sessions.Session) -> None:
def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None:
"""Runs py.test for a particular project."""
if os.path.exists("requirements.txt"):
if os.path.exists("constraints.txt"):
session.install("-r", "requirements.txt", "-c", "constraints.txt")
session.install("-r", "requirements.txt")
if os.path.exists("constraints.txt"):
session.install("-r", "requirements.txt", "-c", "constraints.txt")
else:
session.install("-r", "requirements.txt")

if os.path.exists("requirements-test.txt"):
if os.path.exists("constraints-test.txt"):
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
session.install("-r", "requirements-test.txt")
if os.path.exists("constraints-test.txt"):
session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt")
else:
session.install("-r", "requirements-test.txt")

if INSTALL_LIBRARY_FROM_SOURCE:
session.install("-e", _get_repo_root())
Expand Down

0 comments on commit 1734176

Please sign in to comment.