landscapeio / landscape-issues Goto Github PK
View Code? Open in Web Editor NEWThe public issue tracker for Landscape.io (https://landscape.io)
The public issue tracker for Landscape.io (https://landscape.io)
The accuracy of checking is significantly improved when the dependencies are installed and on the path at the time of checking.
I have some Thrift generated python in my project, which brings my whole score down.
Is there some way to exclude directories or files from being checked by landscape?
Thank you.
When using landscape.io for a PyQt based project we get a lots of errors related to missing members. This happens because PyQt4 cannot be installed using pip.
This problem will also happen with most python bindings that require to install a C++ library (pyzmq, pysfml,...).
My suggestion is to add the ability to install dependencies using apt-get (or any other package manager if the landscape.io virtual machines do not run on Ubuntu). Maybe something similar to how Travis-CI let us install dependencies.
My project binds a C++ library into Python. The Python part provides a Python-like, easy-to-use syntax and relies on internal functions written in C++ using the Python C API.
Of course, these functions cannot be detected.
It would be nice if we had a way to report this a "false positive" or better a way to declare functions imported from shared libraries.
Can I set up a python version in the configuration file ?
Some Python 3 new features are considered as errors...
Ex: print("") --> Unnecessary parens after 'print' keyword
Can't find the info in docs.
Thanks !
First off, thanks for Landscape. Its nice tool that has capabilities for becoming something awesome.
Now, I commit and push to github plenty, and when this happens Landscape basically spams me with emails that tell me "nothing changed".
IMHO mails could be configured to be sent only when notificable change occurs, or periodically, like x days after commit, that would be much appreciated.
Thanks!
Can be seen here: https://landscape.io/github/dnephin/PyStaticConfiguration/1/modules/staticconf/loader.py#L59
Of course it's redefining a built-in, it's for python 3 compatibility!
Most of my projects are receiving poor grades because of docs/conf.py
which is auto-generated by Sphinx and not something I wrote. If I could exclude that, I would ❤︎ landscape.io even more.
To be perfectly honest, at present, there is little the documentation for the commit hook could do to be more confusing while still being on-topic.
If you have created an account already at https://landscape.io, you can simply enable or disable checking of your repositories. The hooks will automatically be installed and uninstalled.
I suggest the following fixes:
If you view messages by type (error, smell etc) you get a small 7-line snippet of the file. This can sometimes be incorrect, as in the second message here: https://landscape.io/github/landscapeio/prospector/21/messages/114
Projects using pytest.ini with the pep8 plugin can configure the pep8 checking. Among others, there are two options that would be very relevant to landscape:
pep8ignore =
*.py E124 E126 E127 E128
setup.py ALL
settings.py ALL
urls.py ALL
*/migrations/* ALL
*/tests/* ALL
pep8maxlinelength = 99
By checking for a pytest.ini
file, parsing it and setting the max line length and ignored pep8 error codes, a lot of manual (and duplicate) configuration becomes unnecessary.
This would also partially resolve #39.
As is, Landscape's utility is limited by the long waits for it to realize that a repository has been updated.
That would be solved by fixing up the commit hook and following Travis's example in automating its setup but everything has a hiccup every now so, even then, it would help if the "Synchronise with GitHub" button was also available on individual repository pages to force a check for new commits if a notification got lost along the way.
See example here: https://gist.github.com/glaslos/60b03617d6b89d1813ed
This bug must have started up in the last week, because it wasn't reported on my repo then, and the lines have not changed.
The following code is reported to have the wrong hanging indentation inside of the help text:
parser.add_argument(
"-i",
"--input",
help="specify the filetype to convert from. Use when CDLConvert "
"cannot determine the filetype automatically. Supported input "
"formats are: "
"{inputs}".format(inputs=str(INPUT_FORMATS.keys()))
)
I can't get this error to appear in Prospector, pep8, pylint or flake8. It immediately triggers if I change the indentation to an incorrect spacing.
Landscape Repo Error Page
Github Repo
Thanks for your continued help.
It seems that landscape
is looking for files with the .py
extension. However, in some projects, the Python extension may be omitted when files are designed to be installed as programs in /usr/bin
. Would it be possible to provide a way to add such files in .landscape.yaml
?
Landscape allows me to make badge to put on my repo which is nice (everybody loves badges ;)), but link it gives you to use for MD documents is something like this:
[![Code Health](landscape.io/github/rafalp/Misago/future/landscape.png)](landscape.io/github/rafalp/Misago/future)
This link looks like this on Github:
Code maker should prepend "https://" to landscape.io
Can we get SVG badges like the ones here: http://shields.io/ (So they can all be of a nice consistent style, and render well on high resolution displays.)
When I first learned about landscape.io, I forked a couple repos so I could run the tools against them to satisfy my own curiosity. I've since deleted those repos, but I can't find any way to tell landscape to stop checking them. It would be awesome if I could do so without deleting my whole account. SImilarly, I've created some new repos and cannot find a way to refresh my repo list so begin checking those.
Landscape only warns about mixed indentation in a file. An additional option will be added to the .landscape.yaml
file to allow enforcing only tabs or only spaces in a repository.
(Related to #17)
It's not obvious or possible maybe to say that I prefer tabs to spaces. Not all of us are mindless sheep who follow the spacer crowd. Some of us actually use logic in our decisions.
If you create a branch and Landscape picks it up, then delete the branch from the repository, Landscape does not delete its corresponding branch information.
When a badge reads 100%, the text is aligned far enough to the right that it's only maybe 1px away from being chopped off by the edge of the image.
My impression is that the text position is defined as a left-alignment using static padding. If so, the simplest solution would be to len()
the text before drawing it and special-case the alignment for readouts with more than three characters.
See https://landscape.io/github/george2/sundara/23 and https://landscape.io/github/george2/sundara/23/diff. No information is given about why pylint failed, and the repository health is set to 100% instead of something like unknown
or error
.
Possibly related to #38?
Really, your site looks amazing it has a GREAT potential! That's exactly what I've been looking for these days because I really need a mentor to tell me what's wrong and what should I do with my code so it looks decent. That said, maybe you could also somehow check against Android code using their lints etc. You already import mixed-languages projects anyway. Now, "android java code supported" would be totally hot for people. I know a lot of folks who would use it more with Java than Python, though I'm a Python guy myself and don't know Java, so...
After adding a new repository, the initial report e-mail will eventually be sent out but the "Setting up..." status message on the dashboard will remain until the user refreshes the page.
I have an empty master branch, which gets a rating of 100 %. That does not make much sense to me. On the one hand, there are 0 errors/warnings/smells, but on the other hand, there are also 0 lines of python code that could be imperfect. Perhaps landscape should add a extra state for these situations. A pythonic choice would be to name this health rating None
, but unknown
would probably more human-readable.
It would be nice if I could exclude certain directories from landscape reports.
For example I'm using Sphinx for docs and landscape tests it's autogenerated conf.py:
https://landscape.io/github/rafalp/Misago/134/modules/docs/conf.py#L15
I would like to exclude this form process, is it possible?
Half a year ago, I tried Landscape to analyze my project (WeCase/WeCase), but it still broken today...
Check number 18 has failed. This is almost always due to a bug in Landscape - we have been notified. Sorry about that.
Failure reason: Prospector execution failed
Prospector did not complete correctly
In the breadcrumbs near the upper-right of the window, the link to the user/org appears to be broken.
Expected:https://landscape.io/github/mozilla
Actual: https://landscape.io/github/mozilla/solitude/master#
See screenshot:
Similar to #8, the link applied to the last committer's name is broken.
Expected: https://github.com/davidbgk
Actual: https://github.com/David%20Larlet
For Landscape.io to be truly useful, the signal-to-noise ratio needs to be high. That means that conscientious, active developers need to be able to run as close to the same set of tests offline before pushing as possible to minimize see-sawing in the Landscape read-out.
Unfortunately, currently, I can't seem to figure out how to match the output of Landscape using an offline Prospector install... it's far too eager to flood me with C####
-class nonsense about variable names and the like.
To maximize Landscape's success, the documentation needs to be amended with clear, reliable instructions for duplicating Landscape's Prospector configuration.
(While I'd now be concerned about backwards-compatibility when it comes to changing the behaviour used without an explicit config file, the ideal behaviour would be to have a bare "prospector" command give the same "sane, comfortable default" as Landscape under all circumstances.)
I'm not sure if that's a big problem and I didn't look the backend code to check it but does it check against Python 3 primarily? Some of my codes are supposed to be "old" Python 2 stuff for real and I don't know if I'm seeing errors not exactly written by me or just the backend flagging them because my code "should" be Python 3.
As can be seen here: https://landscape.io/github/WoLpH/django-admin-generator/6/messages/error#L318
I am getting the error Use of super on an old style class
, while the class is actually inheriting object somewhere down the road. Have I stumbled upon a bug or am I misunderstanding the way landscape checks?
Email has worked well since the 1970s, but it'd be nice to have notifications by other means such as IRC, Twitter, RSS or a callback HTTP call perhaps. Any thoughts?
I use topic branches and landscape only picks up some of them. Compare: https://github.com/cigroup-ol/metaopt/branches
master
worksdevelop
worksfinite_tasks_fix
worksBengt-StatusDB
failsSince aside from the conventional master
and develop
branches, the unconventional finite_tasks_fix
branch works, landscape seems to work with arbitrarily named branches. Bengt-StatusDB
has two features, the other branches lack: Capitalization and a dash (-
) in the name. Might some of that be the issue?
The error list (eg, https://landscape.io/github/akvo/akvo-sanitationcompass/1/messages/error) does not have pagination controls at the bottom, requiring the user to scroll up to the top again to get the next page.
Sometime between the 10th of May and the 29th of May, the following became a configuration error:
ignore-paths:
- setup.py
- cdl_convert/__init__.py
- docs
- tests
ignore-patterns:
It won't let ignore-patterns be blank, throwing an error about how ignore-patterns
cannot be set to (None). At the same time, it started ignoring my ignore-paths
, and began parsing setup.py
, and the __init__.py
file. It's still ignoring docs/
and tests/
.
McCabe now refuses to run, saying an exception was raised (Will not say exception).
I removed ignore-pattern
from my landscape.yaml file, but setup.py
and __init__.py
are still being listed in the reports, and McCabe still fails to run.
Here's a landscape report generated after I fixed the config file.
Thanks!
-Sean
Of course, since McCabe flags several of my more complicated functions, I'm quietly enjoying it's torment.
If you look at any of the other badges, you'll see that their invariant portions describe what they're testing, rather than the service's name.
This means that Landscape's badge is flat-out confusing when lined up next to other badges like this:
[Build|Passing] [Coverage|100%] [Landscape|100%] [PyPI Package|0.0.1]
"What the heck does "landscape" mean? Is it some technical term I'm unaware of?"
In fact, not only is the inconsistency jarring, when you put "Landscape" up against a bunch of badges which sacrifice the potential to plug their brand in favor of being more clear about what they're measuring, it makes Landscape's badge feel unprofessional by comparison.
The badge should say something like "Metrics" or "Code Quality" instead.
I use topic branches and would like to know whether and where they affect landscape's score. Landscape provides comparisons between commits of one branch, but not between commits of two branches. Initially comparing the HEADs of two branches might be enough, but ultimately selecting an arbitrary commit would be welcome.
There should be a way to ignore specific error codes for the flake8 checks (in my case it's E124 E126 E127 E128
). This can be done by using the flake8 --ignore
flag.
This is a fantastic tool for people learning Python who sometimes don't know if this or that is good code, but the errors and smells explanations are far from understandable by common lay men (like myself). It would be nice to at least have a link at the end of the explanation pointing to some place telling me more about it, as sometimes I don't even know what to look for on Google to better understand the problem.
I saw this problem with Pylint before where in things like:
https://landscape.io/github/WAFTI/wafti-news/16/modules/news_rhino/views.py
it doesn't understand that the Article model does in fact have an objects member added, but I think it'd done with magical metaclass stuff by Django. As far as static analysis of the class goes, its only members are a set of Django fields, but at runtime it has a lot more going on.
I'm not sure how you work around that apart from maybe having a specific exclusion for Django model classes, which is what I think I've done in that past with pylint (passed in the exclusion as part of the makefile that ran the tests).
Here's how links in emails send by landscape look like:
You can see the report at /github/rafalp/Misago/134
Currently, the reStructuredText badge code pastes like this.
.. image:: https://landscape.io/github/ssokolow/snakebyte/master/landscape.png
:target: https://landscape.io/github/ssokolow/snakebyte/master
However, indent aside (which is an issue), since it's hyperlinked, alt text is especially important. I'd suggest "Code Metrics", resulting in this:
.. image:: https://landscape.io/github/ssokolow/snakebyte/master/landscape.png
:target: https://landscape.io/github/ssokolow/snakebyte/master
:alt: Code Metrics
Can be seen here: https://landscape.io/github/dnephin/PyStaticConfiguration/1/modules/staticconf/loader.py#L251
Sphinx allows you to document constants and (and fields, etc) by putting a docstring after them, but this is being reported as String statement has no effect
.
i just synced github with landscape and it is not picking up all the repositories i have access to. in particular i'm interested in nipy/nipype.
Most websites have their logo link to the common 'home' page of a website, such as the dashboard or the home page, even if other links are there. Currently the logo doesn't and I instinctively go to click it when I want to return to my dashboard.
It's a small user enhancement which might benefit some users.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.