Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.2.0 #136

Merged
merged 48 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c8a9d19
---
dependabot[bot] May 21, 2024
bbf5e2b
Bump pytest from 8.2.0 to 8.2.1
dependabot[bot] Jun 1, 2024
cee5eef
Bump harmony-service-lib from 1.0.26 to 1.0.27
dependabot[bot] Jun 1, 2024
7c82f78
Bump coverage from 7.5.0 to 7.5.3
dependabot[bot] Jun 1, 2024
d83df14
Bump ruff from 0.4.2 to 0.4.7
dependabot[bot] Jun 1, 2024
ec9dc8e
Merge pull request #126 from nasa/dependabot/pip/develop/ruff-0.4.7
danielfromearth Jun 3, 2024
6207a20
/version 0.1.1a7
Jun 3, 2024
731a1a9
Merge pull request #123 from nasa/dependabot/pip/develop/pytest-8.2.1
danielfromearth Jun 4, 2024
f6c750e
/version 0.1.1a8
Jun 4, 2024
2075899
Merge branch 'develop' into dependabot/pip/requests-2.32.0
danielfromearth Jun 17, 2024
b0f94e6
Merge pull request #122 from nasa/dependabot/pip/requests-2.32.0
danielfromearth Jun 17, 2024
3e3fe3c
/version 1.1.1a0
Jun 17, 2024
ed0c03e
Merge pull request #125 from nasa/dependabot/pip/develop/coverage-7.5.3
danielfromearth Jun 17, 2024
767d1bd
/version 1.1.1a1
Jun 17, 2024
01fc1d0
Bump urllib3 from 1.26.18 to 1.26.19
dependabot[bot] Jun 18, 2024
d7565f0
Merge pull request #130 from nasa/dependabot/pip/urllib3-1.26.19
danielfromearth Jun 18, 2024
1dc4736
/version 1.1.1a2
Jun 18, 2024
50a8392
Merge pull request #124 from nasa/dependabot/pip/develop/harmony-serv…
danielfromearth Jun 18, 2024
7b0b134
/version 1.1.1a3
Jun 18, 2024
6bc45d5
group dependabot updates into one PR
danielfromearth Jun 20, 2024
f6e4685
update CHANGELOG.md
danielfromearth Jun 20, 2024
a8d9489
Merge pull request #131 from nasa/feature-issue-127-group-dependabot-…
danielfromearth Jun 20, 2024
b399fad
/version 1.1.1a4
Jun 20, 2024
07cd436
add autoupdate schedule to pre-commit config
danielfromearth Jun 24, 2024
fbf83fa
update CHANGELOG.md
danielfromearth Jun 24, 2024
8ccea12
use 'develop' branch for pre-commit autoupdate
danielfromearth Jun 24, 2024
626d484
Merge pull request #132 from nasa/feature/issue-129-add-autoupdate-fo…
danielfromearth Jun 24, 2024
d0e3fa8
/version 1.1.1a5
Jun 24, 2024
e8429e0
Bump urllib3 from 1.26.18 to 1.26.19
dependabot[bot] Jun 24, 2024
17d5bb9
Merge pull request #133 from nasa/dependabot/pip/urllib3-1.26.19
danielfromearth Jun 24, 2024
9b03527
/version 1.1.1a6
Jun 24, 2024
91b7cb4
Bump requests from 2.31.0 to 2.32.2
dependabot[bot] Jun 24, 2024
5e6d1ce
Merge branch 'develop' into dependabot/pip/requests-2.32.2
danielfromearth Jun 24, 2024
3104b8d
Merge pull request #134 from nasa/dependabot/pip/requests-2.32.2
danielfromearth Jun 24, 2024
96e5cc2
/version 1.1.1a7
Jun 24, 2024
cba30b1
don't resolve paths at the command line
danielfromearth Jun 24, 2024
216b319
don't append an index to the "data" asset in a new STAC item
danielfromearth Jun 24, 2024
be659c8
add test of the basic cli
danielfromearth Jun 24, 2024
330ea6b
add temporary directory fixture for pytest
danielfromearth Jun 24, 2024
75b8ace
add mocked test for using batchee's harmony adapter
danielfromearth Jun 24, 2024
1ccd4ba
update CHANGELOG.md
danielfromearth Jun 24, 2024
62a7b79
preprend with 'tests/' pathing
danielfromearth Jun 24, 2024
a1aacc9
update poetry.lock
danielfromearth Jun 24, 2024
a845b44
autoupdate pre-commit
danielfromearth Jun 24, 2024
f5e9d46
Merge branch 'develop' into feature/issue1-28-increase-test-coverage
danielfromearth Jun 24, 2024
39698ec
Merge pull request #135 from nasa/feature/issue1-28-increase-test-cov…
danielfromearth Jun 27, 2024
dffcbf5
/version 1.1.1a8
Jun 27, 2024
9946101
/version 1.2.0rc1
Jun 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ updates:
directory: "/"
schedule:
interval: "monthly"
groups:
pip-dependencies:
patterns:
- "*"
# Raise pull requests for version updates
# to pip against the `develop` branch
target-branch: "develop"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
gha-dependencies:
patterns:
- "*"
target-branch: "develop"
9 changes: 7 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
ci:
autoupdate_schedule: "monthly" # Like dependabot
autoupdate_commit_msg: "chore: update pre-commit hooks"
autoupdate_branch: "develop"
autofix_prs: false # Comment "pre-commit.ci autofix" on a PR to trigger

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand All @@ -15,7 +20,7 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.4.2'
rev: 'v0.4.10'
hooks:
- id: ruff
args: [ "--fix" ]
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ 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]

### Added
- [issue #127](https://github.com/nasa/batchee/issues/127): Group dependabot updates into fewer PRs
- [issue #129](https://github.com/nasa/batchee/issues/129): Add autoupdate schedule for pre-commit
### Changed
- [issue #128](https://github.com/nasa/batchee/issues/128): Increase continuous integration/unit test coverage
### Deprecated
### Removed
### Fixed

## [1.1.0]

### Added
Expand Down
2 changes: 1 addition & 1 deletion batcher/harmony/service_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def process_catalog(self, catalog: pystac.Catalog) -> list[pystac.Catalog]:
_get_output_date_range([item]),
)
output_item.add_asset(
f"data_{idx}",
"data",
Asset(
_get_item_url(item),
title=_get_item_url(item),
Expand Down
3 changes: 1 addition & 2 deletions batcher/tempo_filename_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import logging
import re
from argparse import ArgumentParser
from pathlib import Path

default_logger = logging.getLogger(__name__)

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

input_filenames = [str(Path(f).resolve()) for f in args.file_names]
input_filenames = args.file_names

batch_indices = get_batch_indices(input_filenames)
unique_category_indices: list[int] = sorted(set(batch_indices), key=batch_indices.index)
Expand Down
212 changes: 106 additions & 106 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "batchee"
version = "1.1.0"
version = "1.2.0rc1"
description = "Determine how to group together input files into batches for subsequent concatenation"
authors = ["Daniel Kaufman <daniel.kaufman@nasa.gov>"]
readme = "README.md"
Expand Down
23 changes: 23 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from pathlib import Path

import pytest


def pytest_addoption(parser):
"""Sets up optional argument to keep temporary testing directory."""
parser.addoption(
"--keep-tmp",
action="store_true",
help="Keep temporary directory after testing. Useful for debugging.",
)


@pytest.fixture(scope="class")
def pass_options(request):
"""Adds optional argument to a test class."""
request.cls.KEEP_TMP = request.config.getoption("--keep-tmp")


@pytest.fixture(scope="function", autouse=True)
def temp_output_dir(tmpdir_factory) -> Path:
return Path(tmpdir_factory.mktemp("tmp-"))
16 changes: 16 additions & 0 deletions tests/data/harmony/message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"sources": [{
"collection": "C1234088182-EEDTEST"
}],
"format": {
"mime": "application/x-netcdf4"
},
"subset": {},
"requestId": "00001111-2222-3333-4444-555566667777",
"user": "jdoe",
"client": "harmony-example",
"isSynchronous": false,
"stagingLocation": "s3://example-bucket/public/some-org/some-service/some-uuid/",
"callback": "http://localhost/some-path",
"version": "0.10.0"
}
48 changes: 48 additions & 0 deletions tests/data/harmony/source/catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"stac_version": "1.0.0-beta.2",
"stac_extensions": [],
"id": "cfc32383-cfd1-4e43-8d5f-55f539b6fa59",
"links": [
{
"rel": "harmony_source",
"href": "https://cmr.uat.earthdata.nasa.gov/search/concepts/C1234088182-EEDTEST"
},
{
"rel": "item",
"href": "./granule_S012G01.json",
"type": "application/json",
"title": "granule_S012G01"
},
{
"rel": "item",
"href": "./granule_S012G02.json",
"type": "application/json",
"title": "granule_S012G02"
},
{
"rel": "item",
"href": "./granule_S013G01.json",
"type": "application/json",
"title": "granule_S013G01"
},
{
"rel": "item",
"href": "./granule_S013G02.json",
"type": "application/json",
"title": "granule_S013G02"
},
{
"rel": "item",
"href": "./granule_S014G01.json",
"type": "application/json",
"title": "granule_S014G01"
},
{
"rel": "item",
"href": "./granule_S014G02.json",
"type": "application/json",
"title": "granule_S014G02"
}
],
"description": "CMR Granules for C1234088182-EEDTEST batch 1"
}
36 changes: 36 additions & 0 deletions tests/data/harmony/source/catalog0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"stac_version": "1.0.0-beta.2",
"stac_extensions": [],
"id": "cfc32383-cfd1-4e43-8d5f-55f539b6fa59",
"links": [
{
"rel": "harmony_source",
"href": "https://cmr.uat.earthdata.nasa.gov/search/concepts/C1234088182-EEDTEST"
},
{
"rel": "item",
"href": "./granule_S012G01.json",
"type": "application/json",
"title": "granule_S012G01"
},
{
"rel": "item",
"href": "./granule_S012G02.json",
"type": "application/json",
"title": "granule_S012G02"
},
{
"rel": "item",
"href": "./granule_S013G01.json",
"type": "application/json",
"title": "granule_S013G01"
},
{
"rel": "next",
"href": "tests/data/harmony/source/catalog1.json",
"type": "application/json",
"title": "Next page"
}
],
"description": "CMR Granules for C1234088182-EEDTEST batch 1"
}
36 changes: 36 additions & 0 deletions tests/data/harmony/source/catalog1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"stac_version": "1.0.0-beta.2",
"stac_extensions": [],
"id": "cfc32383-cfd1-4e43-8d5f-55f539b6fa59",
"links": [
{
"rel": "harmony_source",
"href": "https://cmr.uat.earthdata.nasa.gov/search/concepts/C1234088182-EEDTEST"
},
{
"rel": "item",
"href": "./granule_S013G02.json",
"type": "application/json",
"title": "granule_S013G02"
},
{
"rel": "item",
"href": "./granule_S014G01.json",
"type": "application/json",
"title": "granule_S014G01"
},
{
"rel": "item",
"href": "./granule_S014G02.json",
"type": "application/json",
"title": "granule_S014G02"
},
{
"rel": "prev",
"href": "tests/data/harmony/source/catalog0.json",
"type": "application/json",
"title": "Previous page"
}
],
"description": "CMR Granules for C1234088182-EEDTEST batch 2"
}
49 changes: 49 additions & 0 deletions tests/data/harmony/source/granule_S012G01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"stac_version": "1.0.0-beta.2",
"stac_extensions": [],
"id": "51d02b24-d00e-4640-9887-05f98f6b96d8",
"type": "Feature",
"links": [],
"properties": {
"start_datetime": "2020-01-02T00:00:00.000Z",
"end_datetime": "2020-01-02T23:59:59.000Z"
},
"bbox": [1, 3, 1, 3],
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-179.95,
-89.95
],
[
-179.95,
89.95
],
[
179.95,
89.95
],
[
179.95,
-89.95
],
[
-179.95,
-89.95
]
]
]
},
"assets": {
"data": {
"href": "file://tests/data/harmony/granules/TEMPO_NO2_L2_V03_20240601T120101Z_S012G01.nc",
"title": "TEMPO_NO2_L2_V03_20240601T120101Z_S012G01.nc",
"type": "application/x-netcdf4",
"roles": [
"data"
]
}
}
}
49 changes: 49 additions & 0 deletions tests/data/harmony/source/granule_S012G02.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"stac_version": "1.0.0-beta.2",
"stac_extensions": [],
"id": "21eb7dc5-7a9d-4374-9a88-12451ba653ef",
"type": "Feature",
"links": [],
"properties": {
"start_datetime": "2020-01-03T00:00:00.000Z",
"end_datetime": "2020-01-03T23:59:59.000Z"
},
"bbox": [-1, -3, -1, -3],
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-179.95,
-89.95
],
[
-179.95,
89.95
],
[
179.95,
89.95
],
[
179.95,
-89.95
],
[
-179.95,
-89.95
]
]
]
},
"assets": {
"data": {
"href": "file://tests/data/harmony/granules/TEMPO_NO2_L2_V03_20240601T120107Z_S012G02.nc",
"title": "TEMPO_NO2_L2_V03_20240601T120107Z_S012G02.nc",
"type": "application/x-netcdf4",
"roles": [
"data"
]
}
}
}
Loading