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

v0.11.0.rc2: Widespread code reorganization (much more separation of concerns) #96

Merged
merged 13 commits into from
Mar 27, 2018
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@ python:
- 'nightly'
install:
- travis_retry pip install -r requirements-dev.txt
- make
before_script:
- wget http://apertium.projectjj.com/apt/install-nightly.sh -O - | sudo bash
- sudo apt-get -f --allow-unauthenticated install apertium-all-dev
- sudo apt-get -f --allow-unauthenticated install apertium-sme-nob apertium-es-en
- git clone --depth 1 https://github.com/apertium/apertium-nno /tmp/languages/apertium-nno || echo 'Using cached apertium-nno'
- ( cd /tmp/languages/apertium-nno && ./autogen.sh && make -j2 )
script:
- flake8 **/*.py
- flake8 *.py apertium_apy/ language_names/ tests/
- if [[ $TRAVIS_PYTHON_VERSION != 3.4 ]]; then
mypy --config-file mypy.ini **/*.py;
fi
- NONPAIRS=/tmp/languages python -m unittest tests/test*.py
- coverage report --fail-under 37
- coverage report --fail-under 35
after_success:
- coveralls
notifications:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ test-release: langNames.db
python3 setup.py sdist bdist_wheel upload --repository https://test.pypi.org/legacy/ --sign

test:
flake8 **/*.py
flake8 *.py apertium_apy/ language_names/ tests/
mypy --config-file mypy.ini **/*.py
python3 -m unittest tests/test*.py
coverage report --fail-under 37
coverage report --fail-under 35

clean:
rm -f langNames.db
Expand Down
12 changes: 12 additions & 0 deletions apertium_apy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import random
import string

if False:
from typing import Optional # noqa: F401

from apertium_apy import missingdb # noqa: F401

missing_freqs_db = None # type: Optional[missingdb.MissingDb] # has to be global for sig_handler :-/

RECAPTCHA_VERIFICATION_URL = 'https://www.google.com/recaptcha/api/siteverify'
BYPASS_TOKEN = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(24))
Loading