From fdc4a6aabfbf388af9a0cd7a25b123a77b402dde Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 11:56:04 +0100
Subject: [PATCH 01/23] Add gitlab CI.

---
 .gitlab-ci.yml | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..e2eb4a1
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,25 @@
+image: clarinpl/python:3.8
+
+stages:
+  - test
+  - deploy
+
+unittests:
+  stage: test
+  script:
+    - python setup.py test
+
+pypi_deploy:
+  before_script:
+   - pip install twine
+  only:
+   - master
+  stage: deploy
+  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
-- 
GitLab


From 3a2415e84848dad322484ff5bb4a73ed93a10fc8 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 12:04:46 +0100
Subject: [PATCH 02/23] Add g++ and make for jsonnet installation.

---
 .gitlab-ci.yml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e2eb4a1..7597e85 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,10 @@ stages:
   - test
   - deploy
 
+before_script:
+  - apt-get install make
+  - apt-get install g++
+
 unittests:
   stage: test
   script:
-- 
GitLab


From f92eaf64d6455d1d9981ddb79a6050b9529ed462 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 12:06:32 +0100
Subject: [PATCH 03/23] Add yqq.

---
 .gitlab-ci.yml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7597e85..fdfd3ef 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,8 +5,12 @@ stages:
   - deploy
 
 before_script:
-  - apt-get install make
-  - apt-get install g++
+  - apt-get update -yqq \
+    && apt-get install -yqq --no-install-recommends
+    make
+    g++
+    && apt-get autoremove -yqq --purge
+    && apt-get clean
 
 unittests:
   stage: test
-- 
GitLab


From b12f9a980e3d677cc89e0aa0b2973d22e23db270 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 12:09:02 +0100
Subject: [PATCH 04/23] Remove udpate command argument.

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fdfd3ef..0993581 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,7 +5,7 @@ stages:
   - deploy
 
 before_script:
-  - apt-get update -yqq \
+  - apt-get update -yqq
     && apt-get install -yqq --no-install-recommends
     make
     g++
-- 
GitLab


From 429b5d9b00ecd2876ecd2d507bc0fa1565ba1b8d Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 12:53:02 +0100
Subject: [PATCH 05/23] Add tox.

---
 .gitlab-ci.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0993581..aaf7de4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,10 +1,15 @@
 image: clarinpl/python:3.8
 
+cache:
+  paths:
+    - .tox
+
 stages:
   - test
   - deploy
 
 before_script:
+  - pip install tox==2.9.1
   - apt-get update -yqq
     && apt-get install -yqq --no-install-recommends
     make
@@ -15,7 +20,7 @@ before_script:
 unittests:
   stage: test
   script:
-    - python setup.py test
+    - tox -v -e pytest
 
 pypi_deploy:
   before_script:
-- 
GitLab


From af573ed21d31454c896935218b500ed169653e03 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 12:54:09 +0100
Subject: [PATCH 06/23] Add tox configuration.

---
 setup.cfg | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/setup.cfg b/setup.cfg
index 6876d0d..85f620e 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,14 @@
 [aliases]
 test=pytest
 
+[tox]
+skipsdist = True
+
+[testenv:pytest]
+deps = pytest
+basepython = python3
+commands = pytest
+
+
 [metadata]
 description-file = README.md
-- 
GitLab


From 1a0c1b96d927c2dbd46c9e75de2f137fd49f1eab Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 13:01:03 +0100
Subject: [PATCH 07/23] Add multiple python versions in tox.

---
 setup.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.cfg b/setup.cfg
index 85f620e..a10f739 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,11 +2,11 @@
 test=pytest
 
 [tox]
+envlist = py36,py37,py38
 skipsdist = True
 
 [testenv:pytest]
 deps = pytest
-basepython = python3
 commands = pytest
 
 
-- 
GitLab


From 57349740f9e4009f457eabdf2dd6f9f9592f43dd Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 13:27:39 +0100
Subject: [PATCH 08/23] Test manual tmp path.

---
 setup.cfg          | 2 +-
 tests/test_main.py | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/setup.cfg b/setup.cfg
index a10f739..f974b42 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,7 +2,7 @@
 test=pytest
 
 [tox]
-envlist = py36,py37,py38
+envlist = py38
 skipsdist = True
 
 [testenv:pytest]
