Skip to content

Commit

Permalink
simplifying module name
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Nov 7, 2016
1 parent b556158 commit 9ea1b1d
Show file tree
Hide file tree
Showing 58 changed files with 174 additions and 175 deletions.
10 changes: 5 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[run]
include =
# include these files
Sequential_WC_Simulator/*
wc_sim/*
tests/*
examples/*
omit =
# omit these files
Sequential_WC_Simulator/multialgorithm/plot_specie_pop.py
Sequential_WC_Simulator/multialgorithm/species_counts.py
Sequential_WC_Simulator/multialgorithm/temp/analysis.py
Sequential_WC_Simulator/multialgorithm/temp/exercise.py
wc_sim/multialgorithm/plot_specie_pop.py
wc_sim/multialgorithm/species_counts.py
wc_sim/multialgorithm/temp/analysis.py
wc_sim/multialgorithm/temp/exercise.py
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ include requirements.txt
recursive-include examples *

# configuration files
recursive-include Sequential_WC_Simulator *.cfg
recursive-include wc_sim *.cfg
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<!-- [![PyPI package](https://img.shields.io/pypi/v/Sequential_WC_Simulator.svg)](https://pypi.python.org/pypi/Karr-Lab-build-utils) -->
[![Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg)](http://code.karrlab.org/Sequential_WC_Simulator/docs)
[![Test results](https://circleci.com/gh/KarrLab/Sequential_WC_Simulator.svg?style=shield&circle-token=5f0ee7e437b91cbcac19a9b8526a7ea320ee61c7)](https://circleci.com/gh/KarrLab/Sequential_WC_Simulator)
[![Test coverage](https://coveralls.io/repos/github/KarrLab/Sequential_WC_Simulator/badge.svg?t=EUFJ40)](https://coveralls.io/github/KarrLab/Sequential_WC_Simulator)
<!-- [![PyPI package](https://img.shields.io/pypi/v/wc_sim.svg)](https://pypi.python.org/pypi/Karr-Lab-build-utils) -->
[![Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg)](http://code.karrlab.org/wc_sim/docs)
[![Test results](https://circleci.com/gh/KarrLab/wc_sim.svg?style=shield&circle-token=5f0ee7e437b91cbcac19a9b8526a7ea320ee61c7)](https://circleci.com/gh/KarrLab/wc_sim)
[![Test coverage](https://coveralls.io/repos/github/KarrLab/wc_sim/badge.svg?t=EUFJ40)](https://coveralls.io/github/KarrLab/wc_sim)
[![Code analysis](https://codeclimate.com/repos/57ab5e097ba8854f41000799/badges/54b4deadccf7944d38f6/gpa.svg)](https://codeclimate.com/repos/57ab5e097ba8854f41000799)
[![License](https://img.shields.io/github/license/KarrLab/Sequential_WC_Simulator.svg)](LICENSE)
![Analytics](https://ga-beacon.appspot.com/UA-86759801-1/Sequential_WC_Simulator/README.md?pixel)

# Sequential_WC_Simulator
[![License](https://img.shields.io/github/license/KarrLab/wc_sim.svg)](LICENSE)
![Analytics](https://ga-beacon.appspot.com/UA-86759801-1/wc_sim/README.md?pixel)

# wc_sim

## Documentation
Please see the [API documentation](http://code.karrlab.org/Sequential_WC_Simulator/docs).
Please see the [API documentation](http://code.karrlab.org/wc_sim/docs).

## License
The build utilities are released under the [MIT license](LICENSE).
Expand Down
29 changes: 0 additions & 29 deletions Sequential_WC_Simulator/core/config/paths.py

This file was deleted.

29 changes: 0 additions & 29 deletions Sequential_WC_Simulator/multialgorithm/config/paths.py

This file was deleted.

4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
import Sequential_WC_Simulator
import wc_sim

# -- General configuration ------------------------------------------------

Expand Down Expand Up @@ -65,7 +65,7 @@
# built documents.
#
# The short X.Y version.
version = Sequential_WC_Simulator.__version__
version = wc_sim.__version__
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
4 changes: 2 additions & 2 deletions examples/PHOLD.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import datetime

from .debug_logs import logs as debug_logs
from Sequential_WC_Simulator.core.simulation_object import EventQueue, SimulationObject
from Sequential_WC_Simulator.core.simulation_engine import SimulationEngine, MessageTypesRegistry
from wc_sim.core.simulation_object import EventQueue, SimulationObject
from wc_sim.core.simulation_engine import SimulationEngine, MessageTypesRegistry

def obj_name( obj_num ):
# create object name from index
Expand Down
2 changes: 1 addition & 1 deletion examples/config/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
import os

debug_logs = debug_logs_default_paths.deepcopy()
debug_logs.default = resource_filename('Sequential_WC_Simulator', 'examples/config/debug.default.cfg')
debug_logs.default = resource_filename('wc_sim', 'examples/config/debug.default.cfg')
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ universal = 1

[coverage:run]
source =
Sequential_WC_Simulator
wc_sim

[sphinx-apidocs]
packages =
Sequential_WC_Simulator
wc_sim
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import setup, find_packages
from wc_utils.util.install import parse_requirements, install_dependencies
import Sequential_WC_Simulator
import wc_sim

# parse dependencies and links from requirements.txt files
with open('requirements.txt', 'r') as file:
Expand All @@ -17,18 +17,18 @@

# install package
setup(
name="Sequential_WC_Simulator",
version=Sequential_WC_Simulator.__version__,
name="wc_sim",
version=wc_sim.__version__,
description="Sequential whole-cell model simulator",
url="https://github.com/KarrLab/Sequential_WC_Simulator",
download_url='https://github.com/KarrLab/Sequential_WC_Simulator/tarball/{}'.format(Sequential_WC_Simulator.__version__),
url="https://github.com/KarrLab/wc_sim",
download_url='https://github.com/KarrLab/wc_sim/tarball/{}'.format(wc_sim.__version__),
author="Arthur Goldberg",
author_email="[email protected]",
license="MIT",
keywords='whole-cell systems cell molecular biology',
packages=find_packages(exclude=['tests', 'tests.*']),
package_data={
'Sequential_WC_Simulator': [
'wc_sim': [
'core/config/core.default.cfg',
'core/config/core.schema.cfg',
'core/config/debug.default.cfg',
Expand Down
4 changes: 2 additions & 2 deletions tests/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function usage {
if [ -n "$1" ]; then echo $1 >&2; fi
cat <<EOF >&2
usage: $(basename $0)
run all unittests for Sequential_WC_Simulator
run all unittests for wc_sim
-c: perform coverage tests as well
-h: produce this message
EOF
Expand Down Expand Up @@ -43,7 +43,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [[ -n "$OPT_COVERAGE" ]]
then
nosetests $SCRIPT_DIR --with-coverage --cover-package=Sequential_WC_Simulator
nosetests $SCRIPT_DIR --with-coverage --cover-package=wc_sim
coverage html
else
nosetests $SCRIPT_DIR
Expand Down
10 changes: 5 additions & 5 deletions tests/test_CellState.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

from wc_utils.util.rand import RandomStateManager

from Sequential_WC_Simulator.core.simulation_object import EventQueue, SimulationObject
from Sequential_WC_Simulator.core.simulation_engine import SimulationEngine, MessageTypesRegistry
from Sequential_WC_Simulator.multialgorithm.cell_state import CellState
from Sequential_WC_Simulator.multialgorithm.message_types import *
from wc_sim.core.simulation_object import EventQueue, SimulationObject
from wc_sim.core.simulation_engine import SimulationEngine, MessageTypesRegistry
from wc_sim.multialgorithm.cell_state import CellState
from wc_sim.multialgorithm.message_types import *
from tests.universal_sender_receiver_simulation_object import UniversalSenderReceiverSimulationObject
# from Sequential_WC_Simulator.core.logging_config import LOGGING_ROOT_DIR
# from wc_sim.core.logging_config import LOGGING_ROOT_DIR

class TestCellState(unittest.TestCase):

Expand Down
8 changes: 4 additions & 4 deletions tests/test_CellStateMultiObj.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
from wc_utils.util.rand import RandomStateManager

# TODO(Arthur): test the exceptions in these modules
from Sequential_WC_Simulator.core.simulation_object import EventQueue, SimulationObject
from Sequential_WC_Simulator.core.simulation_engine import SimulationEngine, MessageTypesRegistry
from Sequential_WC_Simulator.multialgorithm.message_types import *
from Sequential_WC_Simulator.multialgorithm.cell_state import CellState
from wc_sim.core.simulation_object import EventQueue, SimulationObject
from wc_sim.core.simulation_engine import SimulationEngine, MessageTypesRegistry
from wc_sim.multialgorithm.message_types import *
from wc_sim.multialgorithm.cell_state import CellState
from tests.universal_sender_receiver_simulation_object import UniversalSenderReceiverSimulationObject

def parse_population_history( pop_history ):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_MessageTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from wc_utils.util.misc import isclass_by_name

from Sequential_WC_Simulator.multialgorithm.message_types import *
from wc_sim.multialgorithm.message_types import *

class TestMessageTypes(unittest.TestCase):

Expand Down
6 changes: 3 additions & 3 deletions tests/test_MultiAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

from argparse import Namespace

from Sequential_WC_Simulator.multialgorithm.config import paths as config_paths
from Sequential_WC_Simulator.multialgorithm.multi_algorithm import MultiAlgorithm
from wc_sim.multialgorithm.config import paths as config_paths
from wc_sim.multialgorithm.multi_algorithm import MultiAlgorithm
from wc_utils.config.core import ConfigManager

config = ConfigManager(config_paths.core).get_config()['Sequential_WC_Simulator']['multialgorithm']
config = ConfigManager(config_paths.core).get_config()['wc_sim']['multialgorithm']


class TestMultiAlgorithm(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_SharedMemoryCellState.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from wc_utils.util.rand import RandomStateManager

from Sequential_WC_Simulator.multialgorithm.specie import Specie
from Sequential_WC_Simulator.multialgorithm.shared_memory_cell_state import SharedMemoryCellState
from wc_sim.multialgorithm.specie import Specie
from wc_sim.multialgorithm.shared_memory_cell_state import SharedMemoryCellState

class TestSharedMemoryCellState(unittest.TestCase):

Expand Down
8 changes: 4 additions & 4 deletions tests/test_SimpleStochasticSimulationAlgorithm.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import unittest

from Sequential_WC_Simulator.core.simulation_object import (EventQueue, SimulationObject)
from Sequential_WC_Simulator.core.simulation_engine import (SimulationEngine, MessageTypesRegistry)
from Sequential_WC_Simulator.multialgorithm.submodels.simple_SSA_submodel import simple_SSA_submodel
from Sequential_WC_Simulator.multialgorithm.message_types import *
from wc_sim.core.simulation_object import (EventQueue, SimulationObject)
from wc_sim.core.simulation_engine import (SimulationEngine, MessageTypesRegistry)
from wc_sim.multialgorithm.submodels.simple_SSA_submodel import simple_SSA_submodel
from wc_sim.multialgorithm.message_types import *
from tests.universal_sender_receiver_simulation_object import UniversalSenderReceiverSimulationObject

class Testsimple_SSA_submodel(unittest.TestCase):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_SimulationEngine.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import print_function
import unittest

from Sequential_WC_Simulator.core.simulation_object import (EventQueue, SimulationObject)
from Sequential_WC_Simulator.core.event import Event
from Sequential_WC_Simulator.core.simulation_engine import (SimulationEngine, MessageTypesRegistry)
from wc_sim.core.simulation_object import (EventQueue, SimulationObject)
from wc_sim.core.event import Event
from wc_sim.core.simulation_engine import (SimulationEngine, MessageTypesRegistry)
from tests.some_message_types import *

class ExampleSimulationObject(SimulationObject):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_SimulationObject.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import print_function
import unittest

from Sequential_WC_Simulator.core.simulation_object import (EventQueue, SimulationObject)
from Sequential_WC_Simulator.core.simulation_engine import (SimulationEngine, MessageTypesRegistry)
from wc_sim.core.simulation_object import (EventQueue, SimulationObject)
from wc_sim.core.simulation_engine import (SimulationEngine, MessageTypesRegistry)
from tests.some_message_types import *

class ExampleSimulationObject(SimulationObject):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_Specie.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import unittest

from scipy.stats import binom
from Sequential_WC_Simulator.core.simulation_object import EventQueue, SimulationObject
from Sequential_WC_Simulator.core.simulation_engine import SimulationEngine, MessageTypesRegistry
from Sequential_WC_Simulator.multialgorithm.specie import Specie
from wc_sim.core.simulation_object import EventQueue, SimulationObject
from wc_sim.core.simulation_engine import SimulationEngine, MessageTypesRegistry
from wc_sim.multialgorithm.specie import Specie
from wc_utils.util.rand import RandomStateManager


Expand Down
2 changes: 1 addition & 1 deletion tests/test_utilities.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
import re
from Sequential_WC_Simulator.multialgorithm.utilities import get_species_and_compartment_from_name
from wc_sim.multialgorithm.utilities import get_species_and_compartment_from_name

class TestUtilities(unittest.TestCase):

Expand Down
6 changes: 3 additions & 3 deletions tests/universal_sender_receiver_simulation_object.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from Sequential_WC_Simulator.core.simulation_object import SimulationObject
from Sequential_WC_Simulator.core.simulation_engine import MessageTypesRegistry
from Sequential_WC_Simulator.multialgorithm.message_types import *
from wc_sim.core.simulation_object import SimulationObject
from wc_sim.core.simulation_engine import MessageTypesRegistry
from wc_sim.multialgorithm.message_types import *

class UniversalSenderReceiverSimulationObject(SimulationObject):

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Sequential_WC_Simulator]
[wc_sim]
[[core]]
copy_event_bodies = False
default_center_of_mass = 10
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Sequential_WC_Simulator]
[wc_sim]
[[core]]
copy_event_bodies = boolean(default=False)
# whether to deepcopy each event_body in SimulationObject.send_event() before
Expand Down
File renamed without changes.
29 changes: 29 additions & 0 deletions wc_sim/core/config/paths.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
""" Configuration
:Author: Arthur Goldberg <[email protected]>
:Date: 2016-09-19
:Copyright: 2016, Karr Lab
:License: MIT
"""

from pkg_resources import resource_filename
from wc_utils.config.core import ConfigPaths
from wc_utils.debug_logs.config import paths as debug_logs_default_paths
import os


core = ConfigPaths(
default=resource_filename('wc_sim', 'core/config/core.default.cfg'),
schema=resource_filename('wc_sim', 'core/config/core.schema.cfg'),
user=(
'wc_sim.core.core.cfg',
os.path.expanduser('~/.wc/wc_sim.core.core.cfg'),
),
)

debug_logs = debug_logs_default_paths.deepcopy()
debug_logs.default = resource_filename('wc_sim', 'core/config/debug.default.cfg')
debug_logs.user = (
'wc_sim.core.debug.cfg',
os.path.expanduser('~/.wc/wc_sim.core.debug.cfg'),
)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import datetime

from Sequential_WC_Simulator.core.event import Event
from wc_sim.core.event import Event

# configure logging
from .debug_logs import logs as debug_logs
Expand Down
Loading

0 comments on commit 9ea1b1d

Please sign in to comment.