diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..a634a261630a9faeea636339e4c2ecc56cc8ba26 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,39 @@ +image: clarinpl/python:3.8 + +cache: + paths: + - .tox + +stages: + - test + - publish + +before_script: + - pip install tox==2.9.1 + - apt-get update -yqq + && apt-get install -yqq --no-install-recommends + make + g++ + && apt-get autoremove -yqq --purge + && apt-get clean + +unittests: + stage: test + script: + - export SKIP_TEST="1" + - tox -v -e pytest + +pypi_publish: + before_script: + - pip install twine + only: + - master + stage: publish + when: on_success + script: + - python setup.py sdist bdist_wheel + - python -m twine upload + --repository-url https://pypi.clarin-pl.eu/ + -u $PIPY_USER + -p $PIPY_PASS + dist/COMBO*.whl diff --git a/setup.cfg b/setup.cfg index 6876d0d7447015400e616dbd7479de01d19c2948..f974b4201101cbbb912dcbf7f050a67461792503 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,14 @@ [aliases] test=pytest +[tox] +envlist = py38 +skipsdist = True + +[testenv:pytest] +deps = pytest +commands = pytest + + [metadata] description-file = README.md diff --git a/setup.py b/setup.py index 8d4db9dd982dd9c9f27ac42156e328ad85135b5b..07cd2e37ec5187aa0c9819a6f50656c3ff534d3d 100644 --- a/setup.py +++ b/setup.py @@ -21,9 +21,11 @@ REQUIREMENTS = [ setup( name='COMBO', version='1.0.0b1', + author='Mateusz Klimaszewski', + author_email='M.Klimaszewski@ii.pw.edu.pl', install_requires=REQUIREMENTS, packages=find_packages(exclude=['tests']), - license="GPL-3.0", + license='GPL-3.0', url='https://gitlab.clarin-pl.eu/syntactic-tools/combo', keywords="nlp natural-language-processing dependency-parsing", setup_requires=['pytest-runner', 'pytest-pylint'], diff --git a/tests/test_main.py b/tests/test_main.py index 29dfc6ab216e94872de75c70aee11765303e9e65..afb7228e5898fb00f825aee5a8e73d637b53c76a 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -9,6 +9,8 @@ from allennlp.commands import train from allennlp.common import Params, util +@unittest.skipIf("SKIP_TEST" in os.environ, "Skipping, because torch 1.6.0 " + "https://github.com/pytorch/pytorch/issues/43300") class TrainingEndToEndTest(unittest.TestCase): PROJECT_ROOT = (pathlib.Path(__file__).parent / "..").resolve() MODULE_ROOT = PROJECT_ROOT / "combo" diff --git a/tests/test_predict.py b/tests/test_predict.py index 332ced3cfa010723fa51b77ce1742b8d976e1025..a077502264e8627afef11edebc4190bb6cfc8328 100644 --- a/tests/test_predict.py +++ b/tests/test_predict.py @@ -6,6 +6,8 @@ import combo.data as data import combo.predict as predict +@unittest.skipIf("SKIP_TEST" in os.environ, "Skipping, because torch 1.6.0 " + "https://github.com/pytorch/pytorch/issues/43300") class PredictionTest(unittest.TestCase): PROJECT_ROOT = (pathlib.Path(__file__).parent / "..").resolve() MODULE_ROOT = PROJECT_ROOT / "combo"