Skip to content

Commit

Permalink
Migrate Singularity example DAGs to new design #22464
Browse files Browse the repository at this point in the history
  • Loading branch information
chethanuk committed Jun 3, 2022
1 parent e13b159 commit 4aebd9a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
17 changes: 0 additions & 17 deletions airflow/providers/singularity/example_dags/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-singularity/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Content
:maxdepth: 1
:caption: Resources

Example DAGs <https://github.com/apache/airflow/tree/main/airflow/providers/singularity/example_dags>
Example DAGs <https://github.com/apache/airflow/tree/main/tests/system/providers/singularity/example_singularity.py>
PyPI Repository <https://pypi.org/project/apache-airflow-providers-singularity/>
Installing from sources <installing-providers-from-sources>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
# specific language governing permissions and limitations
# under the License.

import os
from datetime import datetime, timedelta

from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.providers.singularity.operators.singularity import SingularityOperator

ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID")
DAG_ID = "singularity_sample"

with DAG(
'singularity_sample',
DAG_ID,
default_args={'retries': 1},
schedule_interval=timedelta(minutes=10),
start_date=datetime(2021, 1, 1),
Expand All @@ -44,3 +48,9 @@

t1 >> [t2, t3]
t3 >> t4


from tests.system.utils import get_test_run # noqa: E402

# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
test_run = get_test_run(dag)

0 comments on commit 4aebd9a

Please sign in to comment.