diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1fe2e1811b863656e2f9cefcbe331501e726a430..ee8d6139d57c22a5c0349b51600aba828c0ca257 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 df075706d54468b91aa2b819ada79cfa30854100..2b53a48fefdd6a4223f32b4787cc380c4fb1dd19 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 ca5ff45d4e72325aef6dc98dfd89df48afd35f94..e375d30d222d95571867f57ebc7adef36f3a72b0 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 e7f7059a2f7b16f86a87e4813bcd274136868c94..2de08b8e7754214818cec15a747a9c3e21b6f66d 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 64f653f1da2a6bebfdf64f669715efda8b9746b3..5d5c6b00c5bdc7d9545e8b6a96975dd26e2925c2 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 5d712ebf6e89ddc5df31eefc24b960301080f4e8..2c366803ae12118e9697d637a26c62177b1ef250 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 0be6f8bff052a7469a0576432bffeff5215355fd..20c536edde64ce4d9fafcc2dfa32c78168999446 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 f1afc4e5f5e86fbf8fd18fb3babc05c741c1c7f4..7fb2ffd41693bfcde005e7bbbe75c82b9eb2d558 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 194485fe7e23d7ffb1030b68960e381d98e78cba..52284c0416bf0263f9d0fe0f9b77d03c2a872112 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