diff --git a/tests/test_main.py b/tests/test_main.py
index 29dfc6a..83ac6cd 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -14,7 +14,7 @@ class TrainingEndToEndTest(unittest.TestCase):
     MODULE_ROOT = PROJECT_ROOT / "combo"
     TESTS_ROOT = PROJECT_ROOT / "tests"
     FIXTURES_ROOT = TESTS_ROOT / "fixtures"
-    TEST_DIR = pathlib.Path(tempfile.mkdtemp(prefix="allennlp_tests"))
+    TEST_DIR = pathlib.Path("/tmp/test")
 
     def setUp(self) -> None:
         logging.getLogger("allennlp.common.util").disabled = True
@@ -24,6 +24,7 @@ class TrainingEndToEndTest(unittest.TestCase):
 
     def test_training_produces_model(self):
         # given
+        self.TEST_DIR.mkdir(exist_ok=True)
         util.import_module_and_submodules("combo.models")
         util.import_module_and_submodules("combo.training")
         ext_vars = {
-- 
GitLab


From a26aeae62c2e89ac4a74a9aa434b393d41a77678 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 13:44:03 +0100
Subject: [PATCH 09/23] Skip model training test for CI.

---
 tests/test_main.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_main.py b/tests/test_main.py
index 83ac6cd..21965d7 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -9,12 +9,13 @@ from allennlp.commands import train
 from allennlp.common import Params, util
 
 
+@unittest.skip("Skipping for CI test.")
 class TrainingEndToEndTest(unittest.TestCase):
     PROJECT_ROOT = (pathlib.Path(__file__).parent / "..").resolve()
     MODULE_ROOT = PROJECT_ROOT / "combo"
     TESTS_ROOT = PROJECT_ROOT / "tests"
     FIXTURES_ROOT = TESTS_ROOT / "fixtures"
-    TEST_DIR = pathlib.Path("/tmp/test")
+    TEST_DIR = pathlib.Path(tempfile.mkdtemp(prefix="allennlp_tests"))
 
     def setUp(self) -> None:
         logging.getLogger("allennlp.common.util").disabled = True
@@ -24,7 +25,6 @@ class TrainingEndToEndTest(unittest.TestCase):
 
     def test_training_produces_model(self):
         # given
-        self.TEST_DIR.mkdir(exist_ok=True)
         util.import_module_and_submodules("combo.models")
         util.import_module_and_submodules("combo.training")
         ext_vars = {
-- 
GitLab


From e35074be81f7a98f8b13e0c968bb1d9a582b1d75 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 13:56:09 +0100
Subject: [PATCH 10/23] Skip model training test for CI.

---
 tests/test_predict.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test_predict.py b/tests/test_predict.py
index 332ced3..6af9522 100644
--- a/tests/test_predict.py
+++ b/tests/test_predict.py
@@ -6,6 +6,7 @@ import combo.data as data
 import combo.predict as predict
 
 
+@unittest.skip("Skipping for CI test.")
 class PredictionTest(unittest.TestCase):
     PROJECT_ROOT = (pathlib.Path(__file__).parent / "..").resolve()
     MODULE_ROOT = PROJECT_ROOT / "combo"
-- 
GitLab


From 17cc88ce4aba5e83880e0322c07d3c8326c11d5d Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 14:05:49 +0100
Subject: [PATCH 11/23] Add conditional test skipping.

---
 tests/test_main.py    | 2 +-
 tests/test_predict.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_main.py b/tests/test_main.py
index 21965d7..0335afb 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -9,7 +9,7 @@ from allennlp.commands import train
 from allennlp.common import Params, util
 
 
-@unittest.skip("Skipping for CI test.")
+@unittest.skipIf(os.getenv("CI_JOB_ID", False), "Skipping for CI test.")
 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 6af9522..6ef3916 100644
--- a/tests/test_predict.py
+++ b/tests/test_predict.py
@@ -6,7 +6,7 @@ import combo.data as data
 import combo.predict as predict
 
 
-@unittest.skip("Skipping for CI test.")
+@unittest.skipIf(os.getenv("CI_JOB_ID", False), "Skipping for CI test.")
 class PredictionTest(unittest.TestCase):
     PROJECT_ROOT = (pathlib.Path(__file__).parent / "..").resolve()
     MODULE_ROOT = PROJECT_ROOT / "combo"
-- 
GitLab


From 50833bc7c989bf528189d228b0a0e314a642a280 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 14:13:10 +0100
Subject: [PATCH 12/23] Fix conditional test skipping.

---
 tests/test_main.py    | 2 +-
 tests/test_predict.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_main.py b/tests/test_main.py
index 0335afb..4ea617a 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -9,7 +9,7 @@ from allennlp.commands import train
 from allennlp.common import Params, util
 
 
-@unittest.skipIf(os.getenv("CI_JOB_ID", False), "Skipping for CI test.")
+@unittest.skipIf(os.getenv("CI", False), "Skipping for CI test.")
 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 6ef3916..d1ce2e1 100644
--- a/tests/test_predict.py
+++ b/tests/test_predict.py
@@ -6,7 +6,7 @@ import combo.data as data
 import combo.predict as predict
 
 
-@unittest.skipIf(os.getenv("CI_JOB_ID", False), "Skipping for CI test.")
+@unittest.skipIf(os.getenv("CI", False), "Skipping for CI test.")
 class PredictionTest(unittest.TestCase):
     PROJECT_ROOT = (pathlib.Path(__file__).parent / "..").resolve()
     MODULE_ROOT = PROJECT_ROOT / "combo"
-- 
GitLab


From 7abd3942904a04cbf2e30c227fb56cd48c2d323d Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 14:23:30 +0100
Subject: [PATCH 13/23] Fix conditional test skipping.

---
 tests/test_main.py    | 2 +-
 tests/test_predict.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_main.py b/tests/test_main.py
index 4ea617a..5df6fac 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -9,7 +9,7 @@ from allennlp.commands import train
 from allennlp.common import Params, util
 
 
-@unittest.skipIf(os.getenv("CI", False), "Skipping for CI test.")
+@unittest.skipIf(os.getenv("CI") is not None, "Skipping for CI test.")
 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 d1ce2e1..e81672e 100644
--- a/tests/test_predict.py
+++ b/tests/test_predict.py
@@ -6,7 +6,7 @@ import combo.data as data
 import combo.predict as predict
 
 
-@unittest.skipIf(os.getenv("CI", False), "Skipping for CI test.")
+@unittest.skipIf(os.getenv("CI") is not None, "Skipping for CI test.")
 class PredictionTest(unittest.TestCase):
     PROJECT_ROOT = (pathlib.Path(__file__).parent / "..").resolve()
     MODULE_ROOT = PROJECT_ROOT / "combo"
-- 
GitLab


From 6bb095c1e2da15848312fd5c54ba62024007e467 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 14:39:28 +0100
Subject: [PATCH 14/23] Print params.

---
 .gitlab-ci.yml     | 6 +++---
 tests/test_main.py | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index aaf7de4..c2338da 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,7 @@ cache:
 
 stages:
   - test
-  - deploy
+  - publish
 
 before_script:
   - pip install tox==2.9.1
@@ -22,12 +22,12 @@ unittests:
   script:
     - tox -v -e pytest
 
-pypi_deploy:
+pypi_publish:
   before_script:
    - pip install twine
   only:
    - master
-  stage: deploy
+  stage: publish
   when: on_success
   script:
    - python setup.py sdist bdist_wheel
diff --git a/tests/test_main.py b/tests/test_main.py
index 5df6fac..051765d 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -45,6 +45,7 @@ class TrainingEndToEndTest(unittest.TestCase):
                                   ext_vars=ext_vars)
 
         # when
+        print(params)
         model = train.train_model(params, serialization_dir=self.TEST_DIR)
 
         # then
-- 
GitLab


From 258a8c2170ea2d817bc171b70d4aa7462a7bb383 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 14:49:25 +0100
Subject: [PATCH 15/23] Print x.

---
 combo/models/embeddings.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/combo/models/embeddings.py b/combo/models/embeddings.py
index d8e9d7a..00a38a3 100644
--- a/combo/models/embeddings.py
+++ b/combo/models/embeddings.py
@@ -37,6 +37,7 @@ class CharacterBasedWordEmbeddings(token_embedders.TokenEmbedder):
         x = self.char_embed(x)
         x = x * char_mask.unsqueeze(-1).float()
         x = self.dilated_cnn_encoder(x.transpose(2, 3))
+        print(x)
         return torch.max(x, dim=-1)[0]
 
     @overrides
-- 
GitLab


From 76043b45b5cd5868846381f5a1f0826d036de84e Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 15:01:24 +0100
Subject: [PATCH 16/23] Enable print.

---
 setup.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.cfg b/setup.cfg
index f974b42..b13fae6 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,7 +7,7 @@ skipsdist = True
 
 [testenv:pytest]
 deps = pytest
-commands = pytest
+commands = pytest --capture=no
 
 
 [metadata]
-- 
GitLab


From a9afddd54d54610329bc7628f20f5062f96ec786 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 15:19:18 +0100
Subject: [PATCH 17/23] ATEN default.

---
 setup.cfg | 2 ++
 setup.py  | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/setup.cfg b/setup.cfg
index b13fae6..8c2da9a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -3,6 +3,8 @@ test=pytest
 
 [tox]
 envlist = py38
+setenv =
+    ATEN_CPU_CAPABILITY = default
 skipsdist = True
 
 [testenv:pytest]
diff --git a/setup.py b/setup.py
index 8d4db9d..cd048d4 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'],
-- 
GitLab


From aaeec8995988e7d4b39e6fe66ae84e3f61a4de49 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 15:25:53 +0100
Subject: [PATCH 18/23] Fix using pytorch 1.7.

---
 combo/models/embeddings.py | 1 -
 setup.cfg                  | 2 --
 setup.py                   | 2 +-
 tests/test_main.py         | 2 --
 tests/test_predict.py      | 1 -
 5 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/combo/models/embeddings.py b/combo/models/embeddings.py
index 00a38a3..d8e9d7a 100644
--- a/combo/models/embeddings.py
+++ b/combo/models/embeddings.py
@@ -37,7 +37,6 @@ class CharacterBasedWordEmbeddings(token_embedders.TokenEmbedder):
         x = self.char_embed(x)
         x = x * char_mask.unsqueeze(-1).float()
         x = self.dilated_cnn_encoder(x.transpose(2, 3))
-        print(x)
         return torch.max(x, dim=-1)[0]
 
     @overrides
diff --git a/setup.cfg b/setup.cfg
index 8c2da9a..b13fae6 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -3,8 +3,6 @@ test=pytest
 
 [tox]
 envlist = py38
-setenv =
-    ATEN_CPU_CAPABILITY = default
 skipsdist = True
 
 [testenv:pytest]
diff --git a/setup.py b/setup.py
index cd048d4..c910dbb 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ REQUIREMENTS = [
     'requests==2.23.0',
     'spacy==2.3.2',
     'scikit-learn<=0.23.2',
-    'torch==1.6.0',
+    'torch==1.7.0',
     'tqdm==4.43.0',
     'transformers>=3.4.0,<3.5',
     'urllib3==1.25.11',
diff --git a/tests/test_main.py b/tests/test_main.py
index 051765d..29dfc6a 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -9,7 +9,6 @@ from allennlp.commands import train
 from allennlp.common import Params, util
 
 
-@unittest.skipIf(os.getenv("CI") is not None, "Skipping for CI test.")
 class TrainingEndToEndTest(unittest.TestCase):
     PROJECT_ROOT = (pathlib.Path(__file__).parent / "..").resolve()
     MODULE_ROOT = PROJECT_ROOT / "combo"
@@ -45,7 +44,6 @@ class TrainingEndToEndTest(unittest.TestCase):
                                   ext_vars=ext_vars)
 
         # when
-        print(params)
         model = train.train_model(params, serialization_dir=self.TEST_DIR)
 
         # then
diff --git a/tests/test_predict.py b/tests/test_predict.py
index e81672e..332ced3 100644
--- a/tests/test_predict.py
+++ b/tests/test_predict.py
@@ -6,7 +6,6 @@ import combo.data as data
 import combo.predict as predict
 
 
-@unittest.skipIf(os.getenv("CI") is not None, "Skipping for CI test.")
 class PredictionTest(unittest.TestCase):
     PROJECT_ROOT = (pathlib.Path(__file__).parent / "..").resolve()
     MODULE_ROOT = PROJECT_ROOT / "combo"
-- 
GitLab


From 4bd8a34b488b7d41c303d4f53cc8ee51cb3089b4 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 15:42:47 +0100
Subject: [PATCH 19/23] Condition tests on gitlab env.

---
 .gitlab-ci.yml        | 1 +
 setup.cfg             | 2 +-
 setup.py              | 2 +-
 tests/test_main.py    | 2 ++
 tests/test_predict.py | 2 ++
 5 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c2338da..142af53 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,6 +20,7 @@ before_script:
 unittests:
   stage: test
   script:
+    - export SKIP_TEST=True
     - tox -v -e pytest
 
 pypi_publish:
diff --git a/setup.cfg b/setup.cfg
index b13fae6..f974b42 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,7 +7,7 @@ skipsdist = True
 
 [testenv:pytest]
 deps = pytest
-commands = pytest --capture=no
+commands = pytest
 
 
 [metadata]
diff --git a/setup.py b/setup.py
index c910dbb..cd048d4 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ REQUIREMENTS = [
     'requests==2.23.0',
     'spacy==2.3.2',
     'scikit-learn<=0.23.2',
-    'torch==1.7.0',
+    'torch==1.6.0',
     'tqdm==4.43.0',
     'transformers>=3.4.0,<3.5',
     'urllib3==1.25.11',
diff --git a/tests/test_main.py b/tests/test_main.py
index 29dfc6a..a2d2e2f 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(os.getenv("SKIP_TEST"), "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 332ced3..b584199 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(os.getenv("SKIP_TEST"), "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"
-- 
GitLab


From e0c4afc36954d708a47f4c077477e85ca1a2a452 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 15:50:24 +0100
Subject: [PATCH 20/23] Rewrite skip test condition.

---
 tests/test_main.py    | 2 +-
 tests/test_predict.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_main.py b/tests/test_main.py
index a2d2e2f..c751331 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -9,7 +9,7 @@ from allennlp.commands import train
 from allennlp.common import Params, util
 
 
-@unittest.skipIf(os.getenv("SKIP_TEST"), "Skipping, because torch 1.6.0 "
+@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()
diff --git a/tests/test_predict.py b/tests/test_predict.py
index b584199..9466ce9 100644
--- a/tests/test_predict.py
+++ b/tests/test_predict.py
@@ -6,7 +6,7 @@ import combo.data as data
 import combo.predict as predict
 
 
-@unittest.skipIf(os.getenv("SKIP_TEST"), "Skipping, because torch 1.6.0 "
+@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()
-- 
GitLab


From 0f0fe189578122bcec556253fec6514e4edd3552 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 15:54:55 +0100
Subject: [PATCH 21/23] Refactor text aligment.

---
 tests/test_main.py    | 2 +-
 tests/test_predict.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_main.py b/tests/test_main.py
index c751331..afb7228 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -10,7 +10,7 @@ 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")
+                                            "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 9466ce9..a077502 100644
--- a/tests/test_predict.py
+++ b/tests/test_predict.py
@@ -7,7 +7,7 @@ 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")
+                                            "https://github.com/pytorch/pytorch/issues/43300")
 class PredictionTest(unittest.TestCase):
     PROJECT_ROOT = (pathlib.Path(__file__).parent / "..").resolve()
     MODULE_ROOT = PROJECT_ROOT / "combo"
-- 
GitLab


From 3f92dc8d537f973eef0631296152bfe5c5169105 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 15:55:50 +0100
Subject: [PATCH 22/23] Refactor text aligment.

---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index cd048d4..07cd2e3 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ setup(
     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'],
-- 
GitLab


From e5ac30008f2615460b6198790312dccded189de5 Mon Sep 17 00:00:00 2001
From: Mateusz Klimaszewski <mk.klimaszewski@gmail.com>
Date: Fri, 8 Jan 2021 16:12:50 +0100
Subject: [PATCH 23/23] Export variable as string.

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 142af53..a634a26 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,7 +20,7 @@ before_script:
 unittests:
   stage: test
   script:
-    - export SKIP_TEST=True
+    - export SKIP_TEST="1"
     - tox -v -e pytest
 
 pypi_publish:
-- 
GitLab