Skip to content

Commit

Permalink
Merge pull request #133 from FAST-HEP/BK_prep-help-for-fast-flow
Browse files Browse the repository at this point in the history
Use help module now included in fast-flow
  • Loading branch information
benkrikler authored Aug 19, 2020
2 parents c073228 + c8ba88d commit fa90ba6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 107 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ All notable changes to this project will be documented in this file.
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.19.0] - 2020-08-19
### Added
- Put a tarball with book-keeping data in output directory, PR #131 [@BenKrikler](httsp://github.com/benkrikler)
- Add Dask and Parsl backends from Coffea and support execution configuration via YAML, PR #129 [@BenKrikler](https://github.com/benkrikler) and [@asnaylor](https://github.com/asnaylor)

### Fixed
- Pin alphatwirl explicitly to 0.25.5, PR #130

### Removed
- Removed help module from carpenter and moved to fast-flow, PR #131 [@BenKrikler](https://github.com/benkrikler)

## [0.18.2] - 2020-07-01
### Added
- Add option to BinnedDataframe to apply weights to data like MC, PR #127 [@BenKrikler](https://github.com/benkrikler)
Expand Down
19 changes: 7 additions & 12 deletions fast_carpenter/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Chop up those trees into nice little tables and dataframes
"""
from __future__ import print_function
from . import known_stages
import os
import sys
from .help import help_stages
import fast_flow.v1 as fast_flow
from fast_flow.help import argparse_help_stages
import fast_curator
import logging
from .backends import get_backend
Expand All @@ -16,13 +16,7 @@


def create_parser():
from argparse import ArgumentParser, Action

class StagesHelp(Action):
def __call__(self, parser, namespace, values, option_string=None):
full_output = option_string == "--help-stages-full"
help_stages(values, full_output=full_output)
sys.exit(0)
from argparse import ArgumentParser

parser = ArgumentParser(description=__doc__)
parser.add_argument("dataset_cfg", type=str,
Expand All @@ -48,10 +42,11 @@ def __call__(self, parser, namespace, values, option_string=None):
parser.add_argument("--execution-cfg", "-e", default=None,
help="A configuration file for the execution system. The exact format "
"and contents of this file will depend on the value of the `--mode` option.")
parser.add_argument("--help-stages", nargs="?", default=None, action=StagesHelp,
metavar="stage-name-regex",
parser.add_argument("--help-stages", metavar="stage-name-regex", nargs="?", default=None,
action=argparse_help_stages(known_stages, "fast_carpenter", full_output=False),
help="Print help specific to the available stages")
parser.add_argument("--help-stages-full", action=StagesHelp, metavar="stage",
parser.add_argument("--help-stages-full", metavar="stage",
action=argparse_help_stages(known_stages, "fast_carpenter", full_output=True),
help="Print the full help specific to the available stages")
parser.add_argument("-v", "--version", action="version", version='%(prog)s ' + __version__)
parser.add_argument("--bookkeeping", default=True, action='store_true',
Expand Down
92 changes: 0 additions & 92 deletions fast_carpenter/help.py

This file was deleted.

2 changes: 1 addition & 1 deletion fast_carpenter/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ def split_version(version):
return tuple(result)


__version__ = '0.18.2'
__version__ = '0.19.0'
version_info = split_version(__version__) # noqa
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.18.2
current_version = 0.19.0
commit = True
tag = False

Expand Down

0 comments on commit fa90ba6

Please sign in to comment.