tulibraries / cob_datapipeline

Airflow Data Processing Pipeline for TUL Catalog on Blacklight Data
6 stars 0 forks source link
airflow-dags dataops librarysearch

cob_datapipeline

CircleCI pylint Score

cob_datapipeline is the repository that holds Airflow DAGs (Directed Acyclic Graphs, e.g., data processing workflows) along with related scripts for Temple University Libraries' Library Search (tul_cob) indexing workflows.

These DAGs (and related scripts) are expecting to be run within an Airflow installation akin to the one built by our TUL Airflow Playbook (private repository).

Some DAG tasks in this repository use Temple University Libraries' centralized python library tulflow.

Local Development, QA, and Production environment usage of these DAGs is detailed below.

Prerequisites

Libraries & Packages

Airflow Variables

These variables are initially set in the variables.json file. Variables are listed in variables.json.

Airflow Connections

Local Development

Local development relies on the Airflow Docker Dev Setup submodule.

This project uses the UNIX make command to build, run, stop, configure, and test DAGS for local development. These commands are written to first run the script to change into the submodule directory to use and access the development setup. See the Makefile for the complete list of commands available.

Related Documentation and Projects

Linting & Testing

Perform syntax and style checks on airflow code with pylint

To install and configure pylint

$ pip install pipenv
$ pipenv install --dev

To lint the DAGs

$ pipenv run pylint cob_datapipeline

Use pytest to run unit and functional tests on this project.

$ pipenv run pytest

lint and pytest are run automatically by CircleCI on each pull request.

Make Commands

rebuld-pipfile:

Used to rebuild Pipfile while making sure that airflow-constraints are met.

compare-dependencies:

Used to automatically check if a new dependency does not match upstream airflow contraints.

Deployment

CircleCI checks (lints and tests) code and deploys to the QA server when development branches are merged into the main branch. Code is deployed to production when a new release is created. See the CircleCI configuration file for details.