From 1039619f184b8f3e20b3ecab367e3fc19ac435a0 Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Thu, 25 Jan 2024 16:28:14 +0000 Subject: [PATCH] updating the pipenv --- configs/docker/build/requirements.txt | 2 +- docs/_source/installation.rst | 7 +++++++ tests/integration/full/convertDos2unix.sh | 2 ++ tests/integration/partial/convertDos2unix.sh | 2 ++ tests/integration/test_suites/depo_test_suite.py | 4 ++-- 5 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 tests/integration/full/convertDos2unix.sh create mode 100644 tests/integration/partial/convertDos2unix.sh diff --git a/configs/docker/build/requirements.txt b/configs/docker/build/requirements.txt index 9b989be..23caa52 100644 --- a/configs/docker/build/requirements.txt +++ b/configs/docker/build/requirements.txt @@ -1,8 +1,8 @@ contextily==1.5.0 geopandas==0.14.2 +HTMLTestRunner-rv==1.1.2 python-docx==1.1.0 rioxarray==0.15.0 Rtree==1.1.0 scitools-iris==3.7.0 -HTMLTestRunner-rv==1.1.2 coverage==7.4.0 \ No newline at end of file diff --git a/docs/_source/installation.rst b/docs/_source/installation.rst index d32481f..528689e 100644 --- a/docs/_source/installation.rst +++ b/docs/_source/installation.rst @@ -49,6 +49,7 @@ In this example, we are using the Linux user “ewsmanager†and group “ews mkdir -p .\code regions\EastAfrica\workspace regions\SouthAsia\workspace regions\EastAfrica\resources regions\SouthAsia\resources met_inputs\metofficeupload\upload\Ethiopia\toMO\ met_inputs\metofficeupload\upload\Ethiopia\fromMO\daily_name\ web_data\Ethiopia met_inputs\metofficeupload\upload\SouthAsia\toMO\ met_inputs\metofficeupload\upload\SouthAsia\fromMO\daily_name\ web_data\SouthAsia .\logs .\envs\credentials +shell scripts to perform the above operations: :download:`Download .cmd file <../_static/assets/windows_create_dirs.cmd>` :download:`Download .sh file <../_static/assets/linux_create_dirs.sh>` @@ -85,6 +86,7 @@ or generate this string in bash: printf "%s" "git clone git@gitlab.developers.cam.ac.uk:gilligan-epid/wheat-rusts/${repo}.git ${folder};" done +shell scripts to perform the above operations: :download:`Download .cmd file <../_static/assets/windows_clone_git.cmd>` :download:`Download .sh file <../_static/assets/linux_clone_git.sh>` @@ -107,7 +109,9 @@ into ``<install_location>/regions/<EastAfrica/SouthAsia>/resources``. This will configuration and other assets required for the pipeline to run. e.g.: + .. code-block:: bash + cd <install_location>/regions/EastAfrica/resources tar -zxvf eastafrica_resources_<latest_date>.tar.gz @@ -156,6 +160,9 @@ following credentials**: Where the various variables are all LINUX user credentials (type the ‘id’ command to see all these values) +**if you are running the ews for use on your personal computer, you can exclude the --build-arg arguments from the build +step, note that all files written by the pipeline will be owned by the root user, rather than your user account.** + Once you have edited the build.sh script, run it (or run the commands within it manually). **if you are running on Windows and run these commands manually, make sure you run the "cp ../../conda/conda-env-py3EWS-withbuilds.yml ." equivalent to place the conda dependencies in the same dir before running docker build. diff --git a/tests/integration/full/convertDos2unix.sh b/tests/integration/full/convertDos2unix.sh new file mode 100644 index 0000000..9080214 --- /dev/null +++ b/tests/integration/full/convertDos2unix.sh @@ -0,0 +1,2 @@ +# run this script within the ews docker image if you have checked out the code on a windows machine, then run the new .sh script to launch the tests +dos2unix run_tests.sh > windows_run_tests.sh \ No newline at end of file diff --git a/tests/integration/partial/convertDos2unix.sh b/tests/integration/partial/convertDos2unix.sh new file mode 100644 index 0000000..9080214 --- /dev/null +++ b/tests/integration/partial/convertDos2unix.sh @@ -0,0 +1,2 @@ +# run this script within the ews docker image if you have checked out the code on a windows machine, then run the new .sh script to launch the tests +dos2unix run_tests.sh > windows_run_tests.sh \ No newline at end of file diff --git a/tests/integration/test_suites/depo_test_suite.py b/tests/integration/test_suites/depo_test_suite.py index 897462b..6065f7d 100644 --- a/tests/integration/test_suites/depo_test_suite.py +++ b/tests/integration/test_suites/depo_test_suite.py @@ -61,10 +61,10 @@ class BaseDepoTestSuite: def test_standard_run_all_input_csvs_produced(self): east_africa_csv_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH, IntegrationTestUtils.TEST_JOB_DIR, - "plotting", "eastafrica", "input_csvs", "*.nc") + "plotting", "eastafrica", "input_nc", "*.nc") ethiopia_csv_path = os.path.join(IntegrationTestUtils.TEST_OUT_PATH, IntegrationTestUtils.TEST_JOB_DIR, - "plotting", "ethiopia", "input_csvs", "*.nc") + "plotting", "ethiopia", "input_nc", "*.nc") ea_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(east_africa_csv_path) eth_csv_count: int = IntegrationTestUtils.count_files_in_wildcard(ethiopia_csv_path) -- GitLab