ikarus-project / ikarus

Ikarus is a C++-based library that uses DUNE modules to solve partial differential equations with the finite element method and more.
https://ikarus-project.github.io/
Other
6 stars 3 forks source link

fix python formatting + versions of formatters #315

Closed henrij22 closed 3 months ago

henrij22 commented 3 months ago

This goes hand in hand with https://github.com/ikarus-project/ikarus-docker-container/pull/9

For that we have to fix the format of a few files (2dn commit)

Ive also bumped the version of actions/checkout@v2 to get rid of the warning

The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, scheduleonce/lint-filenames@v2.0.0. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

When running the python formatting target, everything seems to work. But when it is run via the CI, it can't find any python files, thats why I channged it in the action to just use black without the cmake target

See CI: https://github.com/ikarus-project/ikarus/actions/runs/10095821887/job/27916876109

18s
Run cmake --build build --target format
clang-format did not modify any files
Built target clang-format
Built target cmake-format
Built target format
clang-format did not modify any files
Built target check-clang-format
Built target check-cmake-format
Built target check-format
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: black in /home/runner/.local/lib/python3.10/site-packages (23.3.0)
Requirement already satisfied: mypy-extensions>=0.4.3 in /home/runner/.local/lib/python3.10/site-packages (from black) (1.0.0)
Requirement already satisfied: tomli>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from black) (2.0.1)
Requirement already satisfied: click>=8.0.0 in /usr/lib/python3/dist-packages (from black) (8.0.3)
Requirement already satisfied: packaging>=22.0 in /usr/local/lib/python3.10/dist-packages (from black) (24.1)
Requirement already satisfied: platformdirs>=2 in /usr/local/lib/python3.10/dist-packages (from black) (4.2.2)
Requirement already satisfied: pathspec>=0.9.0 in /home/runner/.local/lib/python3.10/site-packages (from black) (0.12.1)
No Python files are present to be formatted. Nothing to do 😴
Built target check-pythonformat
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.62%. Comparing base (90adeac) to head (6443faf).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #315 +/- ## ======================================= Coverage 93.62% 93.62% ======================================= Files 67 67 Lines 2415 2415 ======================================= Hits 2261 2261 Misses 154 154 ``` | [Flag](https://app.codecov.io/gh/ikarus-project/ikarus/pull/315/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ikarus-project) | Coverage Δ | | |---|---|---| | [tests](https://app.codecov.io/gh/ikarus-project/ikarus/pull/315/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ikarus-project) | `93.62% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ikarus-project#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.