Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Edward Betts Newsgroups: linux.debian.maint.python Subject: Re: Test suite in github but missing from pypi tarballs Date: Fri, 22 Apr 2016 12:50:02 +0200 Message-ID: References: X-Original-To: debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Fri Apr 22 10:44:36 2016 Old-Return-Path: X-Amavis-Spam-Status: No, score=-6.876 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FOURLA=0.1, FVGT_m_MULTI_ODD=0.02, LDO_WHITELIST=-5, RP_MATCHES_RCVD=-0.996, WORD_WITHOUT_VOWELS=1] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -6.1 Mail-Followup-To: debian-python@lists.debian.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailing-List: archive/latest/13791 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20160422104407.GA22306@4angle.com Approved: robomod@news.nic.it Lines: 100 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Fri, 22 Apr 2016 11:44:07 +0100 X-Original-Message-ID: <20160422104407.GA22306@4angle.com> X-Original-References: <20160421141002.GA4590@4angle.com> Xref: csiph.com linux.debian.maint.python:8463 Here is a list of packages that include a test suite on github but not in the DPMT git. csvkit https://github.com/onyxfish/csvkit django-haystack https://github.com/toastdriven/django-haystack django-jinja https://github.com/niwibe/django-jinja django-recurrence https://github.com/django-recurrence/django-recurrence django-webpack-loader https://github.com/owais/django-webpack-loader djoser https://github.com/gizmag/django-fsm-log dockerpty https://github.com/d11wtq/dockerpty drf-generators https://github.com/Brobin/drf-generators mod-wsgi https://github.com/GrahamDumpleton/mod_wsgi pdfrw https://github.com/pmaupin/pdfrw pep8-naming https://github.com/flintwork/pep8-naming pkgconfig https://github.com/matze/pkgconfig pydot https://github.com/erocarrera/pydot pylast http://github.com/pylast/pylast pysrt https://github.com/byroot/pysrt python-args https://github.com/kennethreitz/args python-astor https://github.com/berkerpeksag/astor python-cachecontrol https://github.com/ionrock/cachecontrol python-easywebdav https://github.com/amnong/easywebdav python-exif https://github.com/ianare/exif-py python-gnutls https://github.com/AGProjects/python-gnutls python-hpilo https://github.com/seveas/python-hpilo python-humanize https://github.com/jmoiron/humanize python-jsonpify https://github.com/wcdolphin/flask-jsonpify python-model-mommy http://github.com/vandersonmota/model_mommy python-mrjob http://github.com/Yelp/mrjob python-pgspecial https://github.com/dbcli/pgspecial python-pip https://github.com/pypa/pip python-pretend https://github.com/alex/pretend python-rply https://github.com/alex/rply python-scp https://github.com/jbardin/scp.py python-sentinels https://github.com/vmalloc/sentinels python-sunlight https://github.com/sunlightlabs/python-sunlight python-trezor https://github.com/trezor/python-trezor python-zxcvbn https://github.com/dropbox/python-zxcvbn responses https://github.com/getsentry/responses subliminal https://github.com/Diaoul/subliminal txws https://github.com/MostAwesomeDude/txWS vcversioner https://github.com/habnabit/vcversioner whichcraft https://github.com/pydanny/whichcraft This is the code I ran on git.debian.org to generate the list. #!/usr/bin/python3 from subprocess import Popen, PIPE from urllib.request import urlopen from urllib.error import HTTPError import os import re re_github_url = re.compile('(https?://[^/ ]*github.com/[^/]+/[^/ ]+)') location = '/git/python-modules/packages/' def repo_includes_tests(repo): cmd = ['git', '--git-dir=' + location + repo, 'ls-tree', '-r', 'HEAD', '--name-only'] with Popen(cmd, stdout=PIPE, stderr=PIPE) as proc: for line in proc.stdout: filename = line.decode('utf-8')[:-1] if not filename.endswith('.py'): continue if filename.startswith('test') or '/test' in filename: return True return False def show_debian_file(repo, filename): cmd = ['git', '--git-dir=' + location + repo, 'show', 'HEAD:debian/' + filename] return Popen(cmd, stdout=PIPE, stderr=PIPE).stdout.read().decode('utf-8') def github_urls(content): github_urls = set() for line in content.splitlines(): if 'github.com' in line: m = re_github_url.search(line) if not m: print(line) github_urls.add(m.group(1)) return github_urls for repo in sorted(os.listdir(location)): if not repo.endswith('.git') or repo_includes_tests(repo): continue urls = (github_urls(show_debian_file(repo, 'copyright')) or github_urls(show_debian_file(repo, 'watch'))) if len(urls) != 1: continue (url,) = urls try: page = urlopen(url).read() except HTTPError: continue if ' title="test' not in page.decode('utf-8'): continue # no tests in github print('{:23s} {}'.format(repo[:-4], url))