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

Remove nc file if it exists before creating it #54

Merged
merged 1 commit into from
Jul 30, 2021
Merged

Remove nc file if it exists before creating it #54

merged 1 commit into from
Jul 30, 2021

Conversation

charleskawczynski
Copy link
Member

Sometimes julia complains that I don't have permission to create the nc file (sometimes when simulations crash). This should smooth the workflow a bit.

@codecov
Copy link

codecov bot commented Jul 29, 2021

Codecov Report

Merging #54 (b8a633d) into main (61802f5) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##            main     #54      +/-   ##
========================================
- Coverage   0.02%   0.02%   -0.01%     
========================================
  Files         23      23              
  Lines       3503    3504       +1     
========================================
  Hits           1       1              
- Misses      3502    3503       +1     
Impacted Files Coverage Δ
src/NetCDFIO.jl 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61802f5...b8a633d. Read the comment docs.

@haakon-e
Copy link
Member

Looks good to me. Is it possible to write the .nc files in a context to make sure they're always closed in case anything happens? (I don't like the idea of accidentally keeping files open anyways)

@charleskawczynski
Copy link
Member Author

Looks good to me. Is it possible to write the .nc files in a context to make sure they're always closed in case anything happens? (I don't like the idea of accidentally keeping files open anyways)

Yes, it is possible and I agree, but we can't easily open-close the file on the fly, so this open-close has to be done at a high level for now. We could wrap the whole solve in a do-block that opens the nc file, but that might be a bit of work (I haven't tried though).

Let's merge this for now, I'll open an issue on improving things.

@charleskawczynski
Copy link
Member Author

bors r+

@bors bors bot merged commit a5a5797 into main Jul 30, 2021
@charleskawczynski charleskawczynski deleted the ck/workflow branch July 30, 2021 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants