Dagsesh: Airflow session manager
Project description
Dagsesh: Airflow DAG Session Manager
- Overview
- Prerequisites
- Getting Started
- Help
- Running the Test Harness
- Using
dagsesh
Plugin in your Project's Test Suite - FAQs
Overview
An Apache Airflow session context manager that overrides the default AIRFLOW_HOME
path with a random, ephemeral alternate.
Why is this useful? As per the Airflow configuration docs:
The first time you run Airflow, it will create a file called
airflow.cfg
in your$AIRFLOW_HOME
directory (~/airflow
by default).
Dagsesh delays the creation of AIRFLOW_HOME
using a lazy-loading facility whilst injecting it with a random alternate. Great if you want to create a pristine Airflow environment for repeatable testing.
Dagsesh can be used as a convenient pytest plugin to prime an Airflow environment for testing.
Prerequisites
- GNU make
- Python 3 Interpreter. We recommend installing pyenv
- Docker
Getting Started
Makester is used as the Integrated Developer Platform.
(macOS Users) Upgrading GNU Make
Follow these notes to get GNU make.
Creating the Local Environment
Get the code and change into the top level git
project directory:
git clone git@github.com:loum/dagsesh.git && cd dagsesh
NOTE: Run all commands from the top-level directory of the
git
repository.
For first-time setup, get the Makester project:
git submodule update --init
Initialise the environment:
make init-dev
Local Environment Maintenance
Keep Makester project up-to-date with:
git submodule update --remote --merge
Help
There should be a make
target to get most things done. Check the help for more information:
make help
Running the Test Harness
We use pytest. To run the tests:
make tests
Using dagsesh
Plugin in your Project's Test Suite
Add the dagsesh
package as a dependency to your project's development environment so that the plugin is installed and visible in your PYTHONPATH
. dagsesh
takes care of the distribution's entry point so that pytest
automatically finds the plugin module. Nothing else needs to be done.
NOTE: See Making your plugin installable by others for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dagsesh-0.1.0.tar.gz
.
File metadata
- Download URL: dagsesh-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8275c6ea59f5109562c272c4ca29b7e44f3ff096a5a51e2f4f7e6cae72061b65 |
|
MD5 | fe3375b467ed67ad8a0ca88c94086890 |
|
BLAKE2b-256 | 48b6b372dd1b16599795507e0404f3342c018ebe8b2ebc41812591a1020a477f |
File details
Details for the file dagsesh-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: dagsesh-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35c8575ccc9d3dbc927edc8b258b5ce20d3cc6de87073e693496c270e117b830 |
|
MD5 | bd9b0516491ca2a46d09d303f58460d9 |
|
BLAKE2b-256 | 5a6616985fb4ca546e2c4e8644babbb73d9438a77beb46c279c1d48837a88550 |