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

Improve how filenames are parsed to generate file id #91

Merged
merged 3 commits into from
Jun 16, 2023

Conversation

dougiesquire
Copy link
Collaborator

This PR includes a new implementation of the approach for getting file ids from filenames. Explicit regex patterns corresponding to known ACCESS output filenames are now matched to generate a file id (by redacting time stamps and replacing non-python characters) and extract any time information contained in the filename. This approach to generating the file id is probably more robust than the old approach (see #67). Additionally, the time information extracted is used in conjunction with the output of get_timeinfo to make it more robust (see #20) and could also be useful elsewhere (e.g. see #62)

@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #91 (26a0b6b) into main (d83c8bb) will increase coverage by 2.95%.
The diff coverage is 42.85%.

@@            Coverage Diff            @@
##            main      #91      +/-   ##
=========================================
+ Coverage   8.61%   11.56%   +2.95%     
=========================================
  Files         10       10              
  Lines        511      519       +8     
=========================================
+ Hits          44       60      +16     
+ Misses       467      459       -8     
Impacted Files Coverage Δ
src/access_nri_intake/source/builders.py 0.00% <0.00%> (ø)
src/access_nri_intake/source/utils.py 36.47% <46.15%> (+1.58%) ⬆️

@dougiesquire dougiesquire merged commit e0582b7 into main Jun 16, 2023
@dougiesquire dougiesquire deleted the 67_filename_parser branch June 16, 2023 04:26
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.

1 participant