diff --git a/dose/__init__.py b/dose/__init__.py index 08096fe..e57da6c 100644 --- a/dose/__init__.py +++ b/dose/__init__.py @@ -3,7 +3,7 @@ Date created: 27th September 2013 ''' -import metadata +from . import metadata __version__ = metadata.version __maintainer__ = metadata.maintainer @@ -11,45 +11,45 @@ __description__ = metadata.long_description # Package imports (in ascending order of package names) -import copads +from . import copads # Module imports (in ascending order of module names) -import database_calls -import dose -import genetic -import register_machine -import ragaraja +from . import database_calls +from . import dose +from . import genetic +from . import register_machine +from . import ragaraja # COPADS Class imports (in ascending order of module names, then class names) -from copads.lindenmayer import lindenmayer +from .copads.lindenmayer import lindenmayer # DOSE Class imports (in ascending order of module names, then class names) -from dose import dose_functions -from dose_world import World -from genetic import Chromosome -from genetic import Organism -from genetic import Population +from .dose import dose_functions +from .dose_world import World +from .genetic import Chromosome +from .genetic import Organism +from .genetic import Population # Function imports (in ascending order of module names, then function names) -from database_calls import connect_database -from database_calls import db_list_datafields -from database_calls import db_list_generations -from database_calls import db_list_simulations -from database_calls import db_list_population_name -from database_calls import db_get_ecosystem -from database_calls import db_get_organisms_chromosome_sequences -from database_calls import db_get_organisms_genome -from database_calls import db_get_organisms_status -from dose import database_report_populations -from dose import database_report_world -from dose import filter_age -from dose import filter_deme -from dose import filter_gender -from dose import filter_location -from dose import filter_status -from dose import filter_vitality -from dose import revive_simulation -from dose import simulate -from genetic import crossover -from genetic import population_constructor -from genetic import population_simulate +from .database_calls import connect_database +from .database_calls import db_list_datafields +from .database_calls import db_list_generations +from .database_calls import db_list_simulations +from .database_calls import db_list_population_name +from .database_calls import db_get_ecosystem +from .database_calls import db_get_organisms_chromosome_sequences +from .database_calls import db_get_organisms_genome +from .database_calls import db_get_organisms_status +from .dose import database_report_populations +from .dose import database_report_world +from .dose import filter_age +from .dose import filter_deme +from .dose import filter_gender +from .dose import filter_location +from .dose import filter_status +from .dose import filter_vitality +from .dose import revive_simulation +from .dose import simulate +from .genetic import crossover +from .genetic import population_constructor +from .genetic import population_simulate diff --git a/dose/dose.py b/dose/dose.py index 5eae5eb..0449525 100644 --- a/dose/dose.py +++ b/dose/dose.py @@ -9,15 +9,15 @@ ''' import sys, os, random, inspect -import ragaraja, register_machine -import dose_world -import genetic, simulation_calls +from . import ragaraja, register_machine +from . import dose_world +from . import genetic, simulation_calls -from simulation_calls import spawn_populations, simulation_core -from simulation_calls import excavate_world, revive_population +from .simulation_calls import spawn_populations, simulation_core +from .simulation_calls import excavate_world, revive_population -from database_calls import connect_database, db_reconstruct_simulation_parameters -from database_calls import db_reconstruct_population, db_reconstruct_world, db_list_simulations +from .database_calls import connect_database, db_reconstruct_simulation_parameters +from .database_calls import db_reconstruct_population, db_reconstruct_world, db_list_simulations class dose_functions(): ''' diff --git a/dose/lc_bf.py b/dose/lc_bf.py index 2238640..2f386f8 100644 --- a/dose/lc_bf.py +++ b/dose/lc_bf.py @@ -22,7 +22,7 @@ @see: http://esolangs.org/wiki/Loose_Circular_Brainfuck_(LCBF) ''' -import register_machine as r +from . import register_machine as r def increment(array, apointer, inputdata, output, source, spointer): ''' diff --git a/dose/n_bf.py b/dose/n_bf.py index d7c53df..c4dc2c6 100644 --- a/dose/n_bf.py +++ b/dose/n_bf.py @@ -23,8 +23,8 @@ ''' import random -import register_machine as r -from lc_bf import increment, decrement, forward, backward, call_out +from . import register_machine as r +from .lc_bf import increment, decrement, forward, backward, call_out def random_op(array, apointer, inputdata, output, source, spointer): ''' diff --git a/dose/ragaraja.py b/dose/ragaraja.py index c19724a..0bbe1f0 100644 --- a/dose/ragaraja.py +++ b/dose/ragaraja.py @@ -39,10 +39,10 @@ ''' import random import math -from copads.samplestatistics import SingleSample -from lc_bf import increment, decrement -from lc_bf import forward, backward -from lc_bf import call_out, accept_predefined +from .copads.samplestatistics import SingleSample +from .lc_bf import increment, decrement +from .lc_bf import forward, backward +from .lc_bf import call_out, accept_predefined register = [0]*99 diff --git a/dose/simulation_calls.py b/dose/simulation_calls.py index 0de9332..71f8e6d 100644 --- a/dose/simulation_calls.py +++ b/dose/simulation_calls.py @@ -20,12 +20,12 @@ except ImportError: import pickle -import dose_world -import genetic -import ragaraja, register_machine +from . import dose_world +from . import genetic +from . import ragaraja, register_machine -from database_calls import connect_database, db_log_simulation_parameters -from database_calls import db_report +from .database_calls import connect_database, db_log_simulation_parameters +from .database_calls import db_report def simulation_core(sim_functions, sim_parameters, Populations, World): '''