From 3a3e491649704518d82b1d7da7aad0c694548b46 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 8 Sep 2018 17:32:25 +0200 Subject: [PATCH] Remove requirements.txt, update docs --- CONTRIBUTING.rst | 21 +++++++++------------ MANIFEST.in | 2 -- requirements.txt | 3 --- setup.cfg | 3 +++ setup.py | 14 +++++--------- 5 files changed, 17 insertions(+), 26 deletions(-) delete mode 100644 requirements.txt diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 3230fa1..058fc6a 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -94,23 +94,20 @@ How to Add New Policy ``NodeType.STRING``. Use ``NodeType.TOPLEVEL`` if you need to lint only once. -5. Run the test +5. Running the tests - You can test by `tox `__ or - `py.test `__ or the default unittest - module. - - There are test command examples; + The recommended way to run the tests is by using tox + `tox `__, but you can use pytest + directly also, e.g. :: - $ pyenv local 2.7.8 3.4.1 - $ tox + $ tox -e py37 - If you want to test by py.test, you should add ``vint/bin`` to - ``$PATH`` to make acceptance tests pass. + If you want to test using pytest, you should add ``vint/bin`` to + ``$PATH`` to make acceptance tests pass: :: - $ pip install -r requirements.txt -r test-requirements.txt` - $ PATH="./bin:$PATH" py.test test` + $ pip install -e '.[testing]' + $ PATH="./bin:$PATH" pytest diff --git a/MANIFEST.in b/MANIFEST.in index c5baa9f..3da4f4a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,8 +2,6 @@ include README.markdown include LICENSE.txt include VERSION.txt include MANIFEST.in -include requirements.txt -include test-requirements.txt recursive-include vint/asset * recursive-exclude * __pycache__ recursive-exclude * *.py[co] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 06bc16d..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -PyYAML ~= 3.11 -ansicolor ~= 0.2.4 -chardet >= 2.3.0 diff --git a/setup.cfg b/setup.cfg index 9f4186b..7b4721e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,3 +5,6 @@ description-file = README.markdown max-line-length = 100 exclude = vint/_bundles/* ignore = E303 + +[tool:pytest] +testpaths = test diff --git a/setup.py b/setup.py index f2b58e3..75f704b 100644 --- a/setup.py +++ b/setup.py @@ -1,22 +1,18 @@ #!/usr/bin/env python -import sys import os.path from setuptools import setup, find_packages -def load_requires_from_file(filepath): - return [pkg_name.rstrip('\r\n') for pkg_name in open(filepath).readlines()] - - -install_requires = load_requires_from_file('requirements.txt') -install_requires += [ +install_requires = [ + 'PyYAML~=3.11', + 'ansicolor~=0.2.4', + 'chardet>=2.3.0', 'setuptools>=36.2.2', # for enhanced marker support (used below). 'enum34>=1.0.4;python_version<"3.4"', 'pathlib==1.0.1;python_version<"3.4"', 'typing>=3.6.2;python_version<"3.6"', ] - test_requires = [ 'pytest==3.6.3', 'pytest-cov==2.5.1', @@ -41,7 +37,7 @@ def get_version(): author='Kuniwak', author_email='orga.chem.job+vint@gmail.com', url='https://github.com/Kuniwak/vint', - download_url='https://github.com/Kuniwak/vint/archive/v{version}.tar.gz'.format(version=VERSION), + download_url='https://github.com/Kuniwak/vint/archive/v{version}.tar.gz'.format(version=VERSION), # noqa: E501 install_requires=install_requires, tests_require=test_requires, extras_require={