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

Finish formatting of PolyhedralGeometry #3626

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

lkastner
Copy link
Member

No description provided.

@lkastner lkastner added the don't squash! do not squash the commits when merging label Apr 18, 2024
.git-blame-ignore-revs Outdated Show resolved Hide resolved
Comment on lines 245 to 254
const _johnson_indexes_from_oscar = Set{Int}([9, 10, 13, 16, 17, 18, 20, 21, 22, 23, 24,
25, 30, 32, 33, 34, 35, 36, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 64, 68, 69, 70, 71, 72, 73, 74, 75,
77, 78, 79, 82, 84, 85, 86, 87, 88, 89,
90, 92])
const _johnson_indexes_from_oscar = Set{Int}([
9,
10,
13,
16,
17,
18,
20,
21,
22,
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, I'm not sure I like this change. If one scrolls down to the end of the list, one can't see the name _johnson_indexes_from_oscar anymore, at least on my screen. Apparently, one could leave it as it were and add comments for the formatter to ignore it (https://domluna.github.io/JuliaFormatter.jl/stable/#Turn-off/on-formatting) so that the tests pass, but I did not test this.

But you can also leave it like this; long lists of constants never look great I guess.

Copy link
Member

Choose a reason for hiding this comment

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

I like the idea of putting some few noformat tags around things like this to keep files readable. That's why we even format them in the first place imo.

Copy link
Member Author

Choose a reason for hiding this comment

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

I know that I can make the formatter ignore this. But maybe there is something to make it little more forgiving in general?

Copy link

codecov bot commented Apr 18, 2024

Codecov Report

Merging #3626 (cae5980) into master (4d5956d) will increase coverage by 0.00%.
The diff coverage is 85.71%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3626   +/-   ##
=======================================
  Coverage   82.78%   82.78%           
=======================================
  Files         577      577           
  Lines       77743    77743           
=======================================
+ Hits        64358    64359    +1     
+ Misses      13385    13384    -1     
Files Coverage Δ
...edralGeometry/Polyhedron/standard_constructions.jl 97.10% <ø> (ø)
src/PolyhedralGeometry/Polyhedron/properties.jl 85.12% <85.71%> (ø)

... and 1 file with indirect coverage changes

@lkastner lkastner marked this pull request as draft April 18, 2024 19:08
Comment on lines +158 to +161
invA = [1 2 3 -4;
1 0 1 -1;
1 9 0 -6;
1 1 5 -5]
Copy link
Member

Choose a reason for hiding this comment

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

I am not a fan of how this new option formats matrices like this. The offset of the first row is weird. I think without this option this was more aligned.
But let's hear other peoples opinions as well.

@lkastner
Copy link
Member Author

In general I would rather avoid anything were we manually interfere with the formatter since this always entails mentioning this in PRs and explaining it to devs. One main goal of the formatting tests is to reduce our work when reviewing PRs. It has the added benefit that there is an automated way for devs to fix their formatting. The many comments on formatting can seem a bit like micromanagement and be quite discouraging.

@joschmitt
Copy link
Member

What is the plan now? I would think that with every set of formatting rules, there will be some situation where the result is not optimal. And there will always be somebody who doesn't like something about the current style (I personally would put more white space than the formatter for example).
In case you are waiting for opinions: I can live with it as it is now.
If there is an option that magically aligns the matrices as we want, great. align_matrix seems not to be it; it even adds white space with every run for me, so the tests won't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
don't squash! do not squash the commits when merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants