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

Reduce code duplication in DataLayouts #1957

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

charleskawczynski
Copy link
Member

This PR reduces code duplication in DataLayouts, and defines get_Ni and get_Nj to allow for distinguishing from get_Nij.

This is basically a peel off from #1955.

Copy link
Member

@Sbozzolo Sbozzolo left a comment

Choose a reason for hiding this comment

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

This commit is a little hard to parse because lots of lines have changed, but the important changes are only a handful.
As far as I can tell, it does three things:

  1. adds get_Ni, get_Nj
  2. changes slab for IJFJ and for DataSlab1D, and column for VF and VIFH
  3. replaces ASCII symbols with unicode symbols

Splitting off unrelated changes to different commits (in the same PR) would help with reviewing and would make git log/blame more useful.

Tests are failing, but it doesn't seem anything fundamentally wrong.

(You might also have a look at fonts with programming ligatures (like Fira Code), if you haven't already. In my opinion, they provide the best solution for symbols like ≤: when you type <= the combination of characters is rendered as ≤, but the characters remain ASCII. This ensures that the symbol is still easily to manipulate in places where it is not as trivial to enter unicode symbols (such as the command line, or the search bar in a browser), while improving readability in your editor)

@charleskawczynski
Copy link
Member Author

Sounds good, yes, I can split up the commits.

@charleskawczynski charleskawczynski force-pushed the ck/refactor_datalayouts4 branch from 0fd4208 to 2cd3b82 Compare August 29, 2024 12:28
@charleskawczynski
Copy link
Member Author

I think some of the errors actually were related to get_Ni /get_Nj, so I removed that. Also, I removed the -related changes for now. I'll take a look at Fira Code. So, this PR now only changes some of the method definitions in DataLayouts to forward to equivalent methods.

@charleskawczynski charleskawczynski force-pushed the ck/refactor_datalayouts4 branch from 211bb29 to 8cbfea8 Compare August 29, 2024 18:33
@charleskawczynski charleskawczynski merged commit 1add428 into main Aug 29, 2024
19 of 21 checks passed
@charleskawczynski charleskawczynski deleted the ck/refactor_datalayouts4 branch August 29, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants