6 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/59cd12ceafc4/
Changeset: 59cd12ceafc4
User: dannon
Date: 2015-02-24 16:38:18+00:00
Summary: Cleanup of comments, doc of customtypes.
Affected #: 1 file
diff -r 476c79d7b00a5edde57847ca1882d7e7781030b6 -r
59cd12ceafc4628e05600be46939124d4ca59c08 lib/galaxy/model/custom_types.py
--- a/lib/galaxy/model/custom_types.py
+++ b/lib/galaxy/model/custom_types.py
@@ -33,15 +33,6 @@
return value
-# Mutable JSONType for SQLAlchemy from original gist:
-#
https://gist.github.com/dbarnett/1730610
-#
-# Also using minor changes from this fork of the gist:
-#
https://gist.github.com/miracle2k/52a031cced285ba9b8cd
-#
-# And other minor changes to make it work for us.
-
-
class JSONType(sqlalchemy.types.TypeDecorator):
"""Represents an immutable structure as a json-encoded string.
@@ -69,6 +60,15 @@
class MutationObj(Mutable):
+ """
+ Mutable JSONType for SQLAlchemy from original gist:
+
https://gist.github.com/dbarnett/1730610
+
+ Using minor changes from this fork of the gist:
+
https://gist.github.com/miracle2k/52a031cced285ba9b8cd
+
+ And other minor changes to make it work for us.
+ """
@classmethod
def coerce(cls, key, value):
if isinstance(value, dict) and not isinstance(value, MutationDict):
@@ -192,13 +192,6 @@
MutationObj.associate_with(JSONType)
-"""A type to encode/decode JSON on the fly
-
-sqltype is the string type for the underlying DB column::
-
- Column(JSON)
-"""
-
metadata_pickler = AliasPickleModule( {
( "cookbook.patterns", "Bunch" ): (
"galaxy.util.bunch", "Bunch" )
} )
https://bitbucket.org/galaxy/galaxy-central/commits/834b3e714755/
Changeset: 834b3e714755
User: dan
Date: 2015-02-24 16:50:58+00:00
Summary: Fix for installing .loc files from the toolshed to respect
shed_tool_data_path. Mention shed_tool_data_path in galaxy.ini.sample.
Affected #: 2 files
diff -r 59cd12ceafc4628e05600be46939124d4ca59c08 -r
834b3e71475518902f071d4066d69e707f752730 config/galaxy.ini.sample
--- a/config/galaxy.ini.sample
+++ b/config/galaxy.ini.sample
@@ -217,6 +217,10 @@
#
https://wiki.galaxyproject.org/Admin/DataIntegration
#tool_data_path = tool-data
+# Directory where Tool Data Table related files will be placed
+# when installed from a ToolShed. Defaults to tool_data_path
+#shed_tool_data_path = tool-data
+
# File containing old-style genome builds
#builds_file_path = tool-data/shared/ucsc/builds.txt
diff -r 59cd12ceafc4628e05600be46939124d4ca59c08 -r
834b3e71475518902f071d4066d69e707f752730 lib/tool_shed/tools/data_table_manager.py
--- a/lib/tool_shed/tools/data_table_manager.py
+++ b/lib/tool_shed/tools/data_table_manager.py
@@ -103,7 +103,7 @@
try:
new_table_elems, message = self.app.tool_data_tables \
.add_new_entries_from_config_file( config_filename=filename,
-
tool_data_path=self.app.config.tool_data_path,
+
tool_data_path=self.app.config.shed_tool_data_path,
shed_tool_data_table_config=self.app.config.shed_tool_data_table_config,
persist=persist )
if message:
https://bitbucket.org/galaxy/galaxy-central/commits/b154ff11d2ea/
Changeset: b154ff11d2ea
User: jmchilton
Date: 2015-02-24 17:01:35+00:00
Summary: Fix unit tests for dde2fc9572be6d909e22dda510520639db5260bf.
Thanks to @ dannon for the bug report.
Affected #: 1 file
diff -r 834b3e71475518902f071d4066d69e707f752730 -r
b154ff11d2ea00d6978da97ee60bb1013f4f7f4e test/unit/jobs/test_job_configuration.py
--- a/test/unit/jobs/test_job_configuration.py
+++ b/test/unit/jobs/test_job_configuration.py
@@ -21,6 +21,7 @@
job_config_file=os.path.join( self.temp_directory, "job_conf.xml"
),
use_tasked_jobs=False,
job_resource_params_file="/tmp/fake_absent_path",
+ config_dict={},
)
self.__write_config_from( SIMPLE_JOB_CONF )
self.app = bunch.Bunch( config=self.config, job_metrics=MockJobMetrics() )
https://bitbucket.org/galaxy/galaxy-central/commits/64b4a5b00522/
Changeset: 64b4a5b00522
User: dannon
Date: 2015-02-24 18:47:29+00:00
Summary: Fix for JSONType getstate/setstate with pickle (exhibited error during
uploading of a file).
Affected #: 1 file
diff -r b154ff11d2ea00d6978da97ee60bb1013f4f7f4e -r
64b4a5b005224c5639482de4eda52adcfa25df10 lib/galaxy/model/custom_types.py
--- a/lib/galaxy/model/custom_types.py
+++ b/lib/galaxy/model/custom_types.py
@@ -143,6 +143,12 @@
dict.__delitem__(self, key)
self.changed()
+ def __getstate__(self):
+ return dict(self)
+
+ def __setstate__(self, state):
+ self.update(state)
+
class MutationList(MutationObj, list):
@classmethod
https://bitbucket.org/galaxy/galaxy-central/commits/9f3d45b2e032/
Changeset: 9f3d45b2e032
User: dannon
Date: 2015-02-24 18:56:19+00:00
Summary: Add getstate/setstate for pickling to the MutationList as well, though
I'm not sure we use this anywhere. Future-proofing.
Affected #: 1 file
diff -r 64b4a5b005224c5639482de4eda52adcfa25df10 -r
9f3d45b2e032b7d208c1e7e021ab3460795272fe lib/galaxy/model/custom_types.py
--- a/lib/galaxy/model/custom_types.py
+++ b/lib/galaxy/model/custom_types.py
@@ -195,6 +195,12 @@
list.remove(self, value)
self.changed()
+ def __getstate__(self):
+ return list(self)
+
+ def __setstate__(self, state):
+ self.update(state)
+
MutationObj.associate_with(JSONType)
https://bitbucket.org/galaxy/galaxy-central/commits/a12fc23ff137/
Changeset: a12fc23ff137
User: dannon
Date: 2015-02-24 19:18:24+00:00
Summary: Commentary in custom_types w/ a TODO. Remove irrelevant comments about
OrderedDict, since we're not relying on that.
Affected #: 1 file
diff -r 9f3d45b2e032b7d208c1e7e021ab3460795272fe -r
a12fc23ff13785d2c2ef7d223dca100ef334ea87 lib/galaxy/model/custom_types.py
--- a/lib/galaxy/model/custom_types.py
+++ b/lib/galaxy/model/custom_types.py
@@ -34,12 +34,16 @@
class JSONType(sqlalchemy.types.TypeDecorator):
- """Represents an immutable structure as a json-encoded string.
+ """
+ Represents an immutable structure as a json-encoded string.
If default is, for example, a dict, then a NULL value in the
database will be exposed as an empty dict.
"""
+ # TODO: Figure out why this is a large binary, and provide a migratino to
+ # something like sqlalchemy.String, or even better, when applicable, native
+ # sqlalchemy.dialects.postgresql.JSON
impl = LargeBinary
def process_bind_param(self, value, dialect):
@@ -131,9 +135,6 @@
return self
def __setitem__(self, key, value):
- # Due to the way OrderedDict works, this is called during __init__.
- # At this time we don't have a key set, but what is more, the value
- # being set has already been coerced. So special case this and skip.
if hasattr(self, '_key'):
value = MutationObj.coerce(self._key, value)
dict.__setitem__(self, key, value)
Repository URL:
https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.