Python frontend for ROOT data analyses written in queryosity
Project description
Queryosity
Queryosity is a row-wise data analysis library for (semi-)structured data.
- Lazy dataflow interface.
- Multithreaded processing.
- Support for arbitrary input/output data.
- Automatic propagation of systematic variations.
Hello World
#include <fstream>
#include <sstream>
#include <vector>
#include <queryosity.hpp>
#include <queryosity/boost/histogram.hpp>
#include <queryosity/nlohmann/json.hpp>
using dataflow = qty::dataflow;
namespace multithread = qty::multithread;
namespace dataset = qty::dataset;
namespace column = qty::column;
namespace query = qty::query;
using json = qty::nlohmann::json;
using h1d = qty::boost::histogram::histogram<double>;
using linax = qty::boost::histogram::axis::regular;
int main() {
dataflow df(multithread::enable(10));
std::ifstream data("data.json");
auto [x, w] = df.read(
dataset::input<json>(data), dataset::column<std::vector<double>>("x"), dataset::column<double>("w"));
auto zero = df.define(column::constant(0));
auto x0 = x[zero];
auto sel =
df.weight(w)
.filter(column::expression(
[](std::vector<double> const &v) { return v.size(); }))(x);
auto h_x0_w = df.get(query::output<h1d>(linax(20, 0.0, 200.0)))
.fill(x0)
.at(sel)
.result();
std::ostringstream os;
os << *h_x0_w;
std::cout << os.str() << std::endl;
}
Installation
Single-header
#include <queryosity.hpp>
CMake
git clone https://github.com/taehyounpark/queryosity.git
External
cd queryosity/ && mkdir build/ && cd build/
cmake -DQUERYOSITY_INSTALL=ON ../
cmake --build .
cmake --install .
find_package(queryosity 0.9.4 REQUIRED)
...
add_library(Analysis ...)
...
target_link_libraries(Analysis INTERFACE queryosity::queryosity)
#include <queryosity.hpp>
Integrated
add_subdirectory(queryosity)
...
add_library(Analysis ...)
...
target_link_libraries(Analysis INTERFACE queryosity::queryosity)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file queryosity-0.9.4.tar.gz.
File metadata
- Download URL: queryosity-0.9.4.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ab3020c40b12f8cc175d9b1c6f069d01c2ff6ece4847f176511696bee3c3b8f
|
|
| MD5 |
1de8beea3ef7bd2e9c43bd7945e645d9
|
|
| BLAKE2b-256 |
437f2221771fa51eb5cd5eab88f9762ac3a9e5fcceb91781ecc7ab16bad81d85
|
Provenance
The following attestation bundles were made for queryosity-0.9.4.tar.gz:
Publisher:
publish-to-pypi.yml on taehyounpark/queryosity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
queryosity-0.9.4.tar.gz -
Subject digest:
2ab3020c40b12f8cc175d9b1c6f069d01c2ff6ece4847f176511696bee3c3b8f - Sigstore transparency entry: 1171852735
- Sigstore integration time:
-
Permalink:
taehyounpark/queryosity@9a6187ac323dd79cff461dc0c246318932a32550 -
Branch / Tag:
refs/tags/0.9.4 - Owner: https://github.com/taehyounpark
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@9a6187ac323dd79cff461dc0c246318932a32550 -
Trigger Event:
push
-
Statement type:
File details
Details for the file queryosity-0.9.4-py3-none-any.whl.
File metadata
- Download URL: queryosity-0.9.4-py3-none-any.whl
- Upload date:
- Size: 26.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
287c4d77d10282ff2a2c0b4d17667b1f29a0bb5b77564b10871f15a303b2040d
|
|
| MD5 |
3256938426b5e1c43b8282ae606f2b68
|
|
| BLAKE2b-256 |
b5dfa07d8e7e7fe8597d4bc01f4112675383984569c6a8154c51b10f20e299ae
|
Provenance
The following attestation bundles were made for queryosity-0.9.4-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on taehyounpark/queryosity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
queryosity-0.9.4-py3-none-any.whl -
Subject digest:
287c4d77d10282ff2a2c0b4d17667b1f29a0bb5b77564b10871f15a303b2040d - Sigstore transparency entry: 1171852739
- Sigstore integration time:
-
Permalink:
taehyounpark/queryosity@9a6187ac323dd79cff461dc0c246318932a32550 -
Branch / Tag:
refs/tags/0.9.4 - Owner: https://github.com/taehyounpark
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@9a6187ac323dd79cff461dc0c246318932a32550 -
Trigger Event:
push
-
Statement type: