Skip to content
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

Feature/iterate on docker #186

Merged
merged 3 commits into from
Mar 17, 2024
Merged

Feature/iterate on docker #186

merged 3 commits into from
Mar 17, 2024

Conversation

emrgnt-cmplxty
Copy link
Contributor

@emrgnt-cmplxty emrgnt-cmplxty commented Mar 17, 2024

Ellipsis 🚀 This PR description was created by Ellipsis for commit 054b7ed.

Summary:

This PR enhances Docker workflows, modifies the Dockerfile for better dependency management, adjusts the API base URL in the client example, and adds a file size check for uploads in the main application.

Key points:

  • Added .github/workflows/build-main.yml for automated Docker image builds and pushes.
  • Renamed publish-to-docker.yml to build-release.yml.
  • Modified Dockerfile to use non-slim Python 3.9 and simplified Poetry dependency installation.
  • Changed API base URL in r2r/examples/basic/run_client.py and commented out most of the code.
  • Added file size check in r2r/main/app.py to prevent large file uploads.

Generated with ❤️ by ellipsis.dev

Copy link

vercel bot commented Mar 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
r2r-docs ✅ Ready (Inspect) Visit Preview Mar 17, 2024 3:06am

@emrgnt-cmplxty emrgnt-cmplxty merged commit e07c8f2 into main Mar 17, 2024
2 checks passed
@emrgnt-cmplxty emrgnt-cmplxty deleted the feature/iterate-on-docker branch March 17, 2024 03:07
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me!

  • Reviewed the entire pull request up to 054b7ed
  • Looked at 378 lines of code in 5 files
  • Took 1 minute and 22 seconds to review
More info
  • Skipped 1 files when reviewing.
  • Skipped posting 6 additional comments because they didn't meet confidence threshold of 50%.
1. Dockerfile:2:
  • Assessed confidence : 50%
  • Comment:
    Consider using a slimmer base image to reduce the Docker image size. If the slim version was providing all necessary dependencies, it might be better to stick with it.
FROM python:3.9-slim
  • Reasoning:
    The Dockerfile has been modified to use a non-slim version of the python:3.9 image. This could potentially increase the size of the Docker image. If the slim version was providing all necessary dependencies, it might be better to stick with it to keep the image size down.
2. Dockerfile:13:
  • Assessed confidence : 50%
  • Comment:
    The virtual environment creation by Poetry has been disabled. If the application relies on the isolation provided by the virtual environment, this could potentially cause issues. Please ensure that this change doesn't affect the application's functionality.
RUN poetry config virtualenvs.create false && poetry install -E parsing -E eval --no-interaction --no-ansi -vvv
  • Reasoning:
    The Dockerfile has been modified to remove the virtualenv creation by Poetry. This could potentially cause issues if the application relies on isolation provided by the virtual environment. It's important to ensure that this change doesn't affect the application's functionality.
3. r2r/examples/basic/run_client.py:14:
  • Assessed confidence : 50%
  • Comment:
    The code in this file has been commented out. If this file is being used in the application, this could potentially cause issues. Please ensure that this change doesn't affect the application's functionality.
  • Reasoning:
    The code in the run_client.py file has been commented out. This could potentially cause issues if this file is being used in the application. It's important to ensure that this change doesn't affect the application's functionality.
4. r2r/examples/basic/run_client.py:138:
  • Assessed confidence : 50%
  • Comment:
    The code in this file has been commented out. If this file is being used in the application, this could potentially cause issues. Please ensure that this change doesn't affect the application's functionality.
  • Reasoning:
    The code in the run_client.py file has been commented out. This could potentially cause issues if this file is being used in the application. It's important to ensure that this change doesn't affect the application's functionality.
5. r2r/examples/basic/run_client.py:8:
  • Assessed confidence : 50%
  • Comment:
    The base_url has been changed. If the application relies on the previous base_url, this could potentially cause issues. Please ensure that this change doesn't affect the application's functionality.
base_url = "http://localhost:8000"
  • Reasoning:
    The base_url in the run_client.py file has been changed from 'http://localhost:8000' to 'http://localhost:8010'. This could potentially cause issues if the application relies on the previous base_url. It's important to ensure that this change doesn't affect the application's functionality.
6. r2r/main/app.py:80:
  • Assessed confidence : 50%
  • Comment:
    The maximum file size is hardcoded to 5MB. Consider making this a configurable parameter to provide more flexibility.
if file is not None and file.size > config.app("max_file_size_in_mb", config.MAX_FILE_SIZE) * MB_CONVERSION_FACTOR:
  • Reasoning:
    The code in the app.py file has been modified to add a file size check before processing the file. This is a good practice to prevent the server from being overwhelmed by large files. However, the maximum file size is hardcoded to 5MB. It would be better to make this a configurable parameter.

Workflow ID: wflow_xiNffTdeRZtjjS4K


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant