From 23c475e56e368c7a6f4d73f0479c0a49b01dfd93 Mon Sep 17 00:00:00 2001 From: mikf <mikf@dtu.dk> Date: Wed, 20 Jun 2018 14:29:12 +0200 Subject: [PATCH] fixing test_path updated a few more test references Update .gitlab-ci.yml Updated readme small fix to yml and readme Specify the test machine to ignore Colonel dir correcting ignore statement --- .gitlab-ci.yml | 5 ++--- README.md | 10 +++++++++- topfarm/cost_models/fuga/lib_reader.py | 2 +- topfarm/cost_models/utils/aep_calculator.py | 2 +- {tests => topfarm/tests}/__init__.py | 0 {tests => topfarm/tests}/test_constraint/__init__.py | 0 .../tests}/test_constraint/test_PolygonBoundaryComp.py | 0 .../tests}/test_constraint/test_boundary.py | 0 .../tests}/test_constraint/test_boundary_polygon.py | 0 .../tests}/test_costmodel_utils/__init__.py | 0 .../tests}/test_costmodel_utils/test_aep_calculator.py | 2 +- .../test_costmodel_utils/test_cost_model_wrappers.py | 0 .../tests}/test_costmodel_utils/test_wind_resource.py | 0 {tests => topfarm/tests}/test_files/__init__.py | 0 .../tests}/test_files/fuga_files/4xV52SiteList.txt | 0 .../tests}/test_files/fuga_files/TurbineSiteList.txt | 0 .../tests}/test_files/fuga_files/hornsrev2.lib | 0 {tests => topfarm/tests}/test_files/wind_farms/3tb.yml | 0 .../tests}/test_files/wind_resources/hornsrev2.lib | 0 {tests => topfarm/tests}/test_fuga/__init__.py | 0 {tests => topfarm/tests}/test_fuga/test_lib_reader.py | 2 +- {tests => topfarm/tests}/test_fuga/test_pyfuga.py | 0 .../tests}/test_fuga/test_turbine_site_list_reader.py | 4 ++-- .../tests}/test_fusedwake_models/__init__.py | 0 .../tests}/test_fusedwake_models/test_gcl.py | 2 +- .../tests}/test_fusedwake_models/test_noj.py | 2 +- {tests => topfarm/tests}/test_try_me.py | 0 {tests => topfarm/tests}/test_with_dummy.py | 0 {tests => topfarm/tests}/topfarm/__init__.py | 0 {tests => topfarm/tests}/topfarm/test_drivers.py | 0 {tests => topfarm/tests}/topfarm/test_topfarm.py | 0 31 files changed, 19 insertions(+), 12 deletions(-) rename {tests => topfarm/tests}/__init__.py (100%) rename {tests => topfarm/tests}/test_constraint/__init__.py (100%) rename {tests => topfarm/tests}/test_constraint/test_PolygonBoundaryComp.py (100%) rename {tests => topfarm/tests}/test_constraint/test_boundary.py (100%) rename {tests => topfarm/tests}/test_constraint/test_boundary_polygon.py (100%) rename {tests => topfarm/tests}/test_costmodel_utils/__init__.py (100%) rename {tests => topfarm/tests}/test_costmodel_utils/test_aep_calculator.py (95%) rename {tests => topfarm/tests}/test_costmodel_utils/test_cost_model_wrappers.py (100%) rename {tests => topfarm/tests}/test_costmodel_utils/test_wind_resource.py (100%) rename {tests => topfarm/tests}/test_files/__init__.py (100%) rename {tests => topfarm/tests}/test_files/fuga_files/4xV52SiteList.txt (100%) rename {tests => topfarm/tests}/test_files/fuga_files/TurbineSiteList.txt (100%) rename {tests => topfarm/tests}/test_files/fuga_files/hornsrev2.lib (100%) rename {tests => topfarm/tests}/test_files/wind_farms/3tb.yml (100%) rename {tests => topfarm/tests}/test_files/wind_resources/hornsrev2.lib (100%) rename {tests => topfarm/tests}/test_fuga/__init__.py (100%) rename {tests => topfarm/tests}/test_fuga/test_lib_reader.py (95%) rename {tests => topfarm/tests}/test_fuga/test_pyfuga.py (100%) rename {tests => topfarm/tests}/test_fuga/test_turbine_site_list_reader.py (91%) rename {tests => topfarm/tests}/test_fusedwake_models/__init__.py (100%) rename {tests => topfarm/tests}/test_fusedwake_models/test_gcl.py (97%) rename {tests => topfarm/tests}/test_fusedwake_models/test_noj.py (97%) rename {tests => topfarm/tests}/test_try_me.py (100%) rename {tests => topfarm/tests}/test_with_dummy.py (100%) rename {tests => topfarm/tests}/topfarm/__init__.py (100%) rename {tests => topfarm/tests}/topfarm/test_drivers.py (100%) rename {tests => topfarm/tests}/topfarm/test_topfarm.py (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1fe2e181..ee8d6139 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ test_topfarm: # name the job what we like test script: - pip install --upgrade git+git://github.com/FUSED-Wind/FUSED-Wake@master - - cd tests; py.test + - py.test tags: # only runners with this tag can do the job [3] - python @@ -21,8 +21,7 @@ test_topfarm_windows: # name the job what we like stage: # build, test, deploy defined by default [2] test script: # runs on windows machine due to tag below - - cd tests - - c:/Anaconda3/envs/pyTopfarm/python.exe -m pytest --cov-report term-missing:skip-covered --cov=../topfarm --cov-config ../.coveragerc + - c:/Anaconda3/envs/pyTopfarm/python.exe -m pytest --cov-report term-missing:skip-covered --cov=topfarm --cov-config .coveragerc --ignore=topfarm/cost_models/fuga/Colonel tags: # tag for shared runner on windows machine - CPAV_old_PC diff --git a/README.md b/README.md index df075706..2b53a48f 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,16 @@ Install windows ```conda create -n pyTopfarm python=3.6 activate pyTopfarm +git clone https://github.com/FUSED-Wind/FUSED-Wake.git +cd FUSED-Wake +pip install -e . +cd.. +git clone https://github.com/FUSED-Wind/windIO.git +cd windIO +pip install -e . +cd.. git clone https://gitlab.windenergy.dtu.dk/TOPFARM/TopFarm2.git cd Topfarm2 pip install -e . -cd tests +cd topfarm/tests python -m pytest``` diff --git a/topfarm/cost_models/fuga/lib_reader.py b/topfarm/cost_models/fuga/lib_reader.py index ca5ff45d..e375d30d 100644 --- a/topfarm/cost_models/fuga/lib_reader.py +++ b/topfarm/cost_models/fuga/lib_reader.py @@ -5,7 +5,7 @@ Created on 25. apr. 2018 ''' import os import numpy as np -from tests.test_files import tfp +from topfarm.tests.test_files import tfp def read_lib(filename): diff --git a/topfarm/cost_models/utils/aep_calculator.py b/topfarm/cost_models/utils/aep_calculator.py index e7f7059a..2de08b8e 100644 --- a/topfarm/cost_models/utils/aep_calculator.py +++ b/topfarm/cost_models/utils/aep_calculator.py @@ -10,7 +10,7 @@ import numpy as np from topfarm.cost_models.fused_wake_wrappers import FusedWakeGCLWakeModel from topfarm.cost_models.utils.wind_resource import WindResource from topfarm.cost_models.cost_model_wrappers import AEPCostModelComponent -from tests.test_files import testfilepath +from topfarm.tests.test_files import testfilepath class AEPCalculator(object): diff --git a/tests/__init__.py b/topfarm/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to topfarm/tests/__init__.py diff --git a/tests/test_constraint/__init__.py b/topfarm/tests/test_constraint/__init__.py similarity index 100% rename from tests/test_constraint/__init__.py rename to topfarm/tests/test_constraint/__init__.py diff --git a/tests/test_constraint/test_PolygonBoundaryComp.py b/topfarm/tests/test_constraint/test_PolygonBoundaryComp.py similarity index 100% rename from tests/test_constraint/test_PolygonBoundaryComp.py rename to topfarm/tests/test_constraint/test_PolygonBoundaryComp.py diff --git a/tests/test_constraint/test_boundary.py b/topfarm/tests/test_constraint/test_boundary.py similarity index 100% rename from tests/test_constraint/test_boundary.py rename to topfarm/tests/test_constraint/test_boundary.py diff --git a/tests/test_constraint/test_boundary_polygon.py b/topfarm/tests/test_constraint/test_boundary_polygon.py similarity index 100% rename from tests/test_constraint/test_boundary_polygon.py rename to topfarm/tests/test_constraint/test_boundary_polygon.py diff --git a/tests/test_costmodel_utils/__init__.py b/topfarm/tests/test_costmodel_utils/__init__.py similarity index 100% rename from tests/test_costmodel_utils/__init__.py rename to topfarm/tests/test_costmodel_utils/__init__.py diff --git a/tests/test_costmodel_utils/test_aep_calculator.py b/topfarm/tests/test_costmodel_utils/test_aep_calculator.py similarity index 95% rename from tests/test_costmodel_utils/test_aep_calculator.py rename to topfarm/tests/test_costmodel_utils/test_aep_calculator.py index 64f653f1..5d5c6b00 100644 --- a/tests/test_costmodel_utils/test_aep_calculator.py +++ b/topfarm/tests/test_costmodel_utils/test_aep_calculator.py @@ -7,7 +7,7 @@ import unittest import numpy as np from topfarm.cost_models.utils.wind_resource import WindResource -from tests.test_files import testfilepath +from topfarm.tests.test_files import testfilepath from topfarm.cost_models.fused_wake_wrappers import FusedWakeGCLWakeModel from topfarm.cost_models.utils.aep_calculator import AEPCalculator import warnings diff --git a/tests/test_costmodel_utils/test_cost_model_wrappers.py b/topfarm/tests/test_costmodel_utils/test_cost_model_wrappers.py similarity index 100% rename from tests/test_costmodel_utils/test_cost_model_wrappers.py rename to topfarm/tests/test_costmodel_utils/test_cost_model_wrappers.py diff --git a/tests/test_costmodel_utils/test_wind_resource.py b/topfarm/tests/test_costmodel_utils/test_wind_resource.py similarity index 100% rename from tests/test_costmodel_utils/test_wind_resource.py rename to topfarm/tests/test_costmodel_utils/test_wind_resource.py diff --git a/tests/test_files/__init__.py b/topfarm/tests/test_files/__init__.py similarity index 100% rename from tests/test_files/__init__.py rename to topfarm/tests/test_files/__init__.py diff --git a/tests/test_files/fuga_files/4xV52SiteList.txt b/topfarm/tests/test_files/fuga_files/4xV52SiteList.txt similarity index 100% rename from tests/test_files/fuga_files/4xV52SiteList.txt rename to topfarm/tests/test_files/fuga_files/4xV52SiteList.txt diff --git a/tests/test_files/fuga_files/TurbineSiteList.txt b/topfarm/tests/test_files/fuga_files/TurbineSiteList.txt similarity index 100% rename from tests/test_files/fuga_files/TurbineSiteList.txt rename to topfarm/tests/test_files/fuga_files/TurbineSiteList.txt diff --git a/tests/test_files/fuga_files/hornsrev2.lib b/topfarm/tests/test_files/fuga_files/hornsrev2.lib similarity index 100% rename from tests/test_files/fuga_files/hornsrev2.lib rename to topfarm/tests/test_files/fuga_files/hornsrev2.lib diff --git a/tests/test_files/wind_farms/3tb.yml b/topfarm/tests/test_files/wind_farms/3tb.yml similarity index 100% rename from tests/test_files/wind_farms/3tb.yml rename to topfarm/tests/test_files/wind_farms/3tb.yml diff --git a/tests/test_files/wind_resources/hornsrev2.lib b/topfarm/tests/test_files/wind_resources/hornsrev2.lib similarity index 100% rename from tests/test_files/wind_resources/hornsrev2.lib rename to topfarm/tests/test_files/wind_resources/hornsrev2.lib diff --git a/tests/test_fuga/__init__.py b/topfarm/tests/test_fuga/__init__.py similarity index 100% rename from tests/test_fuga/__init__.py rename to topfarm/tests/test_fuga/__init__.py diff --git a/tests/test_fuga/test_lib_reader.py b/topfarm/tests/test_fuga/test_lib_reader.py similarity index 95% rename from tests/test_fuga/test_lib_reader.py rename to topfarm/tests/test_fuga/test_lib_reader.py index 5d712ebf..2c366803 100644 --- a/tests/test_fuga/test_lib_reader.py +++ b/topfarm/tests/test_fuga/test_lib_reader.py @@ -5,7 +5,7 @@ Created on 25. apr. 2018 ''' import unittest import numpy as np -from tests.test_files import testfilepath +from topfarm.tests.test_files import testfilepath from topfarm.cost_models.fuga import py_fuga, lib_reader from topfarm.cost_models.fuga.lib_reader import read_lib diff --git a/tests/test_fuga/test_pyfuga.py b/topfarm/tests/test_fuga/test_pyfuga.py similarity index 100% rename from tests/test_fuga/test_pyfuga.py rename to topfarm/tests/test_fuga/test_pyfuga.py diff --git a/tests/test_fuga/test_turbine_site_list_reader.py b/topfarm/tests/test_fuga/test_turbine_site_list_reader.py similarity index 91% rename from tests/test_fuga/test_turbine_site_list_reader.py rename to topfarm/tests/test_fuga/test_turbine_site_list_reader.py index 0be6f8bf..20c536ed 100644 --- a/tests/test_fuga/test_turbine_site_list_reader.py +++ b/topfarm/tests/test_fuga/test_turbine_site_list_reader.py @@ -6,8 +6,8 @@ Created on 14. maj 2018 import unittest import numpy as np -from tests.test_files import tfp -from tests.test_fuga.test_pyfuga import fuga_path +from topfarm.tests.test_files import tfp +from topfarm.tests.test_fuga.test_pyfuga import fuga_path from topfarm.cost_models.fuga.turbine_site_list_reader import read_turbine_site_list,\ read_MR_turbine_site_list diff --git a/tests/test_fusedwake_models/__init__.py b/topfarm/tests/test_fusedwake_models/__init__.py similarity index 100% rename from tests/test_fusedwake_models/__init__.py rename to topfarm/tests/test_fusedwake_models/__init__.py diff --git a/tests/test_fusedwake_models/test_gcl.py b/topfarm/tests/test_fusedwake_models/test_gcl.py similarity index 97% rename from tests/test_fusedwake_models/test_gcl.py rename to topfarm/tests/test_fusedwake_models/test_gcl.py index f1afc4e5..7fb2ffd4 100644 --- a/tests/test_fusedwake_models/test_gcl.py +++ b/topfarm/tests/test_fusedwake_models/test_gcl.py @@ -2,7 +2,7 @@ import numpy as np from topfarm.cost_models.fused_wake_wrappers import FusedWakeGCLWakeModel from topfarm.cost_models.utils.aep_calculator import AEPCalculator from topfarm.cost_models.utils.wind_resource import WindResource -from tests.test_files import tfp +from topfarm.tests.test_files import tfp from topfarm._topfarm import TopFarm import pytest import warnings diff --git a/tests/test_fusedwake_models/test_noj.py b/topfarm/tests/test_fusedwake_models/test_noj.py similarity index 97% rename from tests/test_fusedwake_models/test_noj.py rename to topfarm/tests/test_fusedwake_models/test_noj.py index 194485fe..52284c04 100644 --- a/tests/test_fusedwake_models/test_noj.py +++ b/topfarm/tests/test_fusedwake_models/test_noj.py @@ -1,7 +1,7 @@ import pytest import numpy as np -from tests.test_files import tfp +from topfarm.tests.test_files import tfp from topfarm._topfarm import TopFarm from topfarm.cost_models.fused_wake_wrappers import FusedWakeNOJWakeModel from topfarm.cost_models.utils.aep_calculator import AEPCalculator diff --git a/tests/test_try_me.py b/topfarm/tests/test_try_me.py similarity index 100% rename from tests/test_try_me.py rename to topfarm/tests/test_try_me.py diff --git a/tests/test_with_dummy.py b/topfarm/tests/test_with_dummy.py similarity index 100% rename from tests/test_with_dummy.py rename to topfarm/tests/test_with_dummy.py diff --git a/tests/topfarm/__init__.py b/topfarm/tests/topfarm/__init__.py similarity index 100% rename from tests/topfarm/__init__.py rename to topfarm/tests/topfarm/__init__.py diff --git a/tests/topfarm/test_drivers.py b/topfarm/tests/topfarm/test_drivers.py similarity index 100% rename from tests/topfarm/test_drivers.py rename to topfarm/tests/topfarm/test_drivers.py diff --git a/tests/topfarm/test_topfarm.py b/topfarm/tests/topfarm/test_topfarm.py similarity index 100% rename from tests/topfarm/test_topfarm.py rename to topfarm/tests/topfarm/test_topfarm.py -- GitLab