Conversation
There was a problem hiding this comment.
In my opinion, pipeline_dir_path is more appropriate then pipeline_file_path.
There was a problem hiding this comment.
def allowed_file(filename):
return '.' in filename and
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
is working good, but
def allowed_file(filename: Path):
try:
return filename.suffix.lower() in ALLOWED_EXTENSIONS
except:
return False
It will be more clear I think
There was a problem hiding this comment.
In this function:
if not os.path.exists(pipeline_dir):
os.makedirs(pipeline_dir)
but if pipeline_dir is Path:
pipeline_dir.mkdir(exists_ok=True, parents=True)
is more clear I think
There was a problem hiding this comment.
Set is unmutable type, but for clear(not confusing)
ALLOWED_EXTENSIONS = ('zip') is more proper class I think(tuple)
There was a problem hiding this comment.
Maybe, pipeline description can be nullable=True.
add pipelines uploads