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

Use for custom integrators only OrdinaryDiffEq:CallbackSet, no blank line elixirs #2226

Merged
merged 9 commits into from
Jan 12, 2025

Conversation

DanielDoehring
Copy link
Contributor

@DanielDoehring DanielDoehring commented Jan 10, 2025

For the custom integrators it suffices to import only the CallbackSet from OrdinaryDiffEq.jl, see this comment.

Out of 431 elixirs, about 130 did not start with a blank line. Now they all do.

@DanielDoehring DanielDoehring added low-priority consistency Make Michael happy refactoring Refactoring code without functional changes labels Jan 10, 2025
Copy link
Contributor

Review checklist

This checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging.

Purpose and scope

  • The PR has a single goal that is clear from the PR title and/or description.
  • All code changes represent a single set of modifications that logically belong together.
  • No more than 500 lines of code are changed or there is no obvious way to split the PR into multiple PRs.

Code quality

  • The code can be understood easily.
  • Newly introduced names for variables etc. are self-descriptive and consistent with existing naming conventions.
  • There are no redundancies that can be removed by simple modularization/refactoring.
  • There are no leftover debug statements or commented code sections.
  • The code adheres to our conventions and style guide, and to the Julia guidelines.

Documentation

  • New functions and types are documented with a docstring or top-level comment.
  • Relevant publications are referenced in docstrings (see example for formatting).
  • Inline comments are used to document longer or unusual code sections.
  • Comments describe intent ("why?") and not just functionality ("what?").
  • If the PR introduces a significant change or new feature, it is documented in NEWS.md with its PR number.

Testing

  • The PR passes all tests.
  • New or modified lines of code are covered by tests.
  • New or modified tests run in less then 10 seconds.

Performance

  • There are no type instabilities or memory allocations in performance-critical parts.
  • If the PR intent is to improve performance, before/after time measurements are posted in the PR.

Verification

  • The correctness of the code was verified using appropriate tests.
  • If new equations/methods are added, a convergence test has been run and the results
    are posted in the PR.

Created with ❤️ by the Trixi.jl community.

@JoshuaLampert
Copy link
Member

I definitely like the consistence, but personally I would prefer to not have an additional blank line in the elixirs. I don't really see a reason why it should be there. In other Julia files, we also don't have a blank line in the beginning.

@DanielDoehring
Copy link
Contributor Author

I definitely like the consistence, but personally I would prefer to not have an additional blank line in the elixirs. I don't really see a reason why it should be there. In other Julia files, we also don't have a blank line in the beginning.

100 % agreed. I could also remove the blank line instead (just did here what results in fewer changes).

@JoshuaLampert
Copy link
Member

If no-one objects, I would go for that.

@DanielDoehring DanielDoehring changed the title Use for custom integrators only OrdinaryDiffEq:CallbackSet, first line blank for all elixirs Use for custom integrators only OrdinaryDiffEq:CallbackSet, no blank line elixirs Jan 10, 2025
ranocha
ranocha previously approved these changes Jan 11, 2025
@ranocha
Copy link
Member

ranocha commented Jan 11, 2025

We should adapt the warnings that we ignore to make CI pass again, see https://github.com/trixi-framework/Trixi.jl/actions/runs/12713449820/job/35441395773?pr=2226#step:7:1334

Copy link
Member

@JoshuaLampert JoshuaLampert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error is genuine: https://github.com/trixi-framework/Trixi.jl/actions/runs/12713449820/job/35488240347?pr=2226#step:7:2345. We need to import init from OrdinaryDiffEq.jl in the test.

Copy link

codecov bot commented Jan 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.42%. Comparing base (62e3584) to head (de79074).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2226       +/-   ##
===========================================
+ Coverage   43.20%   96.42%   +53.21%     
===========================================
  Files         485      486        +1     
  Lines       39006    39164      +158     
===========================================
+ Hits        16852    37761    +20909     
+ Misses      22154     1403    -20751     
Flag Coverage Δ
unittests 96.42% <ø> (+53.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DanielDoehring
Copy link
Contributor Author

This error is genuine: https://github.com/trixi-framework/Trixi.jl/actions/runs/12713449820/job/35488240347?pr=2226#step:7:2345. We need to import init from OrdinaryDiffEq.jl in the test.

Thanks for this catch! I did not check the CI in the meantime, but it seems that the MKL download/import errors are magically gone 🤔 Do we know why ?

@JoshuaLampert
Copy link
Member

Thanks for this catch! I did not check the CI in the meantime, but it seems that the MKL download/import errors are magically gone 🤔 Do we know why ?

Yes, I was also wondering why they are gone. I retriggered CI because the Accessors.jl problem is fixed. But do we know why the MKL download error appeared in the first place?

@DanielDoehring
Copy link
Contributor Author

Yes, I was also wondering why they are gone. I retriggered CI because the Accessors.jl problem is fixed. But do we know why the MKL download error appeared in the first place?

Yeah I also first thought that the errors are due to the Accessors business. Maybe they truly are, but due to some obscure backend behaviour this failed precompilation resulted in a compile at "test runtime" which causes the MKL download? Anyway, nice to have things working again.

@DanielDoehring DanielDoehring enabled auto-merge (squash) January 12, 2025 12:17
@DanielDoehring DanielDoehring merged commit 8592c0e into trixi-framework:main Jan 12, 2025
38 checks passed
@DanielDoehring DanielDoehring deleted the BlankLinesElixirs branch January 12, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consistency Make Michael happy low-priority refactoring Refactoring code without functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants