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

QA Spider #33

Open
7 tasks
encukou opened this issue Mar 16, 2017 · 8 comments
Open
7 tasks

QA Spider #33

encukou opened this issue Mar 16, 2017 · 8 comments

Comments

@encukou
Copy link
Member

encukou commented Mar 16, 2017

Make a spider tool that will go through all pages of a site and check stuff. It would run as part of CI and reject bad PRs.
This might make more sense as a separate project, not part of elsa, but tracker currently this seems like the best place to track the idea.
Please coordinate here before starting work; a few people are exploring the idea.

Ideas for checks:

  • Weed out 404s/500s in internal links
  • Check external links
  • Check orphaned pages (frozen, but no links to them)
  • Validate HTML
  • Verify slashes at end of URLs
  • Measure code coverage
  • Lint URL structure (e.g. removing last URL segment results in valid URL)
@encukou
Copy link
Member Author

encukou commented Mar 16, 2017

I currently use this hack for naucse.python.cz: https://gist.github.com/encukou/6f0038a3e104dfbed8a08031de03ab0b

@encukou
Copy link
Member Author

encukou commented Mar 16, 2017

Note that LinkChecker and similar tools exist, but all seem to target already deployed sites.

@hroncok
Copy link
Member

hroncok commented Mar 16, 2017

Already deployed sites - not a problem, we can freeze --serve and run it on localhost, can't we?

@encukou
Copy link
Member Author

encukou commented Mar 16, 2017

Indeed (it won't find orphaned pages, but I guess that's not that important)

@honzajavorek
Copy link
Member

Check orphaned pages (frozen, but no links to them)

I think Flask-Frozen does this out of the box, sort of. It follows links and if there is a route which isn't linked, you need to write a generator for it. So it should be enough if you don't write any generators 😄

@honzajavorek
Copy link
Member

honzajavorek commented Aug 10, 2018

Also, many of the points are provided by Sphinx extensions. I'm wondering whether we're not reimplementing a wheel here.

@encukou
Copy link
Member Author

encukou commented Aug 10, 2018

Sphinx is nice, but I don't think it's really useful for sites that run on Elsa – I wouldn't want to rewrite pyladies.cz, fedoralovespython.org to ReST...
Something generic (or at least specific to Flask) would be more appropriate.

@honzajavorek
Copy link
Member

honzajavorek commented Aug 10, 2018 via email

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

No branches or pull requests

3 participants