dune-community / dune-xt-common

Other
2 stars 3 forks source link

[WIP] Pyformat yapf google #156

Closed renefritze closed 5 years ago

renefritze commented 5 years ago

For #144 I've decided to try out Google's yapf. Mainly cause it's clang-format related and more configurable than black(box).

Config options can be found here, but I'm actually pretty happy with the current result.

If nobody objects too much I'll hook this into our pre-commit/cmake setup next.

ftalbrecht commented 5 years ago

Looks good to me. Bonus points if you document the initial setup required and what call to integrate into our favorite IDEs somewhere.

codecov[bot] commented 5 years ago

Codecov Report

Merging #156 into master will decrease coverage by 0.12%. The diff coverage is n/a.

Impacted Files Coverage Δ
dune/xt/common/math.cc 66.66% <0%> (-33.34%) :arrow_down:
dune/xt/common/string_internal.hh 72.81% <0%> (-0.55%) :arrow_down:
dune/xt/common/memory.hh 72.41% <0%> (-0.51%) :arrow_down:
dune/xt/common/exceptions.hh 70% <0%> (ø) :arrow_up:
dune/xt/common/parallel/threadstorage.hh 100% <0%> (ø) :arrow_up:
dune/xt/common/fix-ambiguous-std-math-overloads.cc
dune/xt/common/configuration.hh 67.76% <0%> (+0.07%) :arrow_up:
dune/xt/common/configuration.cc 46.22% <0%> (+0.6%) :arrow_up:
dune/xt/common/float_cmp_internal.hh 96.25% <0%> (+3.22%) :arrow_up:
dune/xt/common/string.hh 100% <0%> (+4.51%) :arrow_up:
... and 1 more
codecov[bot] commented 5 years ago

Codecov Report

Merging #156 into master will decrease coverage by 0.12%. The diff coverage is n/a.

Impacted Files Coverage Δ
dune/xt/common/math.cc 66.66% <0%> (-33.34%) :arrow_down:
dune/xt/common/string_internal.hh 72.81% <0%> (-0.55%) :arrow_down:
dune/xt/common/memory.hh 72.41% <0%> (-0.51%) :arrow_down:
dune/xt/common/exceptions.hh 70% <0%> (ø) :arrow_up:
dune/xt/common/parallel/threadstorage.hh 100% <0%> (ø) :arrow_up:
dune/xt/common/fix-ambiguous-std-math-overloads.cc
dune/xt/common/configuration.hh 67.76% <0%> (+0.07%) :arrow_up:
dune/xt/common/configuration.cc 46.22% <0%> (+0.6%) :arrow_up:
dune/xt/common/float_cmp_internal.hh 96.25% <0%> (+3.22%) :arrow_up:
dune/xt/common/string.hh 100% <0%> (+4.51%) :arrow_up:
... and 1 more
renefritze commented 5 years ago

Looks good to me. Bonus points if you document the initial setup required and what call to integrate into our favorite IDEs somewhere.

${CMAKE_CURRENT_BINARY_DIR}/run-in-dune-env yapf -i --style=${CMAKE_CURRENT_SOURCE_DIR}/python/.style.yapf

or call make format

and also update your vcsetup ofc.

renefritze commented 5 years ago

Closing this in favor of #169