-
Notifications
You must be signed in to change notification settings - Fork 53
Improve handling of file names and paths #144
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
base: master
Are you sure you want to change the base?
Conversation
chmeliik
left a comment
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
chmeliik
left a comment
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 <[email protected]>
Signed-off-by: Ethan Paul <[email protected]>
Signed-off-by: Ethan Paul <[email protected]>
Signed-off-by: Ethan Paul <[email protected]>
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:
DockerfileParserclass to usepathlib.Pathobjects for file read/write operationsDockerfileParser.dockerfileattribute to expose the path to the Dockerfile as apathlib.Pathobject while maintaining backwards compatibility with the existingDockerfileParser.dockerfile_pathproperty as a stringdockerfile_filenamekeyword 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 ofDockerfileMaintainers will complete the following section