Skip to main content

ServiceX Data Transformer for HEP Data

Project description

ServiceX_transformer Library

CI/CD codecov

Library of common classes for building serviceX transformers.

Minimum Requiremnts

Works with Python version 2.7 and above

Download from PyPi

To use this library:

pip install servicex-transformer

Standard Command Line Arguments

This library provides a subclass of ArgParse for standardizing commnand line arguments for all transformer implementations.

Available arguments are:

Transformed Result Output

Command line arguments determine a destination for the results as well as an output format.

  • Kafka - Streaming system. Write messages formatted as Arrow tables. The chunks parameter determines how many events are included in each message.
  • Object Store - Each transformed file is written as an object to an S3 compatible object store. The only currently supported output file format is parquet. The objects are stored in a bucket named after the transformation request ID.

Command Line Reference

Option Description Default
--brokerlist BROKERLIST List of Kafka broker to connect to if streaming is selected servicex-kafka-0.slateci.net:19092, servicex-kafka-1.slateci.net:19092, servicex-kafka-2.slateci.net:19092"
--topic TOPIC Kafka topic to publish arrays to servicex
--chunks CHUNKS Number of events to include in each message. If ommitted, it will compute a best guess based on heuristics and max message size None
--tree TREE Root Tree to extract data from. Only valid for uproot transformer Events
--path PATH Path to single Root file to transform. Any file path readable by xrootd
--limit LIMIT Max number of events to process
--result-destination DEST Where to send the results: kafka or object-store, output-dir, volume kafka
--output-dir Local directory where the result will be written. Use this to run standalone without other serviceX infrastructure None
--result-format Binary format for the results: arrow, parquet, or root-file arrow
--max-message-size Maximum size for any message in Megabytes 14.5 Mb
--rabbit-uri URI RabbitMQ Connection URI host.docker.internal
--request-id GUID ID associated with this transformation request. Used as RabbitMQ Topic Name as well as object-store bucket servicex

Running Tests

Validation of the code logic is performed using pytest and pytest-mock. Unit test fixtures are in test directories inside each package.

The tests are instrumented with code coverage reporting via codecov. The travis job has a the codecov upload token set as an environment variable which is passed into the docker container so the report can be uploaded upon successful conclusion of the tests.

Coding Standards

To make it easier for multiple people to work on the codebase, we enforce PEP8 standards, verified by flake8. The community has found that the 80 character limit is a bit awkward, so we have a local config setting the max_line_length to 99.

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

servicex-transformer-1.0.0rc4.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

servicex_transformer-1.0.0rc4-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file servicex-transformer-1.0.0rc4.tar.gz.

File metadata

  • Download URL: servicex-transformer-1.0.0rc4.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for servicex-transformer-1.0.0rc4.tar.gz
Algorithm Hash digest
SHA256 51f40934c89dd85374625ec030ffd5a8f6f00acf67171cc20a2e4309ea55bb23
MD5 0ab9e82f4d3aa47606ef4cd590e004b7
BLAKE2b-256 4f28b142cddbf7c7471af681aec85519f2d5b74c0bb74a2fa150d4bd6dd220b6

See more details on using hashes here.

Provenance

File details

Details for the file servicex_transformer-1.0.0rc4-py3-none-any.whl.

File metadata

  • Download URL: servicex_transformer-1.0.0rc4-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for servicex_transformer-1.0.0rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 eecf5bfeea440ec5b475ecdf53816b0a5731b027a786f2f314d8808fe2ecd620
MD5 81d4a5f04764e5d00fa54bd70eae11b1
BLAKE2b-256 b3bc079d4d6fd4038080d16ade54b486868e1d8f8b7fb627d59281df03037525

See more details on using hashes here.

Provenance

Supported by

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