NOAA-EMC / wxflow

Tools for Weather Workflows
https://wxflow.readthedocs.io/en/latest
GNU Lesser General Public License v3.0
0 stars 7 forks source link

Add new features for archiving #24

Closed DavidHuber-NOAA closed 4 months ago

DavidHuber-NOAA commented 4 months ago

Description

This adds a new jinja filter to get the relative directory of a path given a root path and a symlink dereference option to htar create methods. It also gives a better use case example for the Executable class and a check for the existence of a template file before attempting to parse it (not doing so causes a downstream failure that is difficult to debug).

Needed for noaa-emc/global-workflow#2345.

Type of change

How Has This Been Tested?

Checklist

DavidHuber-NOAA commented 4 months ago

A note on the new dereference flag: I wrote and used this in archiving, but then later did not need it. I decided to keep it as it seems useful for having compatibility with Python's builtin tarfile methods.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 47.90%. Comparing base (63db259) to head (534fe44).

Files Patch % Lines
src/wxflow/htar.py 40.00% 3 Missing :warning:
src/wxflow/yaml_file.py 0.00% 1 Missing and 1 partial :warning:
src/wxflow/jinja.py 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #24 +/- ## =========================================== - Coverage 47.99% 47.90% -0.09% =========================================== Files 18 18 Lines 1642 1647 +5 Branches 330 333 +3 =========================================== + Hits 788 789 +1 - Misses 798 801 +3 - Partials 56 57 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.