Skip to content

Commit

Permalink
Removed sys.append("..") in every example, since now EAP can be
Browse files Browse the repository at this point in the history
installed via setup.py.
  • Loading branch information
cmd-ntrf authored and felix.antoine.fortin committed Oct 7, 2010
1 parent d33bfe3 commit 099ac7d
Show file tree
Hide file tree
Showing 16 changed files with 6 additions and 32 deletions.
1 change: 0 additions & 1 deletion examples/cmaes_minfct.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import random
import logging

sys.path.append("..")
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
random.seed(64) # Random must be seeded before importing cma because it is
# used to seed numpy.random
Expand Down
3 changes: 0 additions & 3 deletions examples/coev_symbreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with EAP. If not, see <http://www.gnu.org/licenses/>.

import sys
import random

sys.path.append("..")

from eap import base
from eap import creator
from eap import toolbox
Expand Down
4 changes: 1 addition & 3 deletions examples/es_fctmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import random
import logging

sys.path.append("..")

from eap import algorithms
from eap import base
from eap import creator
Expand Down Expand Up @@ -63,4 +61,4 @@ def evalSphere(individual):
algorithms.eaMuCommaLambda(tools, pop, mu=8, lambda_=32,
cxpb=0.6, mutpb=0.3, ngen=500, halloffame=hof)

logging.info("Best individual is %s, %s", hof[0], hof[0].fitness.values)
logging.info("Best individual is %s, %s", hof[0], hof[0].fitness.values)
3 changes: 1 addition & 2 deletions examples/ga_evosn.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import logging
import copy

sys.path.append("..")
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)

from eap import algorithms
Expand Down Expand Up @@ -150,4 +149,4 @@ def main():
print "%i errors, length %i, depth %i" % hof[0].fitness.values

if __name__ == "__main__":
main()
main()
3 changes: 1 addition & 2 deletions examples/ga_knapsack.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import random
import logging

sys.path.append("..")
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)

from eap import algorithms
Expand Down Expand Up @@ -99,4 +98,4 @@ def mutSet(individual):
# plt.scatter(weights, values)
# plt.xlabel("Weight")
# plt.ylabel("Value")
# plt.show()
# plt.show()
1 change: 0 additions & 1 deletion examples/ga_kursawefct.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import sys
import random

sys.path.append("..")
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)

from eap import algorithms
Expand Down
3 changes: 0 additions & 3 deletions examples/ga_onemax.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
# You should have received a copy of the GNU Lesser General Public
# License along with EAP. If not, see <http://www.gnu.org/licenses/>.

import sys
import random

sys.path.append("..")

from eap import base
from eap import creator
from eap import toolbox
Expand Down
1 change: 0 additions & 1 deletion examples/ga_onemax_short.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import random
import logging

sys.path.append("..")
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)

from eap import algorithms
Expand Down
1 change: 0 additions & 1 deletion examples/ga_tsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
raise ImportError, ("This example requires a YAML library in order to "
"read the data files.")

sys.path.append("..")
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)

from eap import base
Expand Down
3 changes: 0 additions & 3 deletions examples/gp_adf_symbreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
# You should have received a copy of the GNU Lesser General Public
# License along with EAP. If not, see <http://www.gnu.org/licenses/>.

import sys
import random
import operator
import math

sys.path.append("..")

from eap import base
from eap import creator
from eap import toolbox
Expand Down
2 changes: 0 additions & 2 deletions examples/gp_ant.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@

from functools import partial

sys.path.append("..")

from eap import base
from eap import creator
from eap import toolbox
Expand Down
2 changes: 0 additions & 2 deletions examples/gp_parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import operator
import logging

sys.path.append("..")

from eap import base
from eap import creator
from eap import toolbox
Expand Down
2 changes: 0 additions & 2 deletions examples/gp_spambase.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import csv
import itertools

sys.path.append("..")

from eap import base
from eap import creator
from eap import toolbox
Expand Down
2 changes: 0 additions & 2 deletions examples/gp_symbreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import logging
import random

sys.path.append("..")

from eap import base
from eap import creator
from eap import toolbox
Expand Down
1 change: 0 additions & 1 deletion examples/mpga_onemax.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import random
import sys

sys.path.append("..")
logging.basicConfig(level=logging.INFO, stream=sys.stdout)

from eap import algorithms
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
version=eap.__version__,
description='Distributed Evolutionary Algorithms in Python',
long_description='',
author='Francois-Michel De Rainville, Felix-Antoine Fortin',
author_email='',
author='DEAP Development Team',
author_email='[email protected]',
url='http://deap.googlecode.com',
download_url='http://code.google.com/p/deap/downloads/list',
packages=['eap'],
packages=['eap', 'eap.tests'],
platforms=['any'],
license='LGPL',
classifiers=[
Expand Down

0 comments on commit 099ac7d

Please sign in to comment.