Skip to content

Commit

Permalink
Merge pull request #111 from FAST-HEP/BK_prep_v0.17
Browse files Browse the repository at this point in the history
Prepare for v0.17
  • Loading branch information
benkrikler authored Feb 16, 2020
2 parents 19cade7 + 01c2431 commit 077a1d9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.17.0] - 2020-02-16
### Add
- New stage: Event-by-Event dataframes (like a skim), PR #108 [@davignon](https://github.com/davignon/)

## [0.16.1] - 2020-02-16
### Fixed
- Unit test that was broken by Pandas >1.0.0
Expand Down
5 changes: 3 additions & 2 deletions fast_carpenter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .define.variables import Define
from .define.systematics import SystematicWeights
from .selection.stage import CutFlow, SelectPhaseSpace
from .summary import BinnedDataframe, BuildAghast
from .summary import BinnedDataframe, BuildAghast, EventByEventDataframe
from .version import __version__, version_info


Expand All @@ -19,4 +19,5 @@


known_stages = [Define, SystematicWeights, CutFlow,
SelectPhaseSpace, BinnedDataframe, BuildAghast]
SelectPhaseSpace, BinnedDataframe, BuildAghast,
EventByEventDataframe]
3 changes: 2 additions & 1 deletion fast_carpenter/summary/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .binned_dataframe import BinnedDataframe
from .event_level_dataframe import EventByEventDataframe
from .aghast import BuildAghast

__all__ = ["BuildAghast", "BinnedDataframe"]
__all__ = ["BuildAghast", "BinnedDataframe", "EventByEventDataframe"]
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def _merge_dataframes(self, dataset_readers_list):


class EventByEventDataframe(object):
"""
Write out a pandas dataframe with event-level values
"""

def __init__(self, name, out_dir, collections, mask=None, flatten=True):

Expand Down
6 changes: 6 additions & 0 deletions tests/summary/test_event_level_dataframe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import fast_carpenter.summary.event_level_dataframe as edf


def test_EventByEventDataframe(tmpdir):
# TODO: Make this a proper set of tests
assert hasattr(edf, "Collector")

0 comments on commit 077a1d9

Please sign in to comment.