From 3bfaca515182da468540dacfe86c8d2b771441f5 Mon Sep 17 00:00:00 2001 From: Mathew Topper Date: Tue, 12 Oct 2021 13:52:28 +0100 Subject: [PATCH] Prepare version 3.0.0 release (#12) * Make sure mock is included in the test requirements --- CHANGELOG.md | 35 +---------------------------------- appveyor.yml | 11 +++++------ setup.py | 3 ++- 3 files changed, 8 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e50c9b..160994b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [2.1.0] - TBD +## [3.0.0] - 2021-10-12 ### Added - Added loop to rotor interaction solver. This produces a more accurate result than the single iteration used previously. - - Added check for additional grid orientations to find the maximum number of devices that can be placed during an optimisation. One additional device is added in each direction (in combination) and then assessed. @@ -19,44 +18,30 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Improved log messages - - Now uses the dominant wake model for superposition of rotor wake velocity deficits. The same dominant wake is chosen for the turbulence kinetic energy factor calculation. - - Replaced term "induction" to avoid confusion. Prefer "velocity" or "velocity coefficient". - - Replaced Mannings number input with beta and alpha coefficients for use with Soulsby type velocity profile calculation. - - Improved performance of rotor CFD data reading. - - Renamed deg360_to_radpi function as bearing_to_radians. - - Improved streamlines plot. ### Fixed - Fixed turbine angle of attack calculation. - - Fixed minimum distance between turbines check. - - Fixed rated power per rotor for MCT style device. - - Fixed rotor streamline calculation travelling in wrong direction. - - Fix bug in positioning of rotors for MCT style device. - - Fixed expected device layout orientation in optimiser by making the inter-column spacing refer to the x-direction and inter-row to the y. Array rotation is then the angle of the oncoming flow minus 90 degrees. - - Fixed optimiser start point estimator increasing scale when it should be reducing it - - Fix incorrect sorting of outputs for rotors by making names equal length - - Fix bug which forced all rotors to share the same input data ## [2.0.0] - 2019-03-05 @@ -72,14 +57,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Changed wave modules mean power output per device to return actual power generated rather than the sum of all powers across the power matrix. - - Optimised EnergyProduction function by reducing number of calls to block_diag. This has provided a one third reduction in run times. - - Reduce memory consumption of wave calculations by using single precision complex numpy arrays. This is necessary for solving large OEC farms with 8MB RAM. - - A alternative configuration file is now used for the location of the hydrodynamic data files if the module is bundled into the installer or if installed from source. @@ -90,47 +72,32 @@ and this project adheres to [Semantic Versioning](http://semver.org/). setup.py, which now requires MinGW to be installed separately. Note that PyQt and matplotlib must still be pinned due to incompatibility of later versions with Python 2. - - Removed installer code and data provided in the DTOcean data package. ### Fixed - Numerous PEP8 fixes. - - Tidal module velocity profile generator switched to Manning's formulation as was incorrectly set to the Soulsby type. - - Fixed bugs in the array layout optimiser code. - - Fixed bug in calculation of device depths for wave module approximation test. - - Fixed depreciation warning when sending arguments to setup.py test. - - Refactored distance_from_streamline to improve readability and correct issue with streamlines travelling upstream rather than downstream. - - Fixed issues with using non -rectangular domain in the tidal module. - - Fixed issues determining depth excluded zones with non -rectangular domains. - - NaNs are now set to zero in interp_at_point and edge cases are better handled. - - Fixed confusing variable names for inputs of wave energy period and peak period for wave energy calculations. - - Fixed bug where the angle of attack for yawed tidal turbines was being incorrectly calculated. - - Fixed tidal current streamline plotting (when debug flag is True). - - Fixed bug in dtocean_waves' Directional class which reduced energy output from wave energy calculations. - - Fixed bug in conversion of compass bearings to trig angles. - - Fixed bug in array main direction setting in tidal energy calculations. diff --git a/appveyor.yml b/appveyor.yml index 4409ec7..77eb6fe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,7 +8,7 @@ #---------------------------------# # version format -version: 2.1.dev1.build{build} +version: 3.0.0.build{build} image: - Visual Studio 2015 @@ -43,14 +43,13 @@ install: - python setup.py bootstrap - conda install --file requirements-conda-dev.txt - pip install -e . - - conda install pytest pytest-cov=2.5.1 pytest-mock - + - conda install mock pytest pytest-cov=2.5.1 pytest-mock + build: off - + test_script: - python setup.py test -a "--cov dtocean_hydro --cov dtocean_tidal --cov dtocean_wave --cov dtocean_wec" - + after_test: - pip install codecov - codecov - diff --git a/setup.py b/setup.py index 67b4395..a3fadc3 100644 --- a/setup.py +++ b/setup.py @@ -253,7 +253,8 @@ def get_appveyor_version(): 'dtocean-wec = dtocean_wec:gui_interface', ]}, zip_safe=False, # Important for reading config files - tests_require=['pytest', + tests_require=['mock', + 'pytest', 'pytest-mock'], cmdclass={'bootstrap': Bootstrap, 'test': PyTest,