ServiceX Data Transformer for HEP Data
Project description
ServiceX_transformer Library
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.
- 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 |
---|---|---|
--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: object-store, output-dir, volume | object-store |
--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 |
--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
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
Hashes for servicex-transformer-1.0.6rc1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9df8b914f15bcb077eb8eaa1a81b98c4c7ac61da61e80c94fb30ec30581ddb1 |
|
MD5 | 60894a01f8cd3f22f2f4bce20f3b1d40 |
|
BLAKE2b-256 | 8589f4a172c7e2953d123ed114d83c540e292072dc55b1f7b38f71ddb5393ce2 |
Hashes for servicex_transformer-1.0.6rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | daf763dc315da40751165ccad977dfcf7a061994ac8426c564ceeca6fbf16dcc |
|
MD5 | b270756a1134b0bde3175f682fe7585f |
|
BLAKE2b-256 | 7e5b84abab30e183bb6fe4745a208ace1e6d5aa689e5f28322828e96e6451191 |