Skip to content

Commit

Permalink
# changed from absolute import (python 2) to relative import (python 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriceling committed Sep 27, 2017
1 parent 1b30f9c commit 3a6746d
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 54 deletions.
70 changes: 35 additions & 35 deletions dose/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,53 @@
Date created: 27th September 2013
'''
import metadata
from . import metadata

__version__ = metadata.version
__maintainer__ = metadata.maintainer
__email__ = metadata.email
__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
14 changes: 7 additions & 7 deletions dose/dose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
'''
Expand Down
2 changes: 1 addition & 1 deletion dose/lc_bf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
'''
Expand Down
4 changes: 2 additions & 2 deletions dose/n_bf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
'''
Expand Down
8 changes: 4 additions & 4 deletions dose/ragaraja.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions dose/simulation_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
'''
Expand Down

0 comments on commit 3a6746d

Please sign in to comment.