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

Sourcery refactored master branch #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Feb 16, 2022

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from kayhayen February 16, 2022 10:11
Comment on lines -24 to +37
__np__.run_build_tool_exe("cmake", "cmake.exe", "-G", "Ninja",
"-DCMAKE_BUILD_TYPE=Release", "-DBUILD_CPU_DEMOS=OFF",
"-DBUILD_OPENGL3_DEMOS=OFF", "-DBUILD_UNIT_TESTS=OFF",
"-DINSTALL_LIBS=ON",
"-DCMAKE_INSTALL_PREFIX=" + install_dir,
src_dir)
__np__.run_build_tool_exe(
"cmake",
"cmake.exe",
"-G",
"Ninja",
"-DCMAKE_BUILD_TYPE=Release",
"-DBUILD_CPU_DEMOS=OFF",
"-DBUILD_OPENGL3_DEMOS=OFF",
"-DBUILD_UNIT_TESTS=OFF",
"-DINSTALL_LIBS=ON",
f'-DCMAKE_INSTALL_PREFIX={install_dir}',
src_dir,
)

Copy link
Author

Choose a reason for hiding this comment

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

Function run refactored with the following changes:

Comment on lines -26 to +42
__np__.run_build_tool_exe("cmake", "cmake.exe", "-G", "Ninja",
"-DCMAKE_INSTALL_PREFIX=" + install_dir,
"-DCMAKE_BUILD_TYPE=Release",
"-DZLIB_ROOT=" + __np__.find_dep_root("zlib"),
"-DWITH_HarfBuzz=ON", "-DWITH_BZip2=OFF",
"-DWITH_PNG=OFF",
"-DHARFBUZZ_INCLUDE_DIRS=" + __np__.find_dep_include("harfbuzz"),
"-DPC_HARFBUZZ_INCLUDEDIR=" + __np__.find_dep_include("harfbuzz"),
"-DPC_HARFBUZZ_LIBDIR=" + __np__.find_dep_libs("harfbuzz"),
src_dir)
__np__.run_build_tool_exe(
"cmake",
"cmake.exe",
"-G",
"Ninja",
f'-DCMAKE_INSTALL_PREFIX={install_dir}',
"-DCMAKE_BUILD_TYPE=Release",
"-DZLIB_ROOT=" + __np__.find_dep_root("zlib"),
"-DWITH_HarfBuzz=ON",
"-DWITH_BZip2=OFF",
"-DWITH_PNG=OFF",
"-DHARFBUZZ_INCLUDE_DIRS=" + __np__.find_dep_include("harfbuzz"),
"-DPC_HARFBUZZ_INCLUDEDIR=" + __np__.find_dep_include("harfbuzz"),
"-DPC_HARFBUZZ_LIBDIR=" + __np__.find_dep_libs("harfbuzz"),
src_dir,
)

Copy link
Author

Choose a reason for hiding this comment

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

Function run refactored with the following changes:

Comment on lines -31 to +44
__np__.run_build_tool_exe("cmake", "cmake.exe", "-G", "Ninja",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=" + ft_install_dir,
"-DZLIB_ROOT=" + __np__.find_dep_root("zlib"),
"-DWITH_HarfBuzz=OFF", "-DWITH_BZip2=OFF",
"-DWITH_PNG=OFF", ft_src_dir)
__np__.run_build_tool_exe(
"cmake",
"cmake.exe",
"-G",
"Ninja",
"-DCMAKE_BUILD_TYPE=Release",
f'-DCMAKE_INSTALL_PREFIX={ft_install_dir}',
"-DZLIB_ROOT=" + __np__.find_dep_root("zlib"),
"-DWITH_HarfBuzz=OFF",
"-DWITH_BZip2=OFF",
"-DWITH_PNG=OFF",
ft_src_dir,
)

Copy link
Author

Choose a reason for hiding this comment

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

Function run refactored with the following changes:

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Feb 16, 2022

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 0.00 ⭐ 0.00 ⭐ 0.00
Method Length 97.83 🙂 97.82 🙂 -0.01 👍
Working memory 7.48 🙂 7.48 🙂 0.00
Quality 64.63% 🙂 64.63% 🙂 0.00%
Other metrics Before After Change
Lines 138 170 32
Changed files Quality Before Quality After Quality Change
dependencies/np3-windows/bullet/build.py 71.20% 🙂 71.20% 🙂 0.00%
dependencies/np3-windows/freetype/build.py 68.22% 🙂 68.22% 🙂 0.00%
dependencies/np3-windows/harfbuzz/build.py 59.25% 🙂 59.25% 🙂 0.00%

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
dependencies/np3-windows/harfbuzz/build.py run 0 ⭐ 255.95 ⛔ 8 🙂 59.25% 🙂 Try splitting into smaller methods
dependencies/np3-windows/freetype/build.py run 0 ⭐ 162.99 😞 7 🙂 68.22% 🙂 Try splitting into smaller methods
dependencies/np3-windows/bullet/build.py run 0 ⭐ 134.99 😞 7 🙂 71.20% 🙂 Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

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.

0 participants