[AstroPy] Instructions for using dev tools
Nathan
nathan.goldbaum at gmail.com
Wed Sep 18 14:08:26 EDT 2019
If astropy isn't doing it already, you could probably have the flake8
configuration in a setup.cfg file. Here's what I do for unyt:
https://github.com/yt-project/unyt/blob/master/setup.cfg#L41
With this users just need to run `flake8` in the root of the project and it
"just works".
On Wed, Sep 18, 2019 at 12:06 PM Aldcroft, Thomas <
aldcroft at head.cfa.harvard.edu> wrote:
>
>
> On Wed, Sep 18, 2019 at 12:42 PM Anne Archibald <peridot.faceted at gmail.com>
> wrote:
>
>> Hi,
>>
>> I have been working on a couple of astropy pull requests, and I would
>> like to take advantage of various development tools, but I can't find any
>> instructions and they don't seem to do the right thing by default.
>>
>> * How do I run flake8 to see if my files meet the coding standards? If I
>> just run flake8 from the root directory I am submerged in a blizzard of
>> warnings from files I have never touched. The same is true of python
>> setup.py flake8. I see that there is a CI run that runs flake8 with all
>> sorts of warnings turned off, but it's arranged through an environment
>> variable so there's no easy way for me to use that (should I?). I can run
>> flake8-diff, but again it complains about all sorts of things - often lines
>> that are too long - that are clearly acceptable in astropy source code. Is
>> the current situation because there are two levels of flake8 compliance -
>> one that is needed to allow building at all, and a better one new code
>> should meet?
>>
>
> This is a great question and I look forward to hearing the answer from one
> of our infrastructure gurus.
>
>
>>
>> * How do I clear out the test environment? I find with python setup.py
>> test astropy keeps running tests left over from another branch. I have no
>> idea where these are stored, perhaps in the virtualenv of the installed
>> package?
>>
>
> I use the following hammer. There might be a better way, but I have had
> exactly the problem you described and this should fix it. First:
>
> $ git clean -nxd # Check files that are going to be cleaned
>
> Then:
>
> $ git clean -fxd # Remove *everything* that is not a tracked git file
>
> Another possibility (maybe try first?) is just `rm -rf build`. For
> instance the `git clean -fxd` will wipe out any IDE settings or other
> personal things you might have in the repo.
>
> - Tom
>
>
>>
>> I am happy to add the correct instructions to CONTRIBUTING.rst, when I
>> find out what they are.
>>
>> Thanks,
>> Anne
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at python.org
>> https://mail.python.org/mailman/listinfo/astropy
>>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20190918/0d6eda0f/attachment-0001.html>
More information about the AstroPy
mailing list