Skip to content

Handle empty dict if no git info is available#27

Closed
TomasTorsvik wants to merge 1 commit intoNorESMhub:noresmfrom
TomasTorsvik:feature-fix_git_command
Closed

Handle empty dict if no git info is available#27
TomasTorsvik wants to merge 1 commit intoNorESMhub:noresmfrom
TomasTorsvik:feature-fix_git_command

Conversation

@TomasTorsvik
Copy link

ADF will fail if get_git_info() returns None, which is the case if no git repository is found.

This PR suggests a way to handle such a case, so that the processing can continue. Perhaps there are better ways, so please feel free to suggest alternative solutions.

@TomasTorsvik TomasTorsvik requested review from YanchunHe and llsuo March 16, 2026 17:36
@TomasTorsvik TomasTorsvik self-assigned this Mar 16, 2026
@TomasTorsvik TomasTorsvik added the bug Something isn't working label Mar 16, 2026
@TomasTorsvik TomasTorsvik linked an issue Mar 16, 2026 that may be closed by this pull request
@TomasTorsvik TomasTorsvik changed the title Handle epty dict if no git info is available Handle empty dict if no git info is available Mar 16, 2026
@YanchunHe
Copy link
Collaborator

Thanks @TomasTorsvik . Looks good to me!

However, I would suggest submit this fix to the NCAR/ADF repository, as this is a generic issue not with noresm-only. Otherwise, there might be conflicts in the future when we try merge with the NCAR/main.

How do you think?

@TomasTorsvik
Copy link
Author

Thanks @TomasTorsvik . Looks good to me!

However, I would suggest submit this fix to the NCAR/ADF repository, as this is a generic issue not with noresm-only. Otherwise, there might be conflicts in the future when we try merge with the NCAR/main.

How do you think?

Yes, that's probably a better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADF diagnostics fails on git command

2 participants