Skip to content

Commit cd6a3fc

Browse files
Merge pull request #136 from nasa/release/1.2.0
Release/1.2.0
2 parents a8c6d20 + 9946101 commit cd6a3fc

20 files changed

+703
-112
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "monthly"
7+
groups:
8+
pip-dependencies:
9+
patterns:
10+
- "*"
711
# Raise pull requests for version updates
812
# to pip against the `develop` branch
913
target-branch: "develop"
1014
- package-ecosystem: "github-actions"
1115
directory: "/"
1216
schedule:
1317
interval: "monthly"
18+
groups:
19+
gha-dependencies:
20+
patterns:
21+
- "*"
1422
target-branch: "develop"

.pre-commit-config.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
---
1+
ci:
2+
autoupdate_schedule: "monthly" # Like dependabot
3+
autoupdate_commit_msg: "chore: update pre-commit hooks"
4+
autoupdate_branch: "develop"
5+
autofix_prs: false # Comment "pre-commit.ci autofix" on a PR to trigger
6+
27
repos:
38
- repo: https://github.com/pre-commit/pre-commit-hooks
49
rev: v4.6.0
@@ -15,7 +20,7 @@ repos:
1520
1621
- repo: https://github.com/astral-sh/ruff-pre-commit
1722
# Ruff version.
18-
rev: 'v0.4.2'
23+
rev: 'v0.4.10'
1924
hooks:
2025
- id: ruff
2126
args: [ "--fix" ]

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [unreleased]
8+
9+
### Added
10+
- [issue #127](https://github.com/nasa/batchee/issues/127): Group dependabot updates into fewer PRs
11+
- [issue #129](https://github.com/nasa/batchee/issues/129): Add autoupdate schedule for pre-commit
12+
### Changed
13+
- [issue #128](https://github.com/nasa/batchee/issues/128): Increase continuous integration/unit test coverage
14+
### Deprecated
15+
### Removed
16+
### Fixed
17+
718
## [1.1.0]
819

920
### Added

batcher/harmony/service_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def process_catalog(self, catalog: pystac.Catalog) -> list[pystac.Catalog]:
125125
_get_output_date_range([item]),
126126
)
127127
output_item.add_asset(
128-
f"data_{idx}",
128+
"data",
129129
Asset(
130130
_get_item_url(item),
131131
title=_get_item_url(item),

batcher/tempo_filename_parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import logging
2929
import re
3030
from argparse import ArgumentParser
31-
from pathlib import Path
3231

3332
default_logger = logging.getLogger(__name__)
3433

@@ -99,7 +98,7 @@ def main() -> list[list[str]]:
9998
if args.verbose:
10099
logging.basicConfig(level=logging.DEBUG)
101100

102-
input_filenames = [str(Path(f).resolve()) for f in args.file_names]
101+
input_filenames = args.file_names
103102

104103
batch_indices = get_batch_indices(input_filenames)
105104
unique_category_indices: list[int] = sorted(set(batch_indices), key=batch_indices.index)

poetry.lock

Lines changed: 106 additions & 106 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "batchee"
3-
version = "1.1.0"
3+
version = "1.2.0rc1"
44
description = "Determine how to group together input files into batches for subsequent concatenation"
55
authors = ["Daniel Kaufman <daniel.kaufman@nasa.gov>"]
66
readme = "README.md"

tests/conftest.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from pathlib import Path
2+
3+
import pytest
4+
5+
6+
def pytest_addoption(parser):
7+
"""Sets up optional argument to keep temporary testing directory."""
8+
parser.addoption(
9+
"--keep-tmp",
10+
action="store_true",
11+
help="Keep temporary directory after testing. Useful for debugging.",
12+
)
13+
14+
15+
@pytest.fixture(scope="class")
16+
def pass_options(request):
17+
"""Adds optional argument to a test class."""
18+
request.cls.KEEP_TMP = request.config.getoption("--keep-tmp")
19+
20+
21+
@pytest.fixture(scope="function", autouse=True)
22+
def temp_output_dir(tmpdir_factory) -> Path:
23+
return Path(tmpdir_factory.mktemp("tmp-"))

tests/data/harmony/message.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"sources": [{
3+
"collection": "C1234088182-EEDTEST"
4+
}],
5+
"format": {
6+
"mime": "application/x-netcdf4"
7+
},
8+
"subset": {},
9+
"requestId": "00001111-2222-3333-4444-555566667777",
10+
"user": "jdoe",
11+
"client": "harmony-example",
12+
"isSynchronous": false,
13+
"stagingLocation": "s3://example-bucket/public/some-org/some-service/some-uuid/",
14+
"callback": "http://localhost/some-path",
15+
"version": "0.10.0"
16+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"stac_version": "1.0.0-beta.2",
3+
"stac_extensions": [],
4+
"id": "cfc32383-cfd1-4e43-8d5f-55f539b6fa59",
5+
"links": [
6+
{
7+
"rel": "harmony_source",
8+
"href": "https://cmr.uat.earthdata.nasa.gov/search/concepts/C1234088182-EEDTEST"
9+
},
10+
{
11+
"rel": "item",
12+
"href": "./granule_S012G01.json",
13+
"type": "application/json",
14+
"title": "granule_S012G01"
15+
},
16+
{
17+
"rel": "item",
18+
"href": "./granule_S012G02.json",
19+
"type": "application/json",
20+
"title": "granule_S012G02"
21+
},
22+
{
23+
"rel": "item",
24+
"href": "./granule_S013G01.json",
25+
"type": "application/json",
26+
"title": "granule_S013G01"
27+
},
28+
{
29+
"rel": "item",
30+
"href": "./granule_S013G02.json",
31+
"type": "application/json",
32+
"title": "granule_S013G02"
33+
},
34+
{
35+
"rel": "item",
36+
"href": "./granule_S014G01.json",
37+
"type": "application/json",
38+
"title": "granule_S014G01"
39+
},
40+
{
41+
"rel": "item",
42+
"href": "./granule_S014G02.json",
43+
"type": "application/json",
44+
"title": "granule_S014G02"
45+
}
46+
],
47+
"description": "CMR Granules for C1234088182-EEDTEST batch 1"
48+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"stac_version": "1.0.0-beta.2",
3+
"stac_extensions": [],
4+
"id": "cfc32383-cfd1-4e43-8d5f-55f539b6fa59",
5+
"links": [
6+
{
7+
"rel": "harmony_source",
8+
"href": "https://cmr.uat.earthdata.nasa.gov/search/concepts/C1234088182-EEDTEST"
9+
},
10+
{
11+
"rel": "item",
12+
"href": "./granule_S012G01.json",
13+
"type": "application/json",
14+
"title": "granule_S012G01"
15+
},
16+
{
17+
"rel": "item",
18+
"href": "./granule_S012G02.json",
19+
"type": "application/json",
20+
"title": "granule_S012G02"
21+
},
22+
{
23+
"rel": "item",
24+
"href": "./granule_S013G01.json",
25+
"type": "application/json",
26+
"title": "granule_S013G01"
27+
},
28+
{
29+
"rel": "next",
30+
"href": "tests/data/harmony/source/catalog1.json",
31+
"type": "application/json",
32+
"title": "Next page"
33+
}
34+
],
35+
"description": "CMR Granules for C1234088182-EEDTEST batch 1"
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"stac_version": "1.0.0-beta.2",
3+
"stac_extensions": [],
4+
"id": "cfc32383-cfd1-4e43-8d5f-55f539b6fa59",
5+
"links": [
6+
{
7+
"rel": "harmony_source",
8+
"href": "https://cmr.uat.earthdata.nasa.gov/search/concepts/C1234088182-EEDTEST"
9+
},
10+
{
11+
"rel": "item",
12+
"href": "./granule_S013G02.json",
13+
"type": "application/json",
14+
"title": "granule_S013G02"
15+
},
16+
{
17+
"rel": "item",
18+
"href": "./granule_S014G01.json",
19+
"type": "application/json",
20+
"title": "granule_S014G01"
21+
},
22+
{
23+
"rel": "item",
24+
"href": "./granule_S014G02.json",
25+
"type": "application/json",
26+
"title": "granule_S014G02"
27+
},
28+
{
29+
"rel": "prev",
30+
"href": "tests/data/harmony/source/catalog0.json",
31+
"type": "application/json",
32+
"title": "Previous page"
33+
}
34+
],
35+
"description": "CMR Granules for C1234088182-EEDTEST batch 2"
36+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"stac_version": "1.0.0-beta.2",
3+
"stac_extensions": [],
4+
"id": "51d02b24-d00e-4640-9887-05f98f6b96d8",
5+
"type": "Feature",
6+
"links": [],
7+
"properties": {
8+
"start_datetime": "2020-01-02T00:00:00.000Z",
9+
"end_datetime": "2020-01-02T23:59:59.000Z"
10+
},
11+
"bbox": [1, 3, 1, 3],
12+
"geometry": {
13+
"type": "Polygon",
14+
"coordinates": [
15+
[
16+
[
17+
-179.95,
18+
-89.95
19+
],
20+
[
21+
-179.95,
22+
89.95
23+
],
24+
[
25+
179.95,
26+
89.95
27+
],
28+
[
29+
179.95,
30+
-89.95
31+
],
32+
[
33+
-179.95,
34+
-89.95
35+
]
36+
]
37+
]
38+
},
39+
"assets": {
40+
"data": {
41+
"href": "file://tests/data/harmony/granules/TEMPO_NO2_L2_V03_20240601T120101Z_S012G01.nc",
42+
"title": "TEMPO_NO2_L2_V03_20240601T120101Z_S012G01.nc",
43+
"type": "application/x-netcdf4",
44+
"roles": [
45+
"data"
46+
]
47+
}
48+
}
49+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"stac_version": "1.0.0-beta.2",
3+
"stac_extensions": [],
4+
"id": "21eb7dc5-7a9d-4374-9a88-12451ba653ef",
5+
"type": "Feature",
6+
"links": [],
7+
"properties": {
8+
"start_datetime": "2020-01-03T00:00:00.000Z",
9+
"end_datetime": "2020-01-03T23:59:59.000Z"
10+
},
11+
"bbox": [-1, -3, -1, -3],
12+
"geometry": {
13+
"type": "Polygon",
14+
"coordinates": [
15+
[
16+
[
17+
-179.95,
18+
-89.95
19+
],
20+
[
21+
-179.95,
22+
89.95
23+
],
24+
[
25+
179.95,
26+
89.95
27+
],
28+
[
29+
179.95,
30+
-89.95
31+
],
32+
[
33+
-179.95,
34+
-89.95
35+
]
36+
]
37+
]
38+
},
39+
"assets": {
40+
"data": {
41+
"href": "file://tests/data/harmony/granules/TEMPO_NO2_L2_V03_20240601T120107Z_S012G02.nc",
42+
"title": "TEMPO_NO2_L2_V03_20240601T120107Z_S012G02.nc",
43+
"type": "application/x-netcdf4",
44+
"roles": [
45+
"data"
46+
]
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)