Skip to content

✨ Feature/implement poetry #351

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

Merged
merged 21 commits into from
Jul 6, 2022
Merged

Conversation

rahulpatidar0191
Copy link
Member

@rahulpatidar0191 rahulpatidar0191 commented Jun 10, 2022

Changed pyproject.toml to use poetry

Closes: #346
Closes : #347

There's an issue with Docstring which I have created an issue for here
Not sure why github actions still passed

I was also hoping to find a way where I can pass the Docker Image version here using the github action by build-args like you do here but haven't been able to figure it out. So it needs to be manually updated in the Dockerfile of webapps before a tag is released

@rahulpatidar0191 rahulpatidar0191 self-assigned this Jun 10, 2022
@rahulpatidar0191 rahulpatidar0191 added the enhancement New feature or request label Jun 10, 2022
@rahulpatidar0191 rahulpatidar0191 marked this pull request as draft June 10, 2022 16:40
@rahulpatidar0191 rahulpatidar0191 marked this pull request as ready for review June 13, 2022 18:12
Copy link
Collaborator

@hillairet hillairet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahulpatidar0191 I made changes to the code directly because it was faster than putting them in a Request for changes here.
Please have a look and more importantly test the changes since I didn't.
Exciting change to this repo!

tests/Dockerfile Outdated
RUN poetry export -f requirements.txt --output /python/app/requirements.txt $DEVFLAG --without-hashes

# 2. Build the image we want using the requirements file from the first stage
FROM $IMAGE_VERSION

# Copy the files for the server
COPY --from=requirements-stage /tmp/requirements.txt /app/requirements.txt
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the directory here to match the above

tests/Dockerfile Outdated
RUN poetry export -f requirements.txt --output /python/app/requirements.txt $DEVFLAG --without-hashes

# 2. Build the image we want using the requirements file from the first stage
FROM $IMAGE_VERSION

# Copy the files for the server
COPY --from=requirements-stage /tmp/requirements.txt /app/requirements.txt

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added install requirements

Copy link
Collaborator

@hillairet hillairet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually let's not use our python base for the requirements-stage but instead the python base image, then output in /tmp/requirements.txt cause our base docker image is not needed.

@rahulpatidar0191
Copy link
Member Author

Actually let's not use our python base for the requirements-stage but instead the python base image, then output in /tmp/requirements.txt cause our base docker image is not needed.

@hillairet I am not sure I follow, you want to move requirements stage from /root/test/Dockerfile -> /root/Dockerfile?

@rahulpatidar0191
Copy link
Member Author

@hillairet Did you mean to approve this?

Copy link
Collaborator

@hillairet hillairet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right I approved the wrong PR it seems! 😅

@rahulpatidar0191
Copy link
Member Author

Haha yeah. Please clarify your previous comment as well

Copy link
Collaborator

@hillairet hillairet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I implemented what I meant to say. Not tested though.

@rahulpatidar0191
Copy link
Member Author

Thanks, I tested it out and it works 🎉

@rahulpatidar0191 rahulpatidar0191 merged commit 2441091 into main Jul 6, 2022
@rahulpatidar0191 rahulpatidar0191 deleted the feature/implement-poetry branch July 6, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use poetry to manage dependencies Remove all requirements from base image
2 participants