-
Notifications
You must be signed in to change notification settings - Fork 48
extract_science.py rebuild fix #95
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?
Conversation
build/extract/extract_science.py
Outdated
| run_command(f"mkdir -p {dest_file.parents[0]}") | ||
| copy_command = f"cp -r {source_file} {dest_file}" | ||
| dest_file.parent.mkdir(parents=True, exist_ok=True) | ||
| copy_command = f"cp -r -u --preserve=timestamps {source_file} {dest_file}" |
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.
Since we're invoking a CLI tool, we could consider using rsync, which can remove files too.
|
|
||
| # make the working directory location | ||
| working_dep.mkdir(parents=True) | ||
| working_dep.mkdir(parents=True, exist_ok=True) |
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 line is almost certainly redundant, so we could remove it instead of fixing it.
- copy new files only - preserve timestamps in case of file system time differences
FileExistsErrorin extract_science.py when rebuilding.Note: There is a subsequent error in the dependerator when rebuilding (not related to the changes in this pr). The workaound is:
rm applications/lfric_atm/working/build_lfric_atm/dependencies.dbTodo:
PR Summary
Sci/Tech Reviewer:
Code Reviewer:
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
style guidelines
readability of the code
Testing
acceptable (eg. kgo changes)
tests, unit tests, etc.)
and have tests been allocated to an appropriate testing group (i.e. the
developer tests are for jobs which use a small amount of compute resource
and complete in a matter of minutes)
trac.log
Security Considerations
Performance Impact
performance measurements have been conducted
AI Assistance and Attribution
of Generative AI tool name (e.g., Met Office Github Copilot Enterprise,
Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the
Simulation Systems AI policy
(including attribution labels)
Documentation
confirmed that it builds correctly
PSyclone Approval
inteface, optimisation scripts, LFRic data structure code) then please
contact the
tooscollabdevteam@metoffice.gov.uk
Sci/Tech Review
Please alert the code reviewer via a tag when you have approved the SR
Code Review