Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MNT: pre-commit rst linter + small linting fixes#26737

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 4 commits intomatplotlib:mainfromstory645:rst-linter
Sep 15, 2023

Conversation

story645
Copy link
Member

@story645story645 commentedSep 11, 2023
edited
Loading

Addsrstcheck as a pre-commit hook, mostly cause I seem to have a mental block about underlines being same length as title. This pre-commit also has the advantage of being pretty configurable.

The .rst files in this PR are the linting errors I could fix because I wanted to minimize the ignored errors as much as possible.

@story645story645 marked this pull request as draftSeptember 11, 2023 22:16
@story645story645force-pushed therst-linter branch 2 times, most recently frome057fd4 tod51c3a8CompareSeptember 12, 2023 05:10
@story645story645 changed the titleMNT: pre-commit rst linterMNT: pre-commit rst linter + small linting fixesSep 12, 2023
@story645story645 marked this pull request as ready for reviewSeptember 12, 2023 05:12
- baseline
- center
- baseline

Copy link
Member

Choose a reason for hiding this comment

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

This is no improvement IMHO...

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It fixes the linter error?

Copy link
Member

Choose a reason for hiding this comment

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

If the code works, is the linter correct in complaining?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The original table was formatted incorrectly - the second line was supposed to be = not -
I didn't copy and paste that fix to the symlinked file and that's probably why the linter was still cranky but also I personally find list-table and grid table orders of magnitude easier to maintain than the tables where I have to update the whole thing on every change in space.

Copy link
Member

Choose a reason for hiding this comment

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

As long as the tables are small (like in this example), I prefer ReSTsimple tables. Yes they are more cumbersome to update but they are much easier to read, and readability counts. It's not that we are changing these tables all the time.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I'm struggling a bit with your comment. I think there are two issues with this table:

  1. I had trouble understanding what the table was trying to communicate, so I reworked the table in its own PR.

  2. simple table vs list table format - I always prefer the latter because I find it more portable across different development environments. I understand the readibility concern but I can pull up the rendered docs to see the table, and also the list-table format still clearly delineates rows and columns and that's the important part for editing.

Because of 1, I'd rather discussions of this table move to that PR. If the table format is a blocker then I'll change it there.

Copy link
Member

Choose a reason for hiding this comment

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

Because of 1, I'd rather discussions of this table move to that PR. If the table format is a blocker then I'll change it there.

I'm fine with that approach. I'm just wondering why you bothered to rewrite the old table here, when all it needs for a technical fix is replace the - by =, and for content changes, you again have the separate PR.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Honestly cause I made that change and the linter didn't pass & then I made this change & remembered to C&P it to the non-updating symlinked file and it did pass and since I like this format better anyway I didn't feel like going back and making a way I didn't even like work.

Copy link
Member

Choose a reason for hiding this comment

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

Ok

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

tried to put it in simple table to close out this pr and that also actually requires a content change - it's also not happy with the ? table titles

timhoffm reacted with heart emoji
@oscargus
Copy link
Member

I love static checking tools, so in general I am very positive to this. However, the table code looks quite unmanageable...

@story645
Copy link
MemberAuthor

I find the list tables way easier to work with then the simple tables since I don't have to worry about spacing? It's long yes, but each row is distinct.

@story645
Copy link
MemberAuthor

Granted, I also do not understand that table in the least - what are the first two columns? - but fixing that is way out of scope for this PR.

@story645
Copy link
MemberAuthor

@oscargus I opened#26754 for axisartist. Still has list table mostly because I think that's more robust across different editing environments.

@timhoffmtimhoffm added this to thev3.8-doc milestoneSep 15, 2023
@timhoffmtimhoffm merged commit5e441da intomatplotlib:mainSep 15, 2023
@lumberbot-app
Copy link

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.8.xgit pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 5e441da55ba1be8eb06c9f26b21d195d10971173
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #26737: MNT: pre-commit rst linter + small linting fixes'
  1. Push to a named branch:
git push YOURFORK v3.8.x:auto-backport-of-pr-26737-on-v3.8.x
  1. Create a PR against branch v3.8.x, I would have named this PR:

"Backport PR#26737 on branch v3.8.x (MNT: pre-commit rst linter + small linting fixes)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove theStill Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free tosuggest an improvement.

@lumberbot-app
Copy link

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.8.0-docgit pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 5e441da55ba1be8eb06c9f26b21d195d10971173
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #26737: MNT: pre-commit rst linter + small linting fixes'
  1. Push to a named branch:
git push YOURFORK v3.8.0-doc:auto-backport-of-pr-26737-on-v3.8.0-doc
  1. Create a PR against branch v3.8.0-doc, I would have named this PR:

"Backport PR#26737 on branch v3.8.0-doc (MNT: pre-commit rst linter + small linting fixes)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove theStill Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free tosuggest an improvement.

@story645story645 deleted the rst-linter branchSeptember 15, 2023 07:02
@timhoffm
Copy link
Member

Do we actually need this in the 3.8-doc branch? While it conceptually should go there, it should be sufficient that the test runs on the master branch to catch any rst issues of new contributions.

So I'd claim we don't have to bother with a manual backport. But feel free to decide otherwise.

@story645
Copy link
MemberAuthor

@timhoffm yeah my take is that this is primarily a dev tool & I can manually split off the few docs I'd want in earlier (primarily the contribute page changes as I've got the separate PR for the axisartist page).

@ksunden
Copy link
Member

The backport failed because it changedwhats-new/api doc entries (mostly addingpython tocode-block directives) that were deleted as part of release preparation, I'll add back in the changes to the resulting files in the merge-up process.

story645 reacted with thumbs up emoji

story645 added a commit to story645/matplotlib that referenced this pull requestSep 15, 2023
story645 added a commit to story645/matplotlib that referenced this pull requestSep 15, 2023
rcomer added a commit that referenced this pull requestSep 18, 2023
rcomer added a commit that referenced this pull requestSep 18, 2023
@ksundenksunden mentioned this pull requestNov 2, 2023
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic left review comments

@ksundenksundenksunden left review comments

@oscargusoscargusoscargus left review comments

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.8-doc
Development

Successfully merging this pull request may close these issues.

5 participants
@story645@oscargus@timhoffm@ksunden@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp