From 9ac4c391d75f25060740feac5782f7a4e2e35b17 Mon Sep 17 00:00:00 2001 From: Frost45 Date: Tue, 11 May 2021 19:05:47 -0400 Subject: [PATCH 1/7] Added .gitlab-ci.yml and deleted .travis.yml --- .gitlab-ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 43 ------------------------------------------- 2 files changed, 39 insertions(+), 43 deletions(-) create mode 100644 .gitlab-ci.yml delete mode 100644 .travis.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..c97ae698f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,39 @@ +stages: + - test + +variables: + PYVERSION: "3.7" + BINPATH: "/root/miniconda3/envs/rsmenv/bin" + COVERALLS_PARALLEL: true + +# set up 6 jobs to run in parallel, for different groups of test files +runtests: + stage: test + before_script: + - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh + - if [ -x /root/miniconda3/pkgs ]; then pushd /root/miniconda3/pkgs && find -maxdepth 1 -mindepth 1 -type d | xargs rm -rf && popd; fi + - chmod +x miniconda.sh + - ./miniconda.sh -b -f + - /root/miniconda3/bin/conda update conda --yes + - "/root/miniconda3/bin/conda create --name rsmenv -c conda-forge -c defaults -c ets --file requirements.txt python=${TRAVIS_PYTHON_VERSION} --yes --quiet" + - /root/miniconda3/envs/rsmenv/bin/pip install nose-cov + - /root/miniconda3/envs/rsmenv/bin/pip install -e . + - echo "import os" > sitecustomize.py + - echo "try:" >> sitecustomize.py + - echo " import coverage" >> sitecustomize.py + - echo " os.environ['COVERAGE_PROCESS_START'] = '.coveragerc'" >> sitecustomize.py + - echo " coverage.process_startup()" >> sitecustomize.py + - echo "except ImportError:" >> sitecustomize.py + - echo " pass" >> sitecustomize.py + script: + - "/root/miniconda3/envs/rsmenv/bin/nosetests --nologcapture --with-coverage --cover-package=rsmtool --cov-config .coveragerc ${TESTFILES}" + parallel: + matrix: + - TESTFILES: + - "tests/test_experiment_rsmtool_1.py" + - "tests/test_comparer.py tests/test_configuration_parser.py tests/test_experiment_rsmtool_2.py" + - "tests/test_analyzer.py tests/test_experiment_rsmeval.py tests/test_fairness_utils.py tests/test_utils_prmse.py tests/test_container.py tests/test_test_utils.py tests/test_cli.py" + - "tests/test_experiment_rsmcompare.py tests/test_experiment_rsmsummarize.py tests/test_modeler.py tests/test_preprocessor.py tests/test_writer.py tests/test_experiment_rsmtool_3.py" + - "tests/test_experiment_rsmpredict.py tests/test_reader.py tests/test_reporter.py tests/test_transformer.py tests/test_utils.py tests/test_experiment_rsmtool_4.py" + after_script: + - /root/miniconda3/envs/rsmenv/bin/coveralls \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fc1050a1f..000000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -language: python -python: -- 3.7 -notifications: - email: false - webhooks: https://coveralls.io/webhook - slack: - secure: QshUa/5NpsPSu8DlOS3VtpxcV2ijiXsRGKTR7AFn53vIaZaZ/0hTLJLpf+cz3E73kpMbj75jFGu54habUm3+SlHHQm60iJ+A8QHg625R9yp7x8A3Yv2KrrYsVrOHFoEmQQ60aDrS/MtxLd6yCr5sSyZdEedhhetkSlr6t+Mz8pxeWL8S/iuA3nkVUWzLyXtf59PpaVg3FkcrWNOsjXz6m1QlyvX1ZeDeLSm3Ag3hW2aJDcJWXj7mlSX4wwwgYkj8FJLTmzAMjN7BOQA2txe+G5TjS/bl6UEo5hNPUVJ6fa4IpU/saafsqVy5kOvDHxPXKJsFGBS4vTQAQzPrAG4tFZL+LO/X4cCyQtsXiUsIMP8oQ0yg2qdBgbQsmBpDVj/sp+5kuCJVd9W6OPupiQ53INllp019nMzqiqjGtylHhxFHi8X5V89LBdN9ajMCVkxbfUTcM/jUqJoCfPntD+3nZHu3VTgDka0vVY+gQDFHJnAew/n4hbYx4qoleAiOxh6eXJ8fRQwNO7R0L6gdFxqVvZ69fKDUlMnzCqGMwI0s4mjDQ8duNSUPf6t1k+u0U9HzV9BKBiGnBIUw2s1YcALILggUQT4B+5rRmeoTx5+mOXGI3IPbUpcNuAMstO/vAG+Ub4mY+w0dhabNtTb2oPD6PBe4SRcEggB3EU8Qd/3xpkA= -env: - global: - - COVERALLS_PARALLEL=true - - BINPATH=${HOME}/miniconda3/envs/rsmenv/bin - matrix: - - TESTFILES="tests/test_experiment_rsmtool_1.py" - - TESTFILES="tests/test_comparer.py tests/test_configuration_parser.py tests/test_experiment_rsmtool_2.py" - - TESTFILES="tests/test_analyzer.py tests/test_experiment_rsmeval.py tests/test_fairness_utils.py tests/test_utils_prmse.py tests/test_container.py tests/test_test_utils.py tests/test_cli.py" - - TESTFILES="tests/test_experiment_rsmcompare.py tests/test_experiment_rsmsummarize.py tests/test_modeler.py tests/test_preprocessor.py tests/test_writer.py tests/test_experiment_rsmtool_3.py" - - TESTFILES="tests/test_experiment_rsmpredict.py tests/test_reader.py tests/test_reporter.py tests/test_transformer.py tests/test_utils.py tests/test_experiment_rsmtool_4.py" -sudo: false -before_install: -- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh -- if [ -x ${HOME}/miniconda3/pkgs ]; then pushd ${HOME}/miniconda3/pkgs && find -maxdepth 1 -mindepth 1 -type d | xargs rm -rf && popd; fi -- chmod +x miniconda.sh -- ./miniconda.sh -b -f -- ${HOME}/miniconda3/bin/conda update conda --yes - -install: -- ${HOME}/miniconda3/bin/conda create --name rsmenv -c conda-forge -c defaults -c ets --file requirements.txt python=${TRAVIS_PYTHON_VERSION} --yes --quiet -- ${HOME}/miniconda3/envs/rsmenv/bin/pip install nose-cov -- ${HOME}/miniconda3/envs/rsmenv/bin/pip install -e . -- echo "import os" > sitecustomize.py -- echo "try:" >> sitecustomize.py -- echo " import coverage" >> sitecustomize.py -- echo " os.environ['COVERAGE_PROCESS_START'] = '.coveragerc'" >> sitecustomize.py -- echo " coverage.process_startup()" >> sitecustomize.py -- echo "except ImportError:" >> sitecustomize.py -- echo " pass" >> sitecustomize.py - -script: -- ${HOME}/miniconda3/envs/rsmenv/bin/nosetests --nologcapture --with-coverage --cover-package=rsmtool --cov-config .coveragerc ${TESTFILES} - -after_success: -- ${HOME}/miniconda3/envs/rsmenv/bin/coveralls From 8c9a682600a44c5763be499c6cae0b01e9ffaa89 Mon Sep 17 00:00:00 2001 From: Frost45 Date: Tue, 11 May 2021 19:19:09 -0400 Subject: [PATCH 2/7] Fixed error in .gitlab-ci.yml --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c97ae698f..574b414c2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,6 @@ stages: variables: PYVERSION: "3.7" BINPATH: "/root/miniconda3/envs/rsmenv/bin" - COVERALLS_PARALLEL: true # set up 6 jobs to run in parallel, for different groups of test files runtests: From 9387a352093184a55a4ef1d112e7328a84573720 Mon Sep 17 00:00:00 2001 From: Frost45 Date: Wed, 12 May 2021 12:43:47 -0400 Subject: [PATCH 3/7] Streamlined Gitlab YAML, used miniconda image instead of installing conda, added codecov instead of coveralls --- .gitlab-ci.yml | 60 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 574b414c2..e99eca195 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,20 +1,17 @@ +image: continuumio/miniconda3:latest + stages: - test variables: PYVERSION: "3.7" BINPATH: "/root/miniconda3/envs/rsmenv/bin" + CODECOV_TOKEN: "488304b7-b1c5-4fc7-bfb6-9e7cbcb36a08" -# set up 6 jobs to run in parallel, for different groups of test files -runtests: - stage: test +# set up basic job +.runtests: before_script: - - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - - if [ -x /root/miniconda3/pkgs ]; then pushd /root/miniconda3/pkgs && find -maxdepth 1 -mindepth 1 -type d | xargs rm -rf && popd; fi - - chmod +x miniconda.sh - - ./miniconda.sh -b -f - - /root/miniconda3/bin/conda update conda --yes - - "/root/miniconda3/bin/conda create --name rsmenv -c conda-forge -c defaults -c ets --file requirements.txt python=${TRAVIS_PYTHON_VERSION} --yes --quiet" + - "conda create --name rsmenv -c conda-forge -c defaults -c ets --file requirements.txt python=${PYVERSION} codecov --yes --quiet" - /root/miniconda3/envs/rsmenv/bin/pip install nose-cov - /root/miniconda3/envs/rsmenv/bin/pip install -e . - echo "import os" > sitecustomize.py @@ -26,13 +23,40 @@ runtests: - echo " pass" >> sitecustomize.py script: - "/root/miniconda3/envs/rsmenv/bin/nosetests --nologcapture --with-coverage --cover-package=rsmtool --cov-config .coveragerc ${TESTFILES}" - parallel: - matrix: - - TESTFILES: - - "tests/test_experiment_rsmtool_1.py" - - "tests/test_comparer.py tests/test_configuration_parser.py tests/test_experiment_rsmtool_2.py" - - "tests/test_analyzer.py tests/test_experiment_rsmeval.py tests/test_fairness_utils.py tests/test_utils_prmse.py tests/test_container.py tests/test_test_utils.py tests/test_cli.py" - - "tests/test_experiment_rsmcompare.py tests/test_experiment_rsmsummarize.py tests/test_modeler.py tests/test_preprocessor.py tests/test_writer.py tests/test_experiment_rsmtool_3.py" - - "tests/test_experiment_rsmpredict.py tests/test_reader.py tests/test_reporter.py tests/test_transformer.py tests/test_utils.py tests/test_experiment_rsmtool_4.py" after_script: - - /root/miniconda3/envs/rsmenv/bin/coveralls \ No newline at end of file + - /root/miniconda3/envs/rsmenv/bin/codecov + +# first set of test files +testset1: + extends: ".runtests" + variables: + TESTFILES: "tests/test_experiment_rsmtool_1.py" + stage: "test" + +# second set of test files +testset2: + extends: ".runtests" + variables: + TESTFILES: "tests/test_comparer.py tests/test_configuration_parser.py tests/test_experiment_rsmtool_2.py" + stage: "test" + +# third set of test files +testset3: + extends: ".runtests" + variables: + TESTFILES: "tests/test_analyzer.py tests/test_experiment_rsmeval.py tests/test_fairness_utils.py tests/test_utils_prmse.py tests/test_container.py tests/test_test_utils.py tests/test_cli.py" + stage: "test" + +# fourth set of test files +testset4: + extends: ".runtests" + variables: + TESTFILES: "tests/test_experiment_rsmcompare.py tests/test_experiment_rsmsummarize.py tests/test_modeler.py tests/test_preprocessor.py tests/test_writer.py tests/test_experiment_rsmtool_3.py" + stage: "test" + +# fifth set of test files +testset5: + extends: ".runtests" + variables: + TESTFILES: "tests/test_experiment_rsmpredict.py tests/test_reader.py tests/test_reporter.py tests/test_transformer.py tests/test_utils.py tests/test_experiment_rsmtool_4.py" + stage: "test" From 73b16e02e7573bedd243b355d8c91af758f1ba8f Mon Sep 17 00:00:00 2001 From: Frost45 Date: Wed, 12 May 2021 13:46:33 -0400 Subject: [PATCH 4/7] Fixed typo, changed BINDIR --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e99eca195..674f95edc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,15 +5,15 @@ stages: variables: PYVERSION: "3.7" - BINPATH: "/root/miniconda3/envs/rsmenv/bin" + BINDIR: "/root/rsmenv/bin" CODECOV_TOKEN: "488304b7-b1c5-4fc7-bfb6-9e7cbcb36a08" # set up basic job .runtests: before_script: - - "conda create --name rsmenv -c conda-forge -c defaults -c ets --file requirements.txt python=${PYVERSION} codecov --yes --quiet" - - /root/miniconda3/envs/rsmenv/bin/pip install nose-cov - - /root/miniconda3/envs/rsmenv/bin/pip install -e . + - "conda create --prefix /root/rsmenv -c conda-forge -c defaults -c ets --file requirements.txt python=${PYVERSION} codecov --yes --quiet" + - /root/rsmenv/bin/pip install nose-cov + - /root/rsmenv/bin/pip install -e . - echo "import os" > sitecustomize.py - echo "try:" >> sitecustomize.py - echo " import coverage" >> sitecustomize.py @@ -22,9 +22,9 @@ variables: - echo "except ImportError:" >> sitecustomize.py - echo " pass" >> sitecustomize.py script: - - "/root/miniconda3/envs/rsmenv/bin/nosetests --nologcapture --with-coverage --cover-package=rsmtool --cov-config .coveragerc ${TESTFILES}" + - "/root/rsmenv/bin/nosetests --nologcapture --with-coverage --cover-package=rsmtool --cov-config .coveragerc ${TESTFILES}" after_script: - - /root/miniconda3/envs/rsmenv/bin/codecov + - /root/rsmenv/bin/codecov # first set of test files testset1: From cbfa4818eacd452c37a1c1fb08457027be224495 Mon Sep 17 00:00:00 2001 From: Frost45 Date: Wed, 12 May 2021 14:24:06 -0400 Subject: [PATCH 5/7] Changed BINDIR to BINPATH again --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 674f95edc..3b21d70d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ stages: variables: PYVERSION: "3.7" - BINDIR: "/root/rsmenv/bin" + BINPATH: "/root/rsmenv/bin" CODECOV_TOKEN: "488304b7-b1c5-4fc7-bfb6-9e7cbcb36a08" # set up basic job From a5931fe1fc5c58ad3224e442fba6f0bc72a6b3dd Mon Sep 17 00:00:00 2001 From: Frost45 Date: Wed, 12 May 2021 15:25:09 -0400 Subject: [PATCH 6/7] Updated README to reflect move to Gitlab from Travis CI --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 9063204be..bfad646ba 100644 --- a/README.rst +++ b/README.rst @@ -1,13 +1,13 @@ Rater Scoring Modeling Tool --------------------------- -.. image:: https://img.shields.io/travis/EducationalTestingService/rsmtool/main.svg - :target: https://travis-ci.org/EducationalTestingService/rsmtool - :alt: Build status + image:: https://gitlab.com/EducationalTestingService/rsmtool/badges/main/pipeline.svg + :target: https://gitlab.com/EducationalTestingService/rsmtool/-/pipelines + :alt: Gitlab CI status .. image:: https://dev.azure.com/EducationalTestingService/RSMTool/_apis/build/status/EducationalTestingService.rsmtool :target: https://dev.azure.com/EducationalTestingService/RSMTool/_build?view=runs - :alt: Build status + :alt: Azure Pipeline status .. image:: https://img.shields.io/coveralls/EducationalTestingService/rsmtool/main.svg :target: https://coveralls.io/r/EducationalTestingService/rsmtool From 8887c478c5d4bb1ab0cf89bfea80c1fbe2343b2c Mon Sep 17 00:00:00 2001 From: Frost45 Date: Wed, 12 May 2021 15:43:44 -0400 Subject: [PATCH 7/7] Fixed typo in README to make badge display properly --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index bfad646ba..6843ee30b 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ Rater Scoring Modeling Tool --------------------------- - image:: https://gitlab.com/EducationalTestingService/rsmtool/badges/main/pipeline.svg +.. image:: https://gitlab.com/EducationalTestingService/rsmtool/badges/main/pipeline.svg :target: https://gitlab.com/EducationalTestingService/rsmtool/-/pipelines :alt: Gitlab CI status