From f5eebca36e56f129b49a0f0d9014de46377751ca Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sun, 7 May 2023 05:58:15 -0700 Subject: [PATCH] reorganize standalone libraries into internal and external submodules --- thursday/candidates/evolopy.py | 28 +++++++++---------- thursday/candidates/notwa.py | 6 ++-- {evolopy => thursday/external/evolopy}/BAT.py | 0 {evolopy => thursday/external/evolopy}/CS.py | 0 {evolopy => thursday/external/evolopy}/DE.py | 0 {evolopy => thursday/external/evolopy}/FFA.py | 0 {evolopy => thursday/external/evolopy}/GA.py | 0 {evolopy => thursday/external/evolopy}/GWO.py | 0 {evolopy => thursday/external/evolopy}/HHO.py | 0 .../external/evolopy}/JAYA.py | 0 .../external/evolopy}/LICENSE.txt | 0 {evolopy => thursday/external/evolopy}/MFO.py | 0 {evolopy => thursday/external/evolopy}/MVO.py | 0 {evolopy => thursday/external/evolopy}/PSO.py | 0 {evolopy => thursday/external/evolopy}/SCA.py | 0 {evolopy => thursday/external/evolopy}/SSA.py | 0 {evolopy => thursday/external/evolopy}/WOA.py | 0 .../external/evolopy}/solution.py | 0 .../go_benchmark_functions}/__init__.py | 0 .../go_benchmark_functions}/go_benchmark.py | 0 .../go_benchmark_functions}/go_funcs_A.py | 0 .../go_benchmark_functions}/go_funcs_B.py | 0 .../go_benchmark_functions}/go_funcs_C.py | 0 .../go_benchmark_functions}/go_funcs_D.py | 0 .../go_benchmark_functions}/go_funcs_E.py | 0 .../go_benchmark_functions}/go_funcs_F.py | 0 .../go_benchmark_functions}/go_funcs_G.py | 0 .../go_benchmark_functions}/go_funcs_H.py | 0 .../go_benchmark_functions}/go_funcs_I.py | 0 .../go_benchmark_functions}/go_funcs_J.py | 0 .../go_benchmark_functions}/go_funcs_K.py | 0 .../go_benchmark_functions}/go_funcs_L.py | 0 .../go_benchmark_functions}/go_funcs_M.py | 0 .../go_benchmark_functions}/go_funcs_N.py | 0 .../go_benchmark_functions}/go_funcs_O.py | 0 .../go_benchmark_functions}/go_funcs_P.py | 0 .../go_benchmark_functions}/go_funcs_Q.py | 0 .../go_benchmark_functions}/go_funcs_R.py | 0 .../go_benchmark_functions}/go_funcs_S.py | 0 .../go_benchmark_functions}/go_funcs_T.py | 0 .../go_benchmark_functions}/go_funcs_U.py | 0 .../go_benchmark_functions}/go_funcs_V.py | 0 .../go_benchmark_functions}/go_funcs_W.py | 0 .../go_benchmark_functions}/go_funcs_X.py | 0 .../go_benchmark_functions}/go_funcs_Y.py | 0 .../go_benchmark_functions}/go_funcs_Z.py | 0 .../go_funcs_univariate.py | 0 thursday/go_benchmarks.py | 2 +- thursday/{ => internal}/birect.py | 0 thursday/{ => internal}/hg.py | 0 thursday/{ => internal}/soo.py | 0 51 files changed, 18 insertions(+), 18 deletions(-) rename {evolopy => thursday/external/evolopy}/BAT.py (100%) rename {evolopy => thursday/external/evolopy}/CS.py (100%) rename {evolopy => thursday/external/evolopy}/DE.py (100%) rename {evolopy => thursday/external/evolopy}/FFA.py (100%) rename {evolopy => thursday/external/evolopy}/GA.py (100%) rename {evolopy => thursday/external/evolopy}/GWO.py (100%) rename {evolopy => thursday/external/evolopy}/HHO.py (100%) rename {evolopy => thursday/external/evolopy}/JAYA.py (100%) rename {evolopy => thursday/external/evolopy}/LICENSE.txt (100%) rename {evolopy => thursday/external/evolopy}/MFO.py (100%) rename {evolopy => thursday/external/evolopy}/MVO.py (100%) rename {evolopy => thursday/external/evolopy}/PSO.py (100%) rename {evolopy => thursday/external/evolopy}/SCA.py (100%) rename {evolopy => thursday/external/evolopy}/SSA.py (100%) rename {evolopy => thursday/external/evolopy}/WOA.py (100%) rename {evolopy => thursday/external/evolopy}/solution.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/__init__.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_benchmark.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_A.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_B.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_C.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_D.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_E.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_F.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_G.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_H.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_I.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_J.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_K.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_L.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_M.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_N.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_O.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_P.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_Q.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_R.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_S.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_T.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_U.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_V.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_W.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_X.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_Y.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_Z.py (100%) rename {go_benchmark_functions => thursday/external/go_benchmark_functions}/go_funcs_univariate.py (100%) rename thursday/{ => internal}/birect.py (100%) rename thursday/{ => internal}/hg.py (100%) rename thursday/{ => internal}/soo.py (100%) diff --git a/thursday/candidates/evolopy.py b/thursday/candidates/evolopy.py index 96c6d9e..b1c565c 100644 --- a/thursday/candidates/evolopy.py +++ b/thursday/candidates/evolopy.py @@ -3,20 +3,20 @@ import numpy as np def make_evolopy(optimizer_name, popsize=None): - from evolopy.BAT import BAT - from evolopy.CS import CS - from evolopy.DE import DE - from evolopy.FFA import FFA - from evolopy.GA import GA - from evolopy.GWO import GWO - from evolopy.HHO import HHO - from evolopy.JAYA import JAYA - from evolopy.MFO import MFO - from evolopy.MVO import MVO - from evolopy.PSO import PSO - from evolopy.SCA import SCA - from evolopy.SSA import SSA - from evolopy.WOA import WOA + from ..external.evolopy.BAT import BAT + from ..external.evolopy.CS import CS + from ..external.evolopy.DE import DE + from ..external.evolopy.FFA import FFA + from ..external.evolopy.GA import GA + from ..external.evolopy.GWO import GWO + from ..external.evolopy.HHO import HHO + from ..external.evolopy.JAYA import JAYA + from ..external.evolopy.MFO import MFO + from ..external.evolopy.MVO import MVO + from ..external.evolopy.PSO import PSO + from ..external.evolopy.SCA import SCA + from ..external.evolopy.SSA import SSA + from ..external.evolopy.WOA import WOA from unittest.mock import patch def no_print(*args, **kwargs): diff --git a/thursday/candidates/notwa.py b/thursday/candidates/notwa.py index fc7bf69..452a672 100644 --- a/thursday/candidates/notwa.py +++ b/thursday/candidates/notwa.py @@ -4,7 +4,7 @@ import numpy as np def make_birect(deepness=23, *, longest=False, pruning=False): - from ..birect import birect + from ..internal.birect import birect def f(objective, n_trials, n_dim, with_count): feval_count = 0 @@ -37,7 +37,7 @@ def make_soo(deepness=None, *, K=3): if deepness is None: deepness = int(31 * np.log(2) / np.log(K) - 1e-8) assert K >= 2 - from ..soo import soo + from ..internal.soo import soo def f(objective, n_trials, n_dim, with_count): feval_count = 0 @@ -61,7 +61,7 @@ def make_soo(deepness=None, *, K=3): def make_mercury( flags, bounding="clip", *, isigma=tt.IV, popsize=2, irate=1, seed=None ): - from ..hg import minimize as hg + from ..internal.hg import minimize as hg def f(objective, n_trials, n_dim, with_count): _objective = wrap_untrustworthy(objective, n_trials, bounding=bounding) diff --git a/evolopy/BAT.py b/thursday/external/evolopy/BAT.py similarity index 100% rename from evolopy/BAT.py rename to thursday/external/evolopy/BAT.py diff --git a/evolopy/CS.py b/thursday/external/evolopy/CS.py similarity index 100% rename from evolopy/CS.py rename to thursday/external/evolopy/CS.py diff --git a/evolopy/DE.py b/thursday/external/evolopy/DE.py similarity index 100% rename from evolopy/DE.py rename to thursday/external/evolopy/DE.py diff --git a/evolopy/FFA.py b/thursday/external/evolopy/FFA.py similarity index 100% rename from evolopy/FFA.py rename to thursday/external/evolopy/FFA.py diff --git a/evolopy/GA.py b/thursday/external/evolopy/GA.py similarity index 100% rename from evolopy/GA.py rename to thursday/external/evolopy/GA.py diff --git a/evolopy/GWO.py b/thursday/external/evolopy/GWO.py similarity index 100% rename from evolopy/GWO.py rename to thursday/external/evolopy/GWO.py diff --git a/evolopy/HHO.py b/thursday/external/evolopy/HHO.py similarity index 100% rename from evolopy/HHO.py rename to thursday/external/evolopy/HHO.py diff --git a/evolopy/JAYA.py b/thursday/external/evolopy/JAYA.py similarity index 100% rename from evolopy/JAYA.py rename to thursday/external/evolopy/JAYA.py diff --git a/evolopy/LICENSE.txt b/thursday/external/evolopy/LICENSE.txt similarity index 100% rename from evolopy/LICENSE.txt rename to thursday/external/evolopy/LICENSE.txt diff --git a/evolopy/MFO.py b/thursday/external/evolopy/MFO.py similarity index 100% rename from evolopy/MFO.py rename to thursday/external/evolopy/MFO.py diff --git a/evolopy/MVO.py b/thursday/external/evolopy/MVO.py similarity index 100% rename from evolopy/MVO.py rename to thursday/external/evolopy/MVO.py diff --git a/evolopy/PSO.py b/thursday/external/evolopy/PSO.py similarity index 100% rename from evolopy/PSO.py rename to thursday/external/evolopy/PSO.py diff --git a/evolopy/SCA.py b/thursday/external/evolopy/SCA.py similarity index 100% rename from evolopy/SCA.py rename to thursday/external/evolopy/SCA.py diff --git a/evolopy/SSA.py b/thursday/external/evolopy/SSA.py similarity index 100% rename from evolopy/SSA.py rename to thursday/external/evolopy/SSA.py diff --git a/evolopy/WOA.py b/thursday/external/evolopy/WOA.py similarity index 100% rename from evolopy/WOA.py rename to thursday/external/evolopy/WOA.py diff --git a/evolopy/solution.py b/thursday/external/evolopy/solution.py similarity index 100% rename from evolopy/solution.py rename to thursday/external/evolopy/solution.py diff --git a/go_benchmark_functions/__init__.py b/thursday/external/go_benchmark_functions/__init__.py similarity index 100% rename from go_benchmark_functions/__init__.py rename to thursday/external/go_benchmark_functions/__init__.py diff --git a/go_benchmark_functions/go_benchmark.py b/thursday/external/go_benchmark_functions/go_benchmark.py similarity index 100% rename from go_benchmark_functions/go_benchmark.py rename to thursday/external/go_benchmark_functions/go_benchmark.py diff --git a/go_benchmark_functions/go_funcs_A.py b/thursday/external/go_benchmark_functions/go_funcs_A.py similarity index 100% rename from go_benchmark_functions/go_funcs_A.py rename to thursday/external/go_benchmark_functions/go_funcs_A.py diff --git a/go_benchmark_functions/go_funcs_B.py b/thursday/external/go_benchmark_functions/go_funcs_B.py similarity index 100% rename from go_benchmark_functions/go_funcs_B.py rename to thursday/external/go_benchmark_functions/go_funcs_B.py diff --git a/go_benchmark_functions/go_funcs_C.py b/thursday/external/go_benchmark_functions/go_funcs_C.py similarity index 100% rename from go_benchmark_functions/go_funcs_C.py rename to thursday/external/go_benchmark_functions/go_funcs_C.py diff --git a/go_benchmark_functions/go_funcs_D.py b/thursday/external/go_benchmark_functions/go_funcs_D.py similarity index 100% rename from go_benchmark_functions/go_funcs_D.py rename to thursday/external/go_benchmark_functions/go_funcs_D.py diff --git a/go_benchmark_functions/go_funcs_E.py b/thursday/external/go_benchmark_functions/go_funcs_E.py similarity index 100% rename from go_benchmark_functions/go_funcs_E.py rename to thursday/external/go_benchmark_functions/go_funcs_E.py diff --git a/go_benchmark_functions/go_funcs_F.py b/thursday/external/go_benchmark_functions/go_funcs_F.py similarity index 100% rename from go_benchmark_functions/go_funcs_F.py rename to thursday/external/go_benchmark_functions/go_funcs_F.py diff --git a/go_benchmark_functions/go_funcs_G.py b/thursday/external/go_benchmark_functions/go_funcs_G.py similarity index 100% rename from go_benchmark_functions/go_funcs_G.py rename to thursday/external/go_benchmark_functions/go_funcs_G.py diff --git a/go_benchmark_functions/go_funcs_H.py b/thursday/external/go_benchmark_functions/go_funcs_H.py similarity index 100% rename from go_benchmark_functions/go_funcs_H.py rename to thursday/external/go_benchmark_functions/go_funcs_H.py diff --git a/go_benchmark_functions/go_funcs_I.py b/thursday/external/go_benchmark_functions/go_funcs_I.py similarity index 100% rename from go_benchmark_functions/go_funcs_I.py rename to thursday/external/go_benchmark_functions/go_funcs_I.py diff --git a/go_benchmark_functions/go_funcs_J.py b/thursday/external/go_benchmark_functions/go_funcs_J.py similarity index 100% rename from go_benchmark_functions/go_funcs_J.py rename to thursday/external/go_benchmark_functions/go_funcs_J.py diff --git a/go_benchmark_functions/go_funcs_K.py b/thursday/external/go_benchmark_functions/go_funcs_K.py similarity index 100% rename from go_benchmark_functions/go_funcs_K.py rename to thursday/external/go_benchmark_functions/go_funcs_K.py diff --git a/go_benchmark_functions/go_funcs_L.py b/thursday/external/go_benchmark_functions/go_funcs_L.py similarity index 100% rename from go_benchmark_functions/go_funcs_L.py rename to thursday/external/go_benchmark_functions/go_funcs_L.py diff --git a/go_benchmark_functions/go_funcs_M.py b/thursday/external/go_benchmark_functions/go_funcs_M.py similarity index 100% rename from go_benchmark_functions/go_funcs_M.py rename to thursday/external/go_benchmark_functions/go_funcs_M.py diff --git a/go_benchmark_functions/go_funcs_N.py b/thursday/external/go_benchmark_functions/go_funcs_N.py similarity index 100% rename from go_benchmark_functions/go_funcs_N.py rename to thursday/external/go_benchmark_functions/go_funcs_N.py diff --git a/go_benchmark_functions/go_funcs_O.py b/thursday/external/go_benchmark_functions/go_funcs_O.py similarity index 100% rename from go_benchmark_functions/go_funcs_O.py rename to thursday/external/go_benchmark_functions/go_funcs_O.py diff --git a/go_benchmark_functions/go_funcs_P.py b/thursday/external/go_benchmark_functions/go_funcs_P.py similarity index 100% rename from go_benchmark_functions/go_funcs_P.py rename to thursday/external/go_benchmark_functions/go_funcs_P.py diff --git a/go_benchmark_functions/go_funcs_Q.py b/thursday/external/go_benchmark_functions/go_funcs_Q.py similarity index 100% rename from go_benchmark_functions/go_funcs_Q.py rename to thursday/external/go_benchmark_functions/go_funcs_Q.py diff --git a/go_benchmark_functions/go_funcs_R.py b/thursday/external/go_benchmark_functions/go_funcs_R.py similarity index 100% rename from go_benchmark_functions/go_funcs_R.py rename to thursday/external/go_benchmark_functions/go_funcs_R.py diff --git a/go_benchmark_functions/go_funcs_S.py b/thursday/external/go_benchmark_functions/go_funcs_S.py similarity index 100% rename from go_benchmark_functions/go_funcs_S.py rename to thursday/external/go_benchmark_functions/go_funcs_S.py diff --git a/go_benchmark_functions/go_funcs_T.py b/thursday/external/go_benchmark_functions/go_funcs_T.py similarity index 100% rename from go_benchmark_functions/go_funcs_T.py rename to thursday/external/go_benchmark_functions/go_funcs_T.py diff --git a/go_benchmark_functions/go_funcs_U.py b/thursday/external/go_benchmark_functions/go_funcs_U.py similarity index 100% rename from go_benchmark_functions/go_funcs_U.py rename to thursday/external/go_benchmark_functions/go_funcs_U.py diff --git a/go_benchmark_functions/go_funcs_V.py b/thursday/external/go_benchmark_functions/go_funcs_V.py similarity index 100% rename from go_benchmark_functions/go_funcs_V.py rename to thursday/external/go_benchmark_functions/go_funcs_V.py diff --git a/go_benchmark_functions/go_funcs_W.py b/thursday/external/go_benchmark_functions/go_funcs_W.py similarity index 100% rename from go_benchmark_functions/go_funcs_W.py rename to thursday/external/go_benchmark_functions/go_funcs_W.py diff --git a/go_benchmark_functions/go_funcs_X.py b/thursday/external/go_benchmark_functions/go_funcs_X.py similarity index 100% rename from go_benchmark_functions/go_funcs_X.py rename to thursday/external/go_benchmark_functions/go_funcs_X.py diff --git a/go_benchmark_functions/go_funcs_Y.py b/thursday/external/go_benchmark_functions/go_funcs_Y.py similarity index 100% rename from go_benchmark_functions/go_funcs_Y.py rename to thursday/external/go_benchmark_functions/go_funcs_Y.py diff --git a/go_benchmark_functions/go_funcs_Z.py b/thursday/external/go_benchmark_functions/go_funcs_Z.py similarity index 100% rename from go_benchmark_functions/go_funcs_Z.py rename to thursday/external/go_benchmark_functions/go_funcs_Z.py diff --git a/go_benchmark_functions/go_funcs_univariate.py b/thursday/external/go_benchmark_functions/go_funcs_univariate.py similarity index 100% rename from go_benchmark_functions/go_funcs_univariate.py rename to thursday/external/go_benchmark_functions/go_funcs_univariate.py diff --git a/thursday/go_benchmarks.py b/thursday/go_benchmarks.py index 6a34a6f..be9add9 100644 --- a/thursday/go_benchmarks.py +++ b/thursday/go_benchmarks.py @@ -1,4 +1,4 @@ -from go_benchmark_functions import * +from .external.go_benchmark_functions import * from inspect import getmro, isclass _looky_here = False diff --git a/thursday/birect.py b/thursday/internal/birect.py similarity index 100% rename from thursday/birect.py rename to thursday/internal/birect.py diff --git a/thursday/hg.py b/thursday/internal/hg.py similarity index 100% rename from thursday/hg.py rename to thursday/internal/hg.py diff --git a/thursday/soo.py b/thursday/internal/soo.py similarity index 100% rename from thursday/soo.py rename to thursday/internal/soo.py