Skip to content

Commit

Permalink
Merge pull request #11 from Multiscale-Genomics/py3_testing
Browse files Browse the repository at this point in the history
Updated code so that it is Py3 compliant
  • Loading branch information
athina1 committed Jul 18, 2018
2 parents 9c74830 + 74e6c1c commit 313d12b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dist: trusty

python:
- "2.7"
- "3.6"

env:
matrix:
Expand Down
6 changes: 3 additions & 3 deletions apps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
limitations under the License.
"""

from pycompssapp import PyCOMPSsApp
from localapp import LocalApp
from workflowapp import WorkflowApp
from apps.pycompssapp import PyCOMPSsApp
from apps.localapp import LocalApp
from apps.workflowapp import WorkflowApp
5 changes: 3 additions & 2 deletions apps/jsonapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

from apps.workflowapp import WorkflowApp
from basic_modules.metadata import Metadata
from utils import logger


class JSONApp(WorkflowApp): # pylint: disable=too-few-public-methods
Expand Down Expand Up @@ -77,7 +78,7 @@ def launch(self, tool_class, # pylint: disable=too-many-locals,arguments-differ
>>> # writes /path/to/results.json
"""

print "0) Unpack information from JSON"
logger.info("0) Unpack information from JSON")
input_ids, arguments, output_files = self._read_config(
config_path)

Expand Down Expand Up @@ -105,7 +106,7 @@ def launch(self, tool_class, # pylint: disable=too-many-locals,arguments-differ
tool_class, input_files, input_metadata,
output_files, arguments)

print "4) Pack information to JSON"
logger.info("4) Pack information to JSON")
return self._write_results(
input_files, input_metadata,
output_files, output_metadata,
Expand Down
7 changes: 4 additions & 3 deletions basic_modules/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

from __future__ import print_function
from basic_modules.metadata import Metadata # pylint: disable=unused-import
from utils import logger


# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -98,10 +99,10 @@ def launch(self, tool_class, # pylint: disable=too-many-arguments
>>> app.launch(Tool, {"input": <input_file>}, {})
"""

print("1) Instantiate and configure Tool")
logger.info("1) Instantiate and configure Tool")
tool_instance = self._instantiate_tool(tool_class, configuration)

print("2) Run Tool")
logger.info("2) Run Tool")
input_files, input_metadata = self._pre_run(tool_instance,
input_files,
input_metadata)
Expand All @@ -114,7 +115,7 @@ def launch(self, tool_class, # pylint: disable=too-many-arguments
output_files,
output_metadata)

print("Output_files: ", output_files)
logger.info("Output_files: ", output_files)
return output_files, output_metadata

def _instantiate_tool(self, tool_class, configuration): # pylint: disable=no-self-use
Expand Down

0 comments on commit 313d12b

Please sign in to comment.