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

Fix MPI bug, make interpolated_physical_z nothing if not root #25

Merged
merged 4 commits into from
May 10, 2024

Conversation

charleskawczynski
Copy link
Member

Fixes an MPI bug, found when upgrading to the latest ClimaDiagnostics here.

@charleskawczynski charleskawczynski merged commit 8201014 into main May 10, 2024
5 of 6 checks passed
@Sbozzolo
Copy link
Member

Sbozzolo commented May 12, 2024

Thank you for trying to address a bug that snuck in while I fixed something else! However, there was no need for this PR to change how code formatting is handled in this repo. The formatter was kept separate and part of the test suite on purpose. This repo is low-traffic and I was experimenting with another approach to formatting. Instead of maintaing a dedicated environment and a bunch of files that are often forgotten in a hidden folder, you can expose everything you need to know in a single JuliaFormatter.toml file (less code is better, especially when the code is not run in any test). Then, you can format the package with using JuliaFormatter, ClimaDiagnostics; format(ClimaDiagnostics). Being part of the test suite also helps with making sure that things are formatter before pushing (if you run the tests). I know that this is not how other repos are structured (but this doesn't mean that it is a worse solution), but next time please open an issue or a PR instead of adding this to an unrelated change.

@charleskawczynski
Copy link
Member Author

However, there was no need for this PR to change how code formatting is handled in this repo. The formatter was kept separate and part of the test suite on purpose. This repo is low-traffic and I was experimenting with another approach to formatting. Instead of maintaing a dedicated environment and a bunch of files that are often forgotten in a hidden folder, you can expose everything you need to know in a single JuliaFormatter.toml file (less code is better, especially when the code is not run in any test). Then, you can format the package with using JuliaFormatter, ClimaDiagnostics; format(ClimaDiagnostics). Being part of the test suite also helps with making sure that things are formatter before pushing (if you run the tests). I know that this is not how other repos are structured (but this doesn't mean that it is a worse solution), but next time please open an issue or a PR instead of adding this to an unrelated change.

Yeah, sorry about that, there was no documentation on how to apply the formatter in this repo, and CI was failing when I first pushed. I've been used to the workflow that we use in most other repos, and was pressed on time so I replaced it with what seems standard across Clima repos. Maybe next time you can instead experiment in a separate dedicated repo on how to improve the formatter and open an issue on how we can apply these changes across all repos?

@Sbozzolo
Copy link
Member

Yeah, sorry about that, there was no documentation on how to apply the formatter in this repo, and CI was failing when I first pushed. I've been used to the workflow that we use in most other repos, and was pressed on time so I replaced it with what seems standard across Clima repos.

I agree that this should have been documented somewhere and I didn't think of other contributors (who had no way to know why the formatter is set in a specific way).

In the same spirit, I would like the "new" formatter to be documented. This is similar to what is used in other repos, but it also contains a bunch of files to prepare system images and precompile things and it still references climatemachine.

Maybe next time you can instead experiment in a separate dedicated repo on how to improve the formatter and open an issue on how we can apply these changes across all repos?

The experiment was not on how to set things up: everything was properly set up and working. The experiment was to see if it was meanigfully better or not for realistic repos. This is analogus to experimenting with managing a repo with the test dependencies specificed in [extras] instead of test/Project.toml.

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.

2 participants