Re: [GRASS-dev] Moving to Black for Python formatting
On Fri, Feb 26, 2021 at 7:01 AM Luca Delucchi wrote: > On Fri, 26 Feb 2021 at 06:00, Vaclav Petras wrote: > > > All this applies to core repo, not the grass-addons repo. Ideas and > volunteers are welcome. > > > > Do you have any suggestions on how to proceed to grass-addons? > Did you just run blake inside a folder or did you do something more? > Here is what I did: * Applied Black. * Added pyproject.toml with configuration for Black. * Modified Flake8 rules. * Added a Black GitHub workflow. The application of Black can use some touches here and there. You need to use the same Black version. You may want to modify some lines before and after (I did just things I caught for one reason or another - you cannot review all changes). You may run Flake8 to check for long lines after you applied Black and see if there is something you can resolve. I did separate PRs for different directories, but that was because the codebases are different in each and also a little bit to minimize conflicts with other PRs (these should not be an issue with grass-addons repo). Commit per directory, but then squashing them when merging the PR might be a good approach for grass-addons. ___ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] [GRASS-PSC] Min. req. of programming language standard support, GRASS GIS 8
Dear Nicklas, Thanks much for such a clearly written RFC! I only made very minor cosmetic changes. Are there any other comments, objections or suggestions? Or further aspects to be discussed? If no, maybe we can vote on it soon-ish, no? Have a nice weekend :) Vero El mar, 16 feb 2021 a las 15:36, Nicklas Larsson via grass-psc (< grass-...@lists.osgeo.org>) escribió: > I added the RFC draft to GRASS Wiki [1]. > > Well, it's only a draft, so any thoughts, modifications, additions are > most welcome! > > Nicklas > > > [1] https://trac.osgeo.org/grass/wiki/RFC/7_LanguageStandardsSupport > > > > On Thursday, 11 February 2021, 14:34:44 CET, Moritz Lennert < > mlenn...@club.worldonline.be> wrote: > > > > > Am 11. Februar 2021 13:29:10 MEZ schrieb Nicklas Larsson < > n_lars...@yahoo.com>: > > Moritz, > > > >I'd be honoured! > >I will put it on GRASS Wiki [1] if you don't have another suggestion and > notify here when done. > > > Great, thanks a lot ! > > > Moritz > > > > >[1] https://trac.osgeo.org/grass/wiki/RFC > > > > > > > >On Thursday, 11 February 2021, 12:54:30 CET, Moritz Lennert < > mlenn...@club.worldonline.be> wrote: > > > > On 10/02/21 13:16, Nicklas Larsson wrote: > >> It would be most favourable for all contributors and the project if the > >> community could come to an agreement on this topic. I see no reason to > >> postpone a decision on this much longer. > >> > >> The final word on this need to be that of the PSC's. Whether through > >> simple vote or a RFC. However, a sounding of the opinion of the > >> dev-community on this matter is of equal importance and can be of help > >> for the PSC. > > > >Thanks a lot, Nicklas, for this very comprehensive summary ! > > > >A suggestion made at the first meeting of the new PSC was to use this > >discussion as a use case for a more extensive usage of RFC's to put > >important decisions into more permanent documents than mailing list > >archives and to provoke a formal decision as you suggest. Would you be > >willing to write a first draft of such an RFC ? > > > >Moritz > > > ___ > grass-psc mailing list > grass-...@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/grass-psc > ___ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev
Re: [GRASS-dev] Moving to Black for Python formatting
On Fri, 26 Feb 2021 at 06:00, Vaclav Petras wrote: > > Dear all, > Dear Vaclav, > Black is now applied to all except for GUI code (that will change hopefully > soon). There are few exceptions in place, most notably ctypes. The compliance > is checked using Checks in each PR (aka GitHub Actions). The version used is > Black 20.8b1. It will be updated as new releases come with possibly small > changes to the formatting of the code. > > Use the same Black version locally, but if you don't, the worst thing which > will happen is that the check will fail and you will need to fix your PR. > There is a new file in the root of the repo called pyproject.toml which your > local Black and perhaps your editor should pick up currently with settings > only for Black. Obviously, the idea is that you just throw Black formatter at > your file and don't care about formatting things manually anymore. > > A lot happened with Flake8 compiace, but that's mostly irrelevant to Black > except that bulk of formatting issues are gone which are now all enabled > except line length check and one issue which conflicts with Black. This is > accompanied by supporting # % and not just #% in the option parser. Thanks to > this and recent Flake8-related fixes by Anna, it is possible to use Flake8 > quite effectively to check for problems although a lot of issues still need > to be ignored which is configured separately in each major directory > containing Python code. > > Several non-whitespace changes were included in the Black formatting, namely > updates of remaining u-string literals to Python 3 and some trailing comma > syntax which now makes Python 3.6 the minimum. > > There is also a PR #1391 which will make it easy to ignore these (and other) > formatting commits when doing git blame in the command line. The GitHub web > interface offers an easy way to move over a revision. > thanks a lot for the explanation > All this applies to core repo, not the grass-addons repo. Ideas and > volunteers are welcome. > Do you have any suggestions on how to proceed to grass-addons? Did you just run blake inside a folder or did you do something more? > Best, > Vaclav > -- ciao Luca www.lucadelu.org ___ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev