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

100% health when it's not #70

Closed
hugovk opened this issue Sep 10, 2014 · 6 comments
Closed

100% health when it's not #70

hugovk opened this issue Sep 10, 2014 · 6 comments

Comments

@hugovk
Copy link

hugovk commented Sep 10, 2014

Landscape reports a repo's health is 100% with defaults.

I added a .landscape.yaml config file and did a build to include warnings for tests, and then increased strictness from default medium to high and very high but all four still got 100% health.

https://landscape.io/github/hugovk/Pillow/24

I'm quite certain this shouldn't be the case because Travis CI is also running PEP8 and Pyflakes at the end of the build and gives plenty of warnings. For example:

https://travis-ci.org/hugovk/Pillow/jobs/34919670#L2787

And Landscape seems to know about the files. listing all 233 .py files:

https://landscape.io/github/hugovk/Pillow/24/modules?classes=syntax&classes=error&classes=smell&classes=style&classes=docs&show_all=all

Do I have the config somehow wrong?

Thanks!

@carlio
Copy link
Member

carlio commented Sep 10, 2014

I had a look, it turns out this is a combination of bugs. The problem is firstly that frosted is failing to handle the "Häggström" in (https://github.com/hugovk/Pillow/blob/master/PIL/WalImageFile.py) due to some kind of encoding issue which I haven't figured out yet. Landscape should detect that failure but does not, which is the second part of the bug.

I will dig into it more and submit a bug report for frosted once I figure out what's wrong. Hopefully I can also patch or workaround it enough to get the check running correctly.

If you want to get some accurate scores from Landscape in the meantime, then you could add something to your .landscape.yaml:

ignore-files:
  PIL/WalImageFile.py

This is obviously a hack and I will update you when I get a real solution!

@hugovk
Copy link
Author

hugovk commented Sep 10, 2014

Thanks for investigating.

I've added the workaround, but still get 100% and the file still shows up in the list of all files. Some things I tried:

ignore-files:
  PIL/WalImageFile.py

There's no ignore-files in the docs, but there is ignore-dirs and ignore-patterns.

ignore-patterns:
    - PIL/WalImageFile.py
ignore-patterns:
    - PIL/WalImageFile.py$

(It might be worth adding an ignore-files to avoid possible unwanted matches with ignore-patterns.)

hugovk added a commit to python-pillow/Pillow that referenced this issue Sep 17, 2014
Pillow isn't at 100% code health, there's plenty of PEP8 and Pyflakes warnings in our Travis CI. This is a bug in Landscape: 

landscapeio/landscape-issues#70

Let's remove the badge until Landscape's working properly.

Re: #895.
@hugovk
Copy link
Author

hugovk commented Sep 17, 2014

@carlio So how can a file be ignored by Landscape?

I see this didn't work in your test either; it still reports 100% health and zero warnings:

test-warnings: yes
strictness: veryhigh
ignore-files:
  - PIL/WalImageFile.py

https://landscape.io/github/carlio/Pillow/3

@carlio
Copy link
Member

carlio commented Sep 19, 2014

Hi @hugovk I haven't forgotten about this, just been super busy the last few days! It turns out there's a further bug in prospector in which frosted was not correctly ignoring files, and as such there isn't a way to get frosted to ignore this file. I have a workaround in prospector which I want to test and release soon, and once I update Landscape with that new release hopefully things will work a bit better.

(see landscapeio/prospector@081ee98)

@carlio
Copy link
Member

carlio commented Sep 27, 2014

@hugovk This commit to prospector has mitigated the problem, so that now 1) the ignoring configuration works properly and 2) if frosted fails due to an encoding error, it is simply skipped for that file, as pyflakes will flag most of the same issues.

You should be able to remove that ignore-files config too, if you like.

The score is now working properly - see https://landscape.io/github/hugovk/Pillow/69

Sorry it took so long, it was a combination of about 4 bugs in 4 different projects!

@carlio carlio closed this as completed Sep 27, 2014
@hugovk
Copy link
Author

hugovk commented Sep 30, 2014

@carlio Thanks for the fixes, happy to have helped identify four bugs in four projects!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants