[Numpy-discussion] Re: Code formatters
On 18/11/2021 19:07, Stefan van der Walt wrote: if we do this, we should probably go through each of the 200+ open PRs (or, at least, the non-conflicted ones), apply the formatter, and then squash the PR into a single commit. We can do that by script. We had to deal with this issue in scikit-learn as well, and you might find the guide on resolving such conflicts in https://github.com/scikit-learn/scikit-learn/issues/20301 helpful. -- Roman ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com
[Numpy-discussion] Re: Code formatters
I think some of the pain points raised here regarding massive churn on existing PRs & conflicts would be addressed by what Ralf said a few emails ago: > A detailed proposal with an incremental formatter may have a chance here (xref `darker` and our `tools/linter.py`), a "let's just run black" one seems dead in the water given the people and opinions in the linked SciPy PR and issue from a few months ago. Why not focusing energies on this incremental approach? I think all folks want to (1) end discussions about code style, (2) avoid weird formatting on math expressions (that black doesn't seem to handle very well) and (3) avoid "breaking the world". Regardless of the specific formatter (black, blue, yapf w/ tweaks), doing it incrementally only on code touched by new PRs would at least provide a less scary way forward. Juan Luis On November 22, 2021, Roman Yurchak wrote: > On 18/11/2021 19:07, Stefan van der Walt wrote: > > if we do this, we should probably go through each of the 200+ open > PRs (or, at least, the non-conflicted ones), apply the formatter, and > then squash the PR into a single commit. We can do that by script. > > We had to deal with this issue in scikit-learn as well, and you might > find the guide on resolving such conflicts in > https://github.com/scikit-learn/scikit-learn/issues/20301 helpful. > > -- > Roman > ___ > NumPy-Discussion mailing list -- numpy-discussion@python.org > To unsubscribe send an email to numpy-discussion-le...@python.org > https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ > Member address: hello@juanlu.space ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com
[Numpy-discussion] Re: Code formatters
Is there a way to figure out which files are not touched by any open PR? That way numpy might be able to do a lot more than an incremental code alignment. ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com
[Numpy-discussion] Ask GitHub to provide an option to not render .rst files
Hey all, If you've ever tried to inspect a file on github with the `.rst` extension, there's a good chance that you were frustrated by GitHub providing a rendered view *only* of the file, with no option to view the source code like any other text file. It is certainly nice to have a rendered view, but often I want to inspect the actual source code (e.g. to find out at which line a heading occurs, perhaps to include a link to it in a pull request). There is the "raw" option, or you could click "edit", but what is really desired is a view of the source like any other source code. Files with the `.md` extension are also rendered by default, but there are buttons that allow you to either "Display the source blob" or "Display the rendered blob". There is no such option for `.rst` files. If they can do it for `.md` files, it seems like it should be easy to do the same for `.rst` files. I've tried creating a ticket on github about this, but it seems like tickets go to the wrong group. The response I got was from the "GitHub Support" team, and they said they forwarded the request to the "Product" team. (It's all GitHub to me.) It was also suggested that I bring this up in a public feedback discussions, so I did: https://github.com/github/feedback/discussions/7999 If you have a moment, could you add a comment, or click the upvote button, or add some other feedback to the discussion? It would be nice to get this simple enhancement into the GitHub site. Thanks, Warren ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com
[Numpy-discussion] Re: Code formatters
This discussion and the linked gist may be of some help: https://github.com/scikit-learn/scikit-learn/issues/11336 On Mon, Nov 22, 2021 at 12:02 PM Andrew Nelson wrote: > Is there a way to figure out which files are not touched by any open PR? > That way numpy might be able to do a lot more than an incremental code > alignment. > ___ > NumPy-Discussion mailing list -- numpy-discussion@python.org > To unsubscribe send an email to numpy-discussion-le...@python.org > https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ > Member address: adrin.jal...@gmail.com > ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com