Skip to content

Commit

Permalink
chore: change name to hepconvert (#53)
Browse files Browse the repository at this point in the history
* Changed name in code

* formatting

* update new function

* more name changes and adjustments to docs

* Changed readthedocs setup

* fixing tests
  • Loading branch information
zbilodea authored Feb 2, 2024
1 parent ff97a75 commit 6de71ed
Show file tree
Hide file tree
Showing 46 changed files with 266 additions and 978 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# odapt
# hepconvert

[![Actions Status][actions-badge]][actions-link]
[![Documentation Status][rtd-badge]][rtd-link]
Expand All @@ -12,55 +12,55 @@
<!-- SPHINX-START -->

<!-- prettier-ignore-start -->
[actions-badge]: https://github.com/zbilodea/odapt/workflows/CI/badge.svg
[actions-link]: https://github.com/zbilodea/odapt/actions
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/odapt
[conda-link]: https://github.com/conda-forge/odapt-feedstock
[actions-badge]: https://github.com/zbilodea/hepconvert/workflows/CI/badge.svg
[actions-link]: https://github.com/zbilodea/hepconvert/actions
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/hepconvert
[conda-link]: https://github.com/conda-forge/hepconvert-feedstock
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
[github-discussions-link]: https://github.com/zbilodea/odapt/discussions
[pypi-link]: https://pypi.org/project/odapt/
[pypi-platforms]: https://img.shields.io/pypi/pyversions/odapt
[pypi-version]: https://img.shields.io/pypi/v/odapt
[rtd-badge]: https://readthedocs.org/projects/odapt/badge/?version=latest
[rtd-link]: https://odapt.readthedocs.io/en/latest/
[github-discussions-link]: https://github.com/zbilodea/hepconvert/discussions
[pypi-link]: https://pypi.org/project/hepconvert/
[pypi-platforms]: https://img.shields.io/pypi/pyversions/hepconvert
[pypi-version]: https://img.shields.io/pypi/v/hepconvert
[rtd-badge]: https://readthedocs.org/projects/hepconvert/badge/?version=latest
[rtd-link]: https://hepconvert.readthedocs.io/en/latest/

The odapt library is a bridge between columnar file formats, currently **ROOT, and Parquet** and soon eventually include **Feather, and HDF5.** It aims to simplify file conversions in Python, replacing what is usually a multi-step process with one line of code, with builtin features for managing large datasets and choosing compression levels.
The hepconvert library is a bridge between columnar file formats, currently **ROOT, and Parquet** and soon eventually include **Feather, and HDF5.** It aims to simplify file conversions in Python, replacing what is usually a multi-step process with one line of code, with builtin features for managing large datasets and choosing compression levels.

# Installation

odapt can be installed from [PyPI](https://pypi.org/project/odapt) using pip:
hepconvert can be installed from [PyPI](https://pypi.org/project/hepconvert) using pip:

```bash
pip install odapt
pip install hepconvert
```

# Getting started

```python
import odapt as od
import hepconvert

# To merge two or more root files with TTrees,
# and add together any histograms:
od.merge_root("destination.root",
hepconvert.merge_root("destination.root",
["ttree_file1.root", "ttree_file2.root"])


# To add merge files with only histograms:
od.add_histograms("destination.root",
# To add root files with only histograms:
hepconvert.add_histograms("destination.root",
["hist_file1.root", "hist_file2.root"])

```

To run ``hadd_and_merge`` from the command line:
To run ``merge_root`` from the command line:

```bash
odapt hadd-and-merge [options] [OUT_FILE] [IN_FILES]
hepconvert merge-root [options] [OUT_FILE] [IN_FILES]
```

To run ``hadd``:
To run ``add_histograms``:

```bash
odapt add [options] [OUT_FILE] [IN_FILES]
hepconvert add [options] [OUT_FILE] [IN_FILES]
```

Find details on each function's CLI options on the readthedocs.
Expand Down
6 changes: 4 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import os
import sys

sys.path.insert(0, os.path.abspath("../../odapt/"))
sys.path.insert(0, os.path.abspath("../../hepconvert/"))


project = "odapt"
project = "hepconvert"
copyright = "2023, Zoë Bilodeau"
author = "Zoë Bilodeau"
release = "1.1.1"
Expand All @@ -35,3 +35,5 @@

# Additional stuff
master_doc = "index"

# exec(open("prepare_docstrings.py").read(), dict(globals()))
6 changes: 6 additions & 0 deletions docs/source/hepconvert.copy_root.copy_root.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hepconvert.copy_root
====================

Defined in `hepconvert.copy_root <https://github.com/zbilodea/hepconvert/blob/5ac970e6e8c7118aa4ff53da106ed5cdd603e538/src/hepconvert/copy_root.py>`__ on `line 13 <https://github.com/zbilodea/hepconvert/blob/5ac970e6e8c7118aa4ff53da106ed5cdd603e538/src/hepconvert/copy_root.py#L13>`__.

.. autofunction:: hepconvert.copy_root.copy_root
6 changes: 6 additions & 0 deletions docs/source/hepconvert.copy_root.toctree
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. toctree::
:caption: copy_root
:hidden:

hepconvert.copy_root (module) <hepconvert.copy_root>
hepconvert.copy_root.copy_root <hepconvert.copy_root.copy_root>
6 changes: 6 additions & 0 deletions docs/source/hepconvert.histogram_adding.add_histograms.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hepconvert.add_histograms
=========================

Defined in `hepconvert.histogram_adding <https://github.com/zbilodea/hepconvert/blob/5ac970e6e8c7118aa4ff53da106ed5cdd603e538/src/hepconvert/histogram_adding.py>`__ on `line 374 <https://github.com/zbilodea/hepconvert/blob/5ac970e6e8c7118aa4ff53da106ed5cdd603e538/src/hepconvert/histogram_adding.py#L374>`__.

.. autofunction:: hepconvert.histogram_adding.add_histograms
6 changes: 6 additions & 0 deletions docs/source/hepconvert.histogram_adding.toctree
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. toctree::
:caption: histogram_adding
:hidden:

hepconvert.histogram_adding (module) <hepconvert.histogram_adding>
hepconvert.histogram_adding.add_histograms <hepconvert.histogram_adding.add_histograms>
6 changes: 6 additions & 0 deletions docs/source/hepconvert.merge.merge_root.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hepconvert.merge_root
=====================

Defined in `hepconvert.merge <https://github.com/zbilodea/hepconvert/blob/5ac970e6e8c7118aa4ff53da106ed5cdd603e538/src/hepconvert/merge.py>`__ on `line 11 <https://github.com/zbilodea/hepconvert/blob/5ac970e6e8c7118aa4ff53da106ed5cdd603e538/src/hepconvert/merge.py#L11>`__.

.. autofunction:: hepconvert.merge.merge_root
6 changes: 6 additions & 0 deletions docs/source/hepconvert.merge.toctree
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. toctree::
:caption: merge
:hidden:

hepconvert.merge (module) <hepconvert.merge>
hepconvert.merge.merge_root <hepconvert.merge.merge_root>
6 changes: 6 additions & 0 deletions docs/source/hepconvert.parquet_to_root.parquet_to_root.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hepconvert.parquet_to_root
==========================

Defined in `hepconvert.parquet_to_root <https://github.com/zbilodea/hepconvert/blob/5ac970e6e8c7118aa4ff53da106ed5cdd603e538/src/hepconvert/parquet_to_root.py>`__ on `line 9 <https://github.com/zbilodea/hepconvert/blob/5ac970e6e8c7118aa4ff53da106ed5cdd603e538/src/hepconvert/parquet_to_root.py#L9>`__.

.. autofunction:: hepconvert.parquet_to_root.parquet_to_root
6 changes: 6 additions & 0 deletions docs/source/hepconvert.parquet_to_root.toctree
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. toctree::
:caption: parquet_to_root
:hidden:

hepconvert.parquet_to_root (module) <hepconvert.parquet_to_root>
hepconvert.parquet_to_root.parquet_to_root <hepconvert.parquet_to_root.parquet_to_root>
6 changes: 6 additions & 0 deletions docs/source/hepconvert.root_to_parquet.root_to_parquet.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hepconvert.root_to_parquet
==========================

Defined in `hepconvert.root_to_parquet <https://github.com/zbilodea/hepconvert/blob/5ac970e6e8c7118aa4ff53da106ed5cdd603e538/src/hepconvert/root_to_parquet.py>`__ on `line 9 <https://github.com/zbilodea/hepconvert/blob/5ac970e6e8c7118aa4ff53da106ed5cdd603e538/src/hepconvert/root_to_parquet.py#L9>`__.

.. autofunction:: hepconvert.root_to_parquet.root_to_parquet
6 changes: 6 additions & 0 deletions docs/source/hepconvert.root_to_parquet.toctree
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. toctree::
:caption: root_to_parquet
:hidden:

hepconvert.root_to_parquet (module) <hepconvert.root_to_parquet>
hepconvert.root_to_parquet.root_to_parquet <hepconvert.root_to_parquet.root_to_parquet>
6 changes: 6 additions & 0 deletions docs/source/hepconvert.toctree
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. toctree::
:caption: Detailed Reference
:hidden:

hepconvert (module) <hepconvert>
hepconvert.merge.merge_root
18 changes: 9 additions & 9 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. odapt documentation master file, created by
.. hepconvert documentation master file, created by
sphinx-quickstart on Tue Dec 5 14:19:03 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Expand All @@ -10,28 +10,28 @@
:hidden:


Welcome to odapt's documentation!
=================================
Welcome to hepconvert's documentation!
======================================

``odapt`` is an easy-to-use converter tool for columnar file formats ROOT, Parquet, Feather, and HDF5.
``hepconvert`` is an easy-to-use converter tool for columnar file formats ROOT, Parquet, Feather, and HDF5.
This package aims to allow users to higher control of file conversions (memory management, compression settings, etc.)
all from one function call. We are adding new features at user request, so please share your ideas on our
`github page <https://github.com/zbilodea/odapt/discussions/categories/ideas>`__!
`github page <https://github.com/zbilodea/hepconvert/discussions/categories/ideas>`__!

How to install
==============
odapt can be installed `from PyPI <https://pypi.org/project/odapt>`__ using pip.
hepconvert can be installed `from PyPI <https://pypi.org/project/hepconvert>`__ using pip.

.. code-block:: bash
pip install odapt
pip install hepconvert
odapt is not yet available using conda.
hepconvert is not yet available using conda.

Motivation
**********
Many users are all writing similar blocks of code each time they need to convert columnar files. It takes time to learn how to use different I/O packages,
write code, and work through bugs that may come up in this sometimes finicky process. ``odapt`` allows users to find and call just one function.
write code, and work through bugs that may come up in this sometimes finicky process. ``hepconvert`` allows users to find and call just one function.

Limitations:
************
Expand Down
10 changes: 5 additions & 5 deletions docs/source/main.toctree
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
:caption: Main Interface
:hidden:

odapt.parquet_to_root.parquet_to_root
odapt.root_to_parquet.root_to_parquet
odapt.copy_root.copy_root
odapt.merge.hadd_and_merge
odapt.histogram_adding.hadd
hepconvert.parquet_to_root.parquet_to_root
hepconvert.root_to_parquet.root_to_parquet
hepconvert.copy_root.copy_root
hepconvert.merge.merge_root
hepconvert.histogram_adding.add_histograms
6 changes: 0 additions & 6 deletions docs/source/odapt.copy_root.copy_root.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/odapt.copy_root.toctree

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/odapt.histogram_adding.hadd.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/odapt.histogram_adding.toctree

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/odapt.merge.hadd_and_merge.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/odapt.merge.toctree

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/odapt.parquet_to_root.parquet_to_root.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/odapt.parquet_to_root.toctree

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/odapt.root_to_parquet.root_to_parquet.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/odapt.root_to_parquet.toctree

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/odapt.toctree

This file was deleted.

Loading

0 comments on commit 6de71ed

Please sign in to comment.