-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
192 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.coverage | ||
build | ||
dist | ||
ld | ||
codespell.egg-info | ||
*.pyc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# vim ft=yaml | ||
# Multiple lines can be made a single "virtual line" because of how Travis | ||
# munges each line before executing it to print out the exit status. It's okay | ||
# for it to be on multiple physical lines, so long as you remember: - There | ||
# can't be any leading "-"s - All newlines will be removed, so use ";"s | ||
|
||
language: python | ||
|
||
# Run jobs on container-based infrastructure, can be overridden per job | ||
sudo: false | ||
|
||
cache: | ||
directories: | ||
- $HOME/.cache/pip | ||
|
||
python: | ||
# 2.7 | ||
- 3.3 | ||
- 3.4 | ||
- 3.5 | ||
|
||
before_install: | ||
- source tools/travis_tools.sh | ||
- SRC_DIR=$PWD | ||
- cd ~ | ||
- virtualenv --python=python venv | ||
- source venv/bin/activate | ||
- python --version # just to check | ||
- pip install -U pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors | ||
- retry pip install nose flake8 coverage codecov | ||
- cd $SRC_DIR | ||
|
||
install: | ||
- python setup.py install | ||
|
||
# command to run tests, e.g. python setup.py test | ||
script: | ||
- flake8 | ||
- nosetests | ||
|
||
after_success: | ||
- codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env python | ||
|
||
import sys | ||
|
||
if __name__ == '__main__': | ||
import codespell_lib | ||
sys.exit(codespell_lib.main(*sys.argv)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from ._codespell import main, VERSION as __version__ # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import tempfile | ||
|
||
from nose.tools import assert_equal | ||
|
||
from codespell_lib import main | ||
|
||
|
||
def test_basic(): | ||
"""Test some basic functionality""" | ||
assert_equal(main('_does_not_exist_'), 0) | ||
with tempfile.NamedTemporaryFile() as f: | ||
f.write('this is a test file\n'.encode('utf-8')) | ||
f.flush() | ||
assert_equal(main(f.name,), 0) | ||
f.write('abandonned'.encode('utf-8')) | ||
f.flush() | ||
assert_equal(main(f.name), 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[nosetests] | ||
with-coverage = 1 | ||
cover-package = codespell_lib | ||
detailed-errors = 1 | ||
verbose = 3 | ||
|
||
[flake8] | ||
exclude = build | ||
ignore = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#! /usr/bin/env python | ||
|
||
# adapted from mne-python | ||
|
||
import os | ||
from os import path as op | ||
|
||
try: | ||
import setuptools # noqa to allow --develop | ||
except Exception: | ||
pass | ||
from distutils.core import setup | ||
|
||
from codespell_lib import __version__ | ||
|
||
DISTNAME = 'codespell' | ||
DESCRIPTION = """Codespell""" | ||
MAINTAINER = 'Lucas De Marchi' | ||
MAINTAINER_EMAIL = '[email protected]' | ||
URL = 'https://github.com/lucasdemarchi/codespell/' | ||
LICENSE = 'GPL v2' | ||
DOWNLOAD_URL = 'https://github.com/lucasdemarchi/codespell/' | ||
with open('README.md', 'r') as f: | ||
LONG_DESCRIPTION = f.read() | ||
|
||
if __name__ == "__main__": | ||
if os.path.exists('MANIFEST'): | ||
os.remove('MANIFEST') | ||
|
||
setup(name=DISTNAME, | ||
maintainer=MAINTAINER, | ||
include_package_data=True, | ||
maintainer_email=MAINTAINER_EMAIL, | ||
description=DESCRIPTION, | ||
license=LICENSE, | ||
url=URL, | ||
version=__version__, | ||
download_url=DOWNLOAD_URL, | ||
long_description=LONG_DESCRIPTION, | ||
zip_safe=False, | ||
classifiers=['Intended Audience :: Developers', | ||
'License :: OSI Approved', | ||
'Programming Language :: Python', | ||
'Topic :: Software Development', | ||
'Operating System :: Microsoft :: Windows', | ||
'Operating System :: POSIX', | ||
'Operating System :: Unix', | ||
'Operating System :: MacOS'], | ||
platforms='any', | ||
packages=[ | ||
'codespell_lib', 'codespell_lib.tests', | ||
'codespell_lib.data', | ||
], | ||
package_data={'codespell_lib': [ | ||
op.join('data', 'dictionary.txt'), | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
larsoner
Author
Member
|
||
op.join('data', 'linux-kernel.exclude'), | ||
]}, | ||
scripts=['bin/codespell.py']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Tools for working with travis-ci | ||
WHEELHOSTS="travis-wheels.scikit-image.org travis-dev-wheels.scipy.org" | ||
|
||
PIP_FLAGS="--timeout=60 --no-index" | ||
|
||
for host in $WHEELHOSTS; do | ||
PIP_FLAGS="${PIP_FLAGS} --trusted-host ${host} --find-links=http://${host}" | ||
done | ||
|
||
|
||
retry () { | ||
# https://gist.github.com/fungusakafungus/1026804 | ||
local retry_max=5 | ||
local count=$retry_max | ||
while [ $count -gt 0 ]; do | ||
"$@" && break | ||
count=$(($count - 1)) | ||
sleep 1 | ||
done | ||
|
||
[ $count -eq 0 ] && { | ||
echo "Retry failed [$retry_max]: $@" >&2 | ||
return 1 | ||
} | ||
return 0 | ||
} | ||
|
||
|
||
wheelhouse_pip_install() { | ||
# Install pip requirements via travis wheelhouse | ||
retry pip install $PIP_FLAGS $@ | ||
} |
I just downloaded codespell package from https://pypi.python.org/pypi/codespell and I do not see any dictionary included there.