|
1 | 1 | <p align="center"> |
2 | | - <img alt="batchee, a python package for grouping together filenames to enable subsequent batched operations (such as concatenation)." |
| 2 | + <img alt="Batchee logo" |
3 | 3 | src="https://github.com/danielfromearth/batchee/assets/114174502/8b1a92a5-eccc-4674-9c00-3698e752077e" width="250" |
4 | 4 | /> |
5 | 5 | </p> |
|
15 | 15 | <img src="https://img.shields.io/pypi/pyversions/batchee.svg" alt="Python Versions"> |
16 | 16 | </a> |
17 | 17 | <a href="https://pypi.org/project/batchee" target="_blank"> |
18 | | - <img src="https://img.shields.io/pypi/v/batchee?color=%2334D058label=pypi%20package" alt="Package version"> |
| 18 | + <img src="https://img.shields.io/pypi/v/batchee?color=%2334D058&label=pypi%20package" alt="Package version"> |
19 | 19 | </a> |
20 | 20 | <a href="https://codecov.io/gh/nasa/batchee"> |
21 | 21 | <img src="https://codecov.io/gh/nasa/batchee/graph/badge.svg?token=WDj92iN7c4" alt="Code coverage"> |
|
26 | 26 |
|
27 | 27 |
|
28 | 28 | # Overview |
29 | | -_____ |
30 | 29 |
|
31 | | -_Batchee_ groups together filenames so that further operations (such as concatenation) can be performed separately on each group of files. |
| 30 | +**Batchee** is a Python package that intelligently groups filenames together, enabling efficient batch operations like concatenation. |
32 | 31 |
|
33 | | -## Installing |
34 | | -_____ |
| 32 | +### What does it do? |
35 | 33 |
|
36 | | -For local development, one can clone the repository and then use poetry or pip from the local directory: |
| 34 | +Batchee analyzes filename patterns and groups related files together. |
| 35 | +For example (_note that these are pseudo-real, not actual, TEMPO file names_): |
| 36 | + |
| 37 | +```shell |
| 38 | +batchee TEMPO_NO2_L2_S006G01.nc TEMPO_NO2_L2_S006G02.nc TEMPO_NO2_L2_S007G08.nc TEMPO_NO2_L2_S007G09.nc |
| 39 | +``` |
| 40 | + |
| 41 | +**Output:** |
| 42 | +- `TEMPO_NO2_L2_S006G01.nc`, `TEMPO_NO2_L2_S006G02.nc` → Group 1 (scan 6) |
| 43 | +- `TEMPO_NO2_L2_S007G08.nc`, `TEMPO_NO2_L2_S007G09.nc` → Group 2 (scan 7) |
| 44 | + |
| 45 | +This enables batch processing operations on each group separately. |
| 46 | + |
| 47 | +### Key Features |
| 48 | +- Automatic filename grouping based on configurable patterns |
| 49 | +- Command-line interface and Python API for integration with NASA Harmony service orchestrator |
| 50 | +- Verbose logging for debugging |
| 51 | + |
| 52 | +## Installation |
| 53 | + |
| 54 | +### From PyPI (Recommended) |
| 55 | +```shell |
| 56 | +pip install batchee |
| 57 | +``` |
| 58 | + |
| 59 | +### From Source (Development) |
| 60 | + |
| 61 | +For local development or the latest features: |
37 | 62 |
|
38 | 63 | ```shell |
39 | 64 | git clone <Repository URL> |
| 65 | +cd batchee |
40 | 66 | ``` |
41 | 67 |
|
42 | | -###### (Option A) using poetry: |
43 | | -i) Follow the instructions for installing `poetry` [here](https://python-poetry.org/docs/). |
| 68 | +**(Option A) using poetry (Recommended for development):** |
| 69 | + |
| 70 | +```shell |
| 71 | +# Install poetry: https://python-poetry.org/docs/ |
| 72 | +poetry install |
| 73 | +``` |
44 | 74 |
|
45 | | -ii) Run ```poetry install``` from the repository directory. |
| 75 | +**(Option B) using pip:** |
46 | 76 |
|
47 | | -###### (Option B) using pip: Run ```pip install .``` from the repository directory. |
| 77 | +```shell |
| 78 | +pip install . |
| 79 | +``` |
48 | 80 |
|
49 | 81 | ## Usage |
50 | | -_____ |
| 82 | + |
| 83 | +### Basic Usage |
51 | 84 |
|
52 | 85 | ```shell |
53 | 86 | batchee [file_names ...] |
54 | 87 | ``` |
55 | 88 |
|
56 | | -###### Or, If installed using a `poetry` environment: |
| 89 | +### With Poetry (if installed via poetry) |
57 | 90 | ```shell |
58 | 91 | poetry run batchee [file_names ...] |
59 | 92 | ``` |
60 | 93 |
|
61 | | -#### Options |
| 94 | +### Options |
| 95 | + |
| 96 | +- **`-h, --help`** - Show help message and exit |
| 97 | +- **`-v, --verbose`** - Enable verbose output to stdout; useful for debugging |
| 98 | + |
| 99 | +## Contributing |
| 100 | + |
| 101 | +Issues and pull requests welcome on [GitHub](https://github.com/nasa/batchee/). |
| 102 | + |
| 103 | +## License & Attribution |
62 | 104 |
|
63 | | -- `-h`, `--help` show this help message and exit |
64 | | -- `-v`, `--verbose` Enable verbose output to stdout; useful for debugging |
| 105 | +Batchee is released under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0). |
65 | 106 |
|
66 | | ---- |
67 | 107 | This package is NASA Software Release Authorization (SRA) # LAR-20440-1 |
0 commit comments