Skip to main content

Object partitioning package.

Project description

Object Partitioning

PyPI version Build Status

A Python package to help understand partitioning by objects. Works only on ATLAS xAOD format files (PHYS, PHYSLITE, etc.).

Writes a parquet file with per-event data.

Installation

Install via pip:

pip install atlas-object-partitioning

Install via uv:

  • If you don't have the uv tool installed, it is highly recommended as a way to quickly install local versions of the code without having to build custom environments, etc.

Install locally so always available:

uv tool install atlas-object-partitioning
atlas-object-partitioning --help

Update it to the most recent version with uv tool upgrade atlas-object-partitioning.

Or running it in an ephemeral environment:

uvx atlas-object-partitioning --help

Or install from source:

git clone https://github.com/gordonwatts/object-partitioning.git
cd atlas-object-partitioning
pip install .

Usage

You'll need a servicex.yaml file with a valid token to use the ServiceX backend. See here to help you get started.

From the command line.

  • Use --help to see all options
  • Specify a rucio dataset, for example, atlas-object-partitioning mc23_13p6TeV:mc23_13p6TeV.601237.PhPy8EG_A14_ttbar_hdamp258p75_allhad.deriv.DAOD_PHYSLITE.e8514_s4369_r16083_p6697
  • Use the -n option to specify how many files in the dataset to run over. By default 1, specify 0 to run on everything. Some datasets are quite large. Feel free to start the transform, then re-run the same command to have it pick up where it left off. See the dashboard to monitor status.

If you wish, you can also use it as a library:

from atlas_object_partitioning.partition import partition_objects
from atlas_object_partitioning.scan_ds import scan_dataset

# Example: Partition a list of objects
data = [...]  # your data here
partitions = partition_objects(data, num_partitions=4)

# Scan a dataset
results = scan_dataset('object_counts.parquet')

Contributing

Contributions are welcome! Please open issues or pull requests on GitHub.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a pull request

License

This project is licensed under the terms of the MIT license. See LICENSE.txt for details.

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

atlas_object_partitioning-1.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

atlas_object_partitioning-1.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file atlas_object_partitioning-1.1.0.tar.gz.

File metadata

File hashes

Hashes for atlas_object_partitioning-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c21ef6856e5c28c3f3c2bd60040c9c782b3c221d016062eba899177f5a45e742
MD5 b097dff314904766b9213f937d597970
BLAKE2b-256 e322013ca136c7af14b2944e59662a4f4d84c776a46e8b998bfb39fdbe2f4dbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_object_partitioning-1.1.0.tar.gz:

Publisher: publish-to-pypi.yml on gordonwatts/object-partitioning

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atlas_object_partitioning-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for atlas_object_partitioning-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa620e3f6fbb86ce7c01890fdb60ddc13f946e5799d9f6f68287414b23ffd307
MD5 f09c0771b890e9890c83efb2e8d21daa
BLAKE2b-256 7f2f6b7ef68ebb1957d86e2493ff6886af81ecb0bf803b0bcebeb7a3497825dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_object_partitioning-1.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on gordonwatts/object-partitioning

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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