Skip to main content

Program for creating data pipelines triggered by file creation events.

Project description

dpypeline

Continuous Integration PyPI version Test Coverage Code style: black License: MIT

Program for creating data pipelines triggered by file creation events.

Version

0.1.0-beta.3

Python enviroment setup

To utilise this package, it should be installed within a dedicated Conda environment. You can create this environment using the following command:

conda create --name <environment_name> python=3.10

To activate the conda environment use:

conda activate <environment_name>

Alternatively, use virtualenv to setup and activate the environment:

python -m venv <environment_name>
source <envionment_name>/bin/activate

Installation

  1. Clone the repository:
git clone git@github.com:NOC-OI/dpyepline.git
  1. Navigate to the package directory:

After cloning the repository, navigate to the root directory of the package.

  1. Install in editable mode:

To install dpypeline in editable mode, execute the following comman from the root directory:

pip install -e .

This command will install the library in editable mode, allowing you to make changes to the code if needed.

  1. Alternative installation methods:
  • Install from the GitHub repository directly:
pip install git+https://github.com/NOC-OI/dpypeline.git@main#egg=dpypeline
  • Install from the PyPI repository:
pip install dpypeline

Unit tests

Run tests using pytest in the main directory:

pip install pytest
pytest

Examples

Python scripts

Examples of Python scripts explaining how to use this package can be found in the examples directory.

Command line interface (CLI)

TODO

Environment variables

There are a few environment variables that need to be set so that the application can run correctly:

  • CACHE_DIR: Path to the cache directory.

Software Workflow Overview

Pipeline architectures

Dpypeline diagram

Thread-based pipeline

In the thread-based pipeline, Akita enqueues events into an in-memory queue. These events are subsequently consumed by ConsumerSerial, which generates jobs for sequential execution within the ThreadPipeline (an alias for BasicPipeline).

Parallel pipeline

In the parallel pipeline, Akita enqueues events into an in-memory queue. These events are then consumed by ConsumerParallel, which generates futures that are executed concurrently by multiple Dask workers.

Filesystems

Credentials to access the object store (.json file)

From inside JASMIN:

{
    "token": <Token generated using the Caringo Portal>,
    "secret": <Secret generated using the Caringo Portal>,
    "endpoint_url": "https://noc-msm-o.s3.jc.rl.ac.uk"
}

External access, from outside JASMIN:

{
    "token": <Token generated using the Caringo portal>,
    "secret": <Secret generated using the Caringo portal>,
    "endpoint_url": "https://noc-msm-o.s3-ext.jc.rl.ac.uk"
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dpypeline-0.1.0b3.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dpypeline-0.1.0b3-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file dpypeline-0.1.0b3.tar.gz.

File metadata

  • Download URL: dpypeline-0.1.0b3.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for dpypeline-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 1b56b6ce3216a3edb308bc9f426ed5ec9f661fa30ad8e7d20b72baa3b0d7ccf8
MD5 fe1237a1e3853609ea9c4af186cfc756
BLAKE2b-256 3965e5789002607909c17185e35ab8f46a05f7128d549d7e7d93195d1165d894

See more details on using hashes here.

File details

Details for the file dpypeline-0.1.0b3-py3-none-any.whl.

File metadata

  • Download URL: dpypeline-0.1.0b3-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for dpypeline-0.1.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 0b0c6a39318b2b847401f181c298af506cbe2085e6b8f5be0e55099077159ac3
MD5 f5da0ba3045e9b3f54f824ff2423f189
BLAKE2b-256 f22a7360499666a4285af824ebcfee84eadcea9ba3a34fb23d55216ba34a1344

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page