Skip to content

Commit

Permalink
Merge pull request #1992 from PrefectHQ/remove-airflow
Browse files Browse the repository at this point in the history
Remove airflow tasks
  • Loading branch information
joshmeek committed Feb 7, 2020
2 parents fc62a44 + a4997b1 commit 5d70116
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 587 deletions.
33 changes: 0 additions & 33 deletions .circleci/config.yml
Expand Up @@ -238,37 +238,6 @@ jobs:
name: Run tests
command: pytest -vvrfEsx .

test_airflow:
docker:
- image: continuumio/miniconda3:4.6.14
steps:
- checkout
- setup_remote_docker
- run:
name: Install gcc
command: apt-get update && apt-get install -y gcc

- run:
name: Create Airflow conda environment
command: conda create -n airflow python=3.6 pip -y

- run:
name: Install Airflow
command: source activate airflow && SLUGIFY_USES_TEXT_UNIDECODE=yes pip install apache-airflow flask==1.0.4 && source deactivate

- run:
name: Install prefect
command: pip install ".[all_extras]"

- run:
name: Run tests w/ airflow
command: pytest -vvrfEsx --airflow --cov=prefect --cov-report=xml:/tmp/workspace/coverage/airflow-coverage.xml .

- persist_to_workspace:
root: *workspace_root
paths:
- coverage

upload_coverage:
docker:
- image: python:3.6
Expand Down Expand Up @@ -393,13 +362,11 @@ workflows:
- test_lower_prefect
- test_vanilla_prefect
- test_py352_import_prefect
- test_airflow
- upload_coverage:
requires:
- test_35
- test_36
- test_vanilla_prefect
- test_airflow

"Check code style and docs":
jobs:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -26,7 +26,7 @@ These changes are available in the [master branch](https://github.com/PrefectHQ/

### Breaking Changes

- None
- Remove Airflow Tasks - [#1992](https://github.com/PrefectHQ/prefect/pull/1992)

### Contributors

Expand Down
21 changes: 0 additions & 21 deletions conftest.py
Expand Up @@ -4,12 +4,6 @@


def pytest_addoption(parser):
parser.addoption(
"--airflow",
action="store_true",
dest="airflow",
help="including this flag will attempt to ONLY run airflow compatibility tests",
)
parser.addoption(
"--skip-formatting",
action="store_true",
Expand All @@ -19,28 +13,13 @@ def pytest_addoption(parser):


def pytest_configure(config):
config.addinivalue_line(
"markers", "airflow: mark test to run only when --airflow flag is provided."
)
config.addinivalue_line(
"markers",
"formatting: mark test as formatting to skip when --skip-formatting flag is provided.",
)


def pytest_runtest_setup(item):
air_mark = item.get_closest_marker("airflow")

# if a test IS marked as "airflow" and the airflow flag IS NOT set, skip it
if air_mark is not None and item.config.getoption("--airflow") is False:
pytest.skip(
"Airflow tests skipped by default unless --airflow flag provided to pytest."
)

# if a test IS NOT marked as airflow and the airflow flag IS set, skip it
elif air_mark is None and item.config.getoption("--airflow") is True:
pytest.skip("Non-Airflow tests skipped because --airflow flag was provided.")

formatting_mark = item.get_closest_marker("formatting")

# if a test IS marked as "formatting" and the --skip-formatting flag IS set, skip it
Expand Down
53 changes: 0 additions & 53 deletions docs/core/task_library/airflow.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/outline.toml
Expand Up @@ -180,11 +180,6 @@ module = "prefect.tasks.control_flow"
classes = ["FilterTask"]
functions = ["switch", "ifelse", "merge"]

[pages.tasks.airflow]
title = "Airflow Tasks"
module = "prefect.tasks.airflow"
classes = ["AirflowTask", "AirflowTriggerDAG"]

[pages.tasks.airtable]
title = "Airtable Tasks"
module = "prefect.tasks.airtable"
Expand Down
39 changes: 0 additions & 39 deletions src/prefect/tasks/airflow/__init__.py

This file was deleted.

0 comments on commit 5d70116

Please sign in to comment.