Skip to content

Commit

Permalink
Merge branch 'release/1.5.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfromearth authored Nov 8, 2024
2 parents 0a315a8 + c10c358 commit 8d12db2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Common Changelog](https://common-changelog.org/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [1.5.0] - 2024-10-28

### Changed
- Remove the dask dependency ([#235](https://github.com/nasa/stitchee/issues/235))([**@danielfromearth**](https://github.com/danielfromearth))
- Expose sorting variable argument in the command line interface ([#233](https://github.com/nasa/stitchee/issues/233))([**@danielfromearth**](https://github.com/danielfromearth))
- Update tutorial notebook to use PROD instead of UAT and improve readability ([#241](https://github.com/nasa/stitchee/issues/241))([**@danielfromearth**](https://github.com/danielfromearth))

### Added

- Expose sorting variable argument in the command line interface ([#233](https://github.com/nasa/stitchee/issues/233))([**@danielfromearth**](https://github.com/danielfromearth))

### Removed

- Remove the dask dependency ([#235](https://github.com/nasa/stitchee/issues/235))([**@danielfromearth**](https://github.com/danielfromearth))

## [1.4.0] - 2024-08-19

### Changed
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ options:

Required:
path/directory or path list
Files to be concatenated, specified via a (1) single directory containing the files to be concatenated, (2) single text file
containing linebreak-separated paths of the files to be concatenated, or (3) multiple filepaths of the files to be concatenated.
Files to be concatenated, specified via (1) multiple paths of the files to be concatenated, (2) single path to text
file containing linebreak-separated paths of files to be concatenated, (3) single path to netCDF file to be copied to
output path, or a (4) single directory containing the files to be concatenated.
-o OUTPUT_PATH, --output_path OUTPUT_PATH
The output filename for the merged output.
```
Expand Down
9 changes: 5 additions & 4 deletions concatenator/run_stitchee.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ def parse_args(args: list) -> argparse.Namespace:
"input",
metavar="path/directory or path list",
nargs="+",
help="Files to be concatenated, specified via a "
"(1) single directory containing the files to be concatenated, "
"(2) single text file containing linebreak-separated paths of the files to be concatenated, "
"or (3) multiple filepaths of the files to be concatenated.",
help="Files to be concatenated, specified via "
"(1) multiple paths of the files to be concatenated, "
"(2) single path to text file containing linebreak-separated paths of files to be concatenated, "
"(3) single path to netCDF file to be copied to output path, "
"or a (4) single directory containing the files to be concatenated.",
)
req_grp.add_argument(
"-o",
Expand Down
10 changes: 8 additions & 2 deletions concatenator/stitchee.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,20 @@ def stitchee(
logger.info("No non-empty netCDF files found. Exiting.")
return ""

output_file = validate_output_path(output_file, overwrite=overwrite_output_file)

# Exit cleanly with the file copied if one workable netCDF file found.
if num_input_files == 1:
shutil.copyfile(input_files[0], output_file)
logger.info("One workable netCDF file. Copied to output path without modification.")
return output_file

if concat_dim and (concat_method == "xarray-combine"):
warn(
"'concat_dim' was specified, but will not be used because xarray-combine method was "
"selected."
)

output_file = validate_output_path(output_file, overwrite=overwrite_output_file)

# If requested, make a temporary directory with new copies of the original input files
temporary_dir_to_remove = None
if copy_input_files:
Expand Down

0 comments on commit 8d12db2

Please sign in to comment.