Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion planemo/bioconda_scripts/bioconductor_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def bioaRchive_url(self):
@property
def bioconductor_tarball_url(self):
"""Return the url to the tarball from the bioconductor site."""
r = re.compile('{0}.*\.tar.gz'.format(self.package))
r = re.compile(r'{0}.*\.tar.gz'.format(self.package))

def f(href):
return href and r.search(href)
Expand Down
2 changes: 1 addition & 1 deletion planemo/galaxy/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'if [ ! -e "$GALAXY_VIRTUAL_ENV" ]; then $create_virtualenv; fi',
)
PRINT_VENV_COMMAND = shell_join(
'echo "Set \$GALAXY_VIRTUAL_ENV to $GALAXY_VIRTUAL_ENV"',
r'echo "Set \$GALAXY_VIRTUAL_ENV to $GALAXY_VIRTUAL_ENV"',
('if [ -e "$GALAXY_VIRTUAL_ENV" ]; ',
'then echo "Virtual environment directory exists."; ',
'else echo "Virtual environment directory does not exist."; fi'),
Expand Down
2 changes: 1 addition & 1 deletion planemo/rscript_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self, script):
def _prune_library(self, line):
"""Prune line to get the names in library."""
import re
split_words = re.compile('\w+').findall(line)
split_words = re.compile(r'\w+').findall(line)
lib = [w for w in split_words if w != "library"]
return lib[0]

Expand Down
4 changes: 2 additions & 2 deletions planemo/shed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
REPO_TYPE_SUITE = "repository_suite_definition"

# TODO: sync this with tool shed impl someday
VALID_REPOSITORYNAME_RE = re.compile("^[a-z0-9\_]+$")
VALID_PUBLICNAME_RE = re.compile("^[a-z0-9\-]+$")
VALID_REPOSITORYNAME_RE = re.compile(r"^[a-z0-9\_]+$")
VALID_PUBLICNAME_RE = re.compile(r"^[a-z0-9\-]+$")

# Generate with python scripts/categories.py
CURRENT_CATEGORIES = [
Expand Down
4 changes: 2 additions & 2 deletions planemo/tool_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,9 @@ def __str__(self):


def param_type(value):
if re.match("^\d+$", value):
if re.match(r"^\d+$", value):
return "int"
elif re.match("^\d+?\.\d+?$", value):
elif re.match(r"^\d+?\.\d+?$", value):
return "float"
else:
return "string"
Expand Down
6 changes: 3 additions & 3 deletions planemo/training/tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def init_from_existing_tutorial(self, tuto_name):
# get the metadata information of the tutorial (from the top of the tutorial.md)
with open(self.tuto_fp, "r") as tuto_f:
tuto_content = tuto_f.read()
regex = '^---\n(?P<metadata>[\s\S]*)\n---(?P<body>[\s\S]*)'
regex = r'^---\n(?P<metadata>[\s\S]*)\n---(?P<body>[\s\S]*)'
tuto_split_regex = re.search(regex, tuto_content)
if not tuto_split_regex:
raise Exception("No metadata found at the top of the tutorial")
Expand Down Expand Up @@ -507,9 +507,9 @@ def get_wf_inputs(step_inp):
inputs = {}
for inp_n, inp in step_inp.items():
if '|' in inp_n:
repeat_regex = '(?P<prefix>[^\|]*)_(?P<nb>\d+)\|(?P<suffix>.+).+'
repeat_regex = r'(?P<prefix>[^\|]*)_(?P<nb>\d+)\|(?P<suffix>.+).+'
repeat_search = re.search(repeat_regex, inp_n)
hier_regex = '(?P<prefix>[^\|]*)\|(?P<suffix>.+)'
hier_regex = r'(?P<prefix>[^\|]*)\|(?P<suffix>.+)'
hier_regex = re.search(hier_regex, inp_n)
if repeat_search and repeat_search.start(0) <= hier_regex.start(0):
inputs.setdefault(repeat_search.group('prefix'), {})
Expand Down