Skip to content

Commit

Permalink
pycodestyle changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Acribbs committed Oct 29, 2024
1 parent 23f22a0 commit 9a6cab1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion cgatcore/pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ def loadData(infile, outfile):
# cgatcore/pipeline/__init__.py



# Import existing pipeline functionality
from cgatcore.pipeline.control import *
from cgatcore.pipeline.database import *
Expand Down
2 changes: 1 addition & 1 deletion cgatcore/remote/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ def upload(self):

@abstractmethod
def delete_file(self):
pass
pass
6 changes: 5 additions & 1 deletion cgatcore/remote/file_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from functools import wraps
from .aws import S3RemoteObject


def s3_path_to_local(s3_path, temp_dir='/tmp'):
# Function remains the same
parts = s3_path[5:].split('/', 1)
Expand All @@ -13,6 +14,7 @@ def s3_path_to_local(s3_path, temp_dir='/tmp'):
bucket, key = parts
return os.path.join(temp_dir, key)


class S3Pipeline:
def __init__(self, name=None, temp_dir='/tmp'):
self.name = name
Expand Down Expand Up @@ -167,6 +169,7 @@ def run(self):
for task in self.tasks:
task()


def suffix(suffix_string):
"""
Generates a filter function that appends a suffix to a given file path.
Expand All @@ -182,6 +185,7 @@ def filter_func(input_path):
return f"{base}{suffix_string}{ext}"
return filter_func


class S3Mapper:
"""
A mapper class for handling S3 operations.
Expand All @@ -193,5 +197,5 @@ def __init__(self):
"""
self.s3 = S3RemoteObject()

# Make sure to export all the functions and classes you want to be accessible

__all__ = ['S3Pipeline', 'S3Mapper', 's3_path_to_local', 'suffix']
1 change: 1 addition & 0 deletions tests/mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os


class MockS3RemoteObject:
def __init__(self, *args, **kwargs):
self.storage = {}
Expand Down

0 comments on commit 9a6cab1

Please sign in to comment.