diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 15104939b..000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -name: "\U0001F41B Bug Report" -about: Submit a bug report to help us improve TorchText - ---- - -## ๐Ÿ› Bug -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Environment** - -Please copy and paste the output from our -[environment collection script](https://raw.githubusercontent.com/pytorch/text/master/torchtext/utils/collect_env.py) -(or fill out the checklist below manually). - -You can get the script and run it with: -``` -wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py -# For security purposes, please check the contents of collect_env.py before running it. -python collect_env.py -python -c "import torchtext; print(\"torchtext version is \", torchtext.__version__)" -``` - - - PyTorch Version (e.g., 1.0): - - OS (e.g., Linux): - - How you installed PyTorch (`conda`, `pip`, source): - - Build command you used (if compiling from source): - - Python version: - - CUDA/cuDNN version: - - GPU models and configuration: - - Any other relevant information: - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md deleted file mode 100644 index b9e37a277..000000000 --- a/.github/ISSUE_TEMPLATE/documentation.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: "\U0001F4DA Documentation" -about: Report an issue related to TorchText - ---- - -## ๐Ÿ“š Documentation - -**Description** - diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 4872607a4..000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: "\U0001F680Feature Request" -about: Submit a proposal/request for a new TorchText feature - ---- - -## ๐Ÿš€ Feature - - -**Motivation** - - - -**Pitch** - - - -**Alternatives** - - - -**Additional context** - - diff --git a/.github/ISSUE_TEMPLATE/questions-help-support.md b/.github/ISSUE_TEMPLATE/questions-help-support.md deleted file mode 100644 index d1e8eab0d..000000000 --- a/.github/ISSUE_TEMPLATE/questions-help-support.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: "โ“Questions/Help/Support" -about: Do you need support? We have resources. - ---- - -## โ“ Questions and Help - -**Description** - diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8e2279529..000000000 --- a/.gitignore +++ /dev/null @@ -1,122 +0,0 @@ -*.txt -*.zip -*~ -.vector_cache -.idea/ - -# Documentation -docs/build - -# Download folder -.data - -# Created by https://www.gitignore.io/api/python - -### Python ### -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule.* - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ - -# End of https://www.gitignore.io/api/python - -# vim -*.swp -*.swo diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1c8f2707a..000000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -dist: trusty - -language: python - -cache: - directories: - - /home/travis/download - - /home/travis/.cache/pip - -# This matrix tests that the code works on Python 2.7, -# 3.5, 3.6 (same versions as PyTorch CI), and passes lint. -matrix: - fast_finish: true - include: - - env: PYTHON_VERSION="3.5" COVERAGE="true" - - env: PYTHON_VERSION="3.6" COVERAGE="true" - - env: PYTHON_VERSION="3.6" RUN_FLAKE8="true" SKIP_TESTS="true" - - env: PYTHON_VERSION="3.6" RUN_SLOW="true" COVERAGE="true" - sudo: required - allow_failures: - - env: PYTHON_VERSION="3.6" RUN_SLOW="true" COVERAGE="true" - -notifications: - email: false - -install: source build_tools/travis/install.sh -script: bash build_tools/travis/test_script.sh -after_success: source build_tools/travis/after_success.sh diff --git a/build_tools/conda/torchtext/meta.yaml b/build_tools/conda/torchtext/meta.yaml deleted file mode 100644 index 8d4c8b689..000000000 --- a/build_tools/conda/torchtext/meta.yaml +++ /dev/null @@ -1,35 +0,0 @@ -package: - name: torchtext - version: 0.4.0 - -source: - url: https://github.com/pytorch/text/archive/0.4.0.zip - -requirements: - build: - - python - - setuptools - - run: - - python - - tqdm - - numpy >=1.11 - - pytorch >=1.2 - - requests - - six - -build: - number: 1 - noarch: python - script: python setup.py install --single-version-externally-managed --record=record.txt - -test: - imports: - - torchtext - - torchtext.data - -about: - home: https://github.com/pytorch/text - license: BSD - license_file: LICENSE - summary: 'PyTorch Data loaders and abstractions for text and NLP' diff --git a/build_tools/travis/after_success.sh b/build_tools/travis/after_success.sh deleted file mode 100644 index 5f672c0db..000000000 --- a/build_tools/travis/after_success.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# This script is meant to be called by the "after_success" step defined in -# .travis.yml. See http://docs.travis-ci.com/ for more details. - -set -e - -if [[ "$COVERAGE" == "true" ]]; then - # Ignore codecov failures as the codecov server is not - # very reliable but we don't want travis to report a failure - # in the github UI just because the coverage report failed to - # be published. - codecov || echo "codecov upload failed" -fi diff --git a/build_tools/travis/install.sh b/build_tools/travis/install.sh deleted file mode 100644 index 57370136d..000000000 --- a/build_tools/travis/install.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# This script is meant to be called by the "install" step defined in -# .travis.yml. See http://docs.travis-ci.com/ for more details. -# The behavior of the script is controlled by environment variabled defined -# in the .travis.yml in the top level folder of the project. - -set -e - -echo 'List files from cached directories' -if [ -d $HOME/download ]; then - echo 'download:' - ls $HOME/download -fi -if [ -d $HOME/.cache/pip ]; then - echo 'pip:' - ls $HOME/.cache/pip -fi - -# Deactivate the travis-provided virtual environment and setup a -# conda-based environment instead -deactivate - -# Add the miniconda bin directory to $PATH -export PATH=/home/travis/miniconda3/bin:$PATH -echo $PATH - -# Use the miniconda installer for setup of conda itself -pushd . -cd -mkdir -p download -cd download -if [[ ! -f /home/travis/miniconda3/bin/activate ]] -then - if [[ ! -f miniconda.sh ]] - then - wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \ - -O miniconda.sh - fi - chmod +x miniconda.sh && ./miniconda.sh -b -f - conda update --yes conda - echo "Creating environment to run tests in." - conda create -n testenv --yes python="$PYTHON_VERSION" -fi -cd .. -popd - -# Activate the python environment we created. -source activate testenv - -# Install requirements via pip in our conda environment -pip install -r requirements.txt - -# Install the following only if running tests -if [[ "$SKIP_TESTS" != "true" ]]; then - # SpaCy English models - python -m spacy download en - -# TODO: Add nltk data back once moses tokenizer is back online. -# https://github.com/alvations/sacremoses/issues/61 -# # NLTK data needed for Moses tokenizer -# python -m nltk.downloader perluniprops nonbreaking_prefixes -# - # PyTorch - conda install --yes pytorch -c pytorch-test - - # Installation - python setup.py install -fi diff --git a/build_tools/travis/test_script.sh b/build_tools/travis/test_script.sh deleted file mode 100644 index 200d8eb8b..000000000 --- a/build_tools/travis/test_script.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# This script is meant to be called by the "script" step defined in -# .travis.yml. See http://docs.travis-ci.com/ for more details. -# The behavior of the script is controlled by environment variabled defined -# in the .travis.yml in the top level folder of the project. - -set -e - -python --version - -run_tests() { - if [[ "$RUN_SLOW" == "true" ]]; then - TEST_CMD="py.test --runslow -s -v --cov=torchtext --durations=20" - else - TEST_CMD="py.test -v --cov=torchtext --durations=20" - fi - $TEST_CMD -} - -if [[ "$RUN_FLAKE8" == "true" ]]; then - flake8 -fi - -if [[ "$SKIP_TESTS" != "true" ]]; then - run_tests -fi diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/.flake8 b/tox.ini similarity index 51% rename from .flake8 rename to tox.ini index 022e85ee8..031c25c69 100644 --- a/.flake8 +++ b/tox.ini @@ -1,4 +1,4 @@ [flake8] -ignore = E402,E722,W503,W504 +ignore = E402,E722,W503,W504,F821,B006,B007,B008 max-line-length = 120 exclude = docs/source