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

Add new features for archiving #24

Merged
merged 5 commits into from
Apr 17, 2024

Conversation

DavidHuber-NOAA
Copy link
Collaborator

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  • pynorms
  • pytests

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes need updates to the documentation. I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • Any dependent changes have been merged and published

@DavidHuber-NOAA
Copy link
Collaborator Author

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.

Copy link

codecov bot commented Apr 17, 2024

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 ⚠️
src/wxflow/yaml_file.py 0.00% 1 Missing and 1 partial ⚠️
src/wxflow/jinja.py 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@aerorahul aerorahul merged commit c237f19 into NOAA-EMC:develop Apr 17, 2024
7 of 9 checks passed
@DavidHuber-NOAA DavidHuber-NOAA deleted the feature/archive_updates branch May 3, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants