-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve handling of file names and paths #144
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
Looks good to me, just one backwards compatibility consideration and some unittest nitpicks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except 1 linter error
the pylint and markdownlint errors are unrelated
Add new attribute 'dockerfile' to the DockerfileParser class which exposes the path to the dockerfile as a PathLib object Add new property 'dockerfile_path' to the DockerfileParser class which exposes the 'dockerfile' attribute as a string for backwards compatibility Signed-off-by: Ethan Paul <ethan.paul@portalinstruments.com>
Signed-off-by: Ethan Paul <ethan.paul@portalinstruments.com>
Signed-off-by: Ethan Paul <ethan.paul@portalinstruments.com>
Signed-off-by: Ethan Paul <ethan.paul@portalinstruments.com>
Thank you so much for making this project! Each commit in this PR is self contained and could be reviewed separately, let me know if there's anything I can do to make the review process easier.
Summary of changes:
DockerfileParser
class to usepathlib.Path
objects for file read/write operationsDockerfileParser.dockerfile
attribute to expose the path to the Dockerfile as apathlib.Path
object while maintaining backwards compatibility with the existingDockerfileParser.dockerfile_path
property as a stringdockerfile_filename
keyword toDockerfileParser.__init__()
to allow users to provide an alternative name for their dockerfile (ex:Dockerfile.dev
,Dockerfile.sample
,Containerfile
, etc) while maintaining backwards compatibility with the existing default ofDockerfile
Maintainers will complete the following section