-
Notifications
You must be signed in to change notification settings - Fork 21
fre pp rename-split #717
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
base: main
Are you sure you want to change the base?
fre pp rename-split #717
Conversation
…me_split_to_pp.py
The ending date should be June 30
from fre-cli instead of fre-workflows
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #717 +/- ##
==========================================
+ Coverage 82.76% 82.94% +0.18%
==========================================
Files 68 69 +1
Lines 4525 4655 +130
==========================================
+ Hits 3745 3861 +116
- Misses 780 794 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| nc_exists = [osp.isfile(el) for el in nc_files] | ||
| assert all(nc_exists) | ||
|
|
||
| def test_rename_split_to_pp_multiply(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a setup function too
|
@copilot open a PR to this branch and:
|
Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
reduce `rename-split` test-data to minimal possible size
ilaflott
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bunch of this is nit picking about style, this looks largely functional. i'll ponder approving when it's taken out of draft
| #tests rename_split_to_pp with a minimal python wrapper | ||
| #test cases: regrid/native, static/ts | ||
| #fail test cases: no files in your input directory/subdirs; input files are not named according to our very specific naming conventions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets make this a proper docstring
| #https://stackoverflow.com/questions/67631/how-can-i-import-a-module-dynamically-given-the-full-path | ||
| #/archive/cew/CMIP7/ESM4/DEV/ESM4.5_staticfix/ppan-prod-openmp/history/00010101.nc.tar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove i think
| import pprint | ||
| from pathlib import Path | ||
| import cftime | ||
| from fre.pp.rename_split_script import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally disfavor wildcard imports, if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
general spacing consistency- two spaces or four? the rest of the repo uses 4
| import pytest | ||
| import sys | ||
| import os | ||
| from os import path as osp | ||
| import subprocess | ||
| import re | ||
| import pprint | ||
| from pathlib import Path | ||
| import cftime | ||
| from fre.pp.rename_split_script import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally, import stdlib modules first, third-party second, then internal dependencies last. some additionally sort by alphabetical order but this is more matter of taste imo
Describe your changes
Conversion of fre-workflows rename-split shell script into fre-cli python. Preserved existing rename-split test cases.
Issue ticket number and link (if applicable)
Checklist before requesting a review