Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #43 from d33bs/main
Browse files Browse the repository at this point in the history
Add returns to tasks to address Nonetype upstream_tasks mapped task issues
  • Loading branch information
d33bs authored Mar 16, 2022
2 parents 96f997e + d6c9ee6 commit 879b80b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# This call to setup() does all the work
setuptools.setup(
name="cupyopt",
version="1.1.0.1",
version="1.1.0.2",
description="CU Python Opinionated Prefect Tasks",
long_description=README,
long_description_content_type="text/x-rst",
Expand Down
5 changes: 5 additions & 0 deletions src/cupyopt/objectstore_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def run(self, client: Minio, bucket_name: str):
self.logger.info(
"Bucket %s already exists, taking no actions.", bucket_name
)
return bucket_name


class ObjstrPut(Task):
Expand Down Expand Up @@ -120,6 +121,8 @@ def run(

self.logger.info("Put data under %s as %s", bucket_name, object_name)

return object_name


class ObjstrGet(Task):
"""get object as data from object store"""
Expand Down Expand Up @@ -249,6 +252,8 @@ def run(
"Put file %s under %s as %s", file_path, bucket_name, object_name
)

return object_name


class ObjstrFGet(Task):
"""get object as file from object store"""
Expand Down
7 changes: 7 additions & 0 deletions src/cupyopt/sftp_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ def run(

self.logger.info("SFTPPut %s", workfile)

return workfile


class SFTPRemove(Task):
"""
Expand Down Expand Up @@ -266,6 +268,8 @@ def run(
# Read the file into a dataframe
self.logger.info("SFTPRemove %s", workfile)

return workfile


class SFTPRename(Task):
"""
Expand Down Expand Up @@ -357,6 +361,8 @@ def run(
finally:
sftp.close()

return target


class SFTPPoll(Task):
"""
Expand Down Expand Up @@ -430,6 +436,7 @@ def run(
files_df = pd.DataFrame(files_data, columns=["File Name", "MTime"])

self.logger.info("Found %s files to process.", len(files_df.index))

return files_df


Expand Down

0 comments on commit 879b80b

Please sign in to comment.