This repository has been archived by the owner on Jul 24, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from galaxyproject/update_to_galaxy_1809
Update to Galaxy 18.09.
- Loading branch information
Showing
40 changed files
with
520 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"""The module describes the ``cpuinfo`` job metrics plugin.""" | ||
import logging | ||
|
||
from . import InstrumentPlugin | ||
from .. import formatting | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
class HostnameFormatter(formatting.JobMetricFormatter): | ||
|
||
def format(self, key, value): | ||
return key, value | ||
|
||
|
||
class HostnamePlugin(InstrumentPlugin): | ||
""" Gather hostname | ||
""" | ||
plugin_type = "hostname" | ||
formatter = HostnameFormatter() | ||
|
||
def __init__(self, **kwargs): | ||
pass | ||
|
||
def pre_execute_instrument(self, job_directory): | ||
return "hostname -f > '%s'" % self.__instrument_hostname_path(job_directory) | ||
|
||
def job_properties(self, job_id, job_directory): | ||
with open(self.__instrument_hostname_path(job_directory)) as f: | ||
return {'hostname': f.read().strip()} | ||
|
||
def __instrument_hostname_path(self, job_directory): | ||
return self._instrument_file_path(job_directory, "hostname") | ||
|
||
|
||
__all__ = ('HostnamePlugin', ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
|
||
# These determine stdio-based error levels from matching on regular expressions | ||
# and exit codes. They are meant to be used comparatively, such as showing | ||
# that warning < fatal. This is really meant to just be an enum. | ||
class StdioErrorLevel(object): | ||
NO_ERROR = 0 | ||
LOG = 1 | ||
WARNING = 2 | ||
FATAL = 3 | ||
FATAL_OOM = 4 | ||
MAX = 4 | ||
descs = { | ||
NO_ERROR: 'No error', | ||
LOG: 'Log', | ||
WARNING: 'Warning', | ||
FATAL: 'Fatal error', | ||
FATAL_OOM: 'Out of memory error', | ||
} | ||
|
||
@staticmethod | ||
def desc(error_level): | ||
err_msg = "Unknown error" | ||
if error_level > 0 and error_level <= StdioErrorLevel.MAX: | ||
err_msg = StdioErrorLevel.descs[error_level] | ||
return err_msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.