Create a new file in the root directory of the repository named ellipsis.Dockerfile. This file will be used to set up the Docker environment for the Ellipsis tool. The Dockerfile should include the following:
The base image. Use FROM python:3.10 to use the Python 3.10 image.
The working directory. Use WORKDIR /app to set the working directory to /app.
The installation of Git. Use RUN apt-get update && apt-get install -y git to install Git.
The copying of the code into the container. Use COPY . /app to copy the code into the working directory.
The installation of the Python package dependencies. Use RUN pip install -r requirements.txt to install the dependencies. Note that you will need to create a requirements.txt file that lists all the dependencies from the setup.py file.
Here is an example of what the Dockerfile might look like:
FROM python:3.10
WORKDIR /app
RUN apt-get update && apt-get install -y git
COPY . /app
RUN pip install -r requirements.txt
Remember, do not include an ENTRYPOINT or CMD in the Dockerfile.
Create ellipsis.yaml file
Create a new file in the root directory of the repository named ellipsis.yaml. This file will be used to configure the Ellipsis tool. The ellipsis.yaml file should include the following:
The version. Use version: 1.3 to set the version.
The about section. Use the provided text for the about section.
The build section. This section should point to the Dockerfile and include the build commands as specified in the feature request.
The PR review section. This section should include the confidence threshold and the PR review rules as specified in the feature request.
Here is an example of what the ellipsis.yaml file might look like:
version: 1.3
about:
- "This is a codebase for a code generation tool called Ellipsis. It can review GitHub pull requests, answer questions about code, and even generate bug fixes!"
- "We're migrating away from using AWS CDK. Our infrastructure is no longer part of this repository."
build:
file: "ellipsis.Dockerfile"
commands:
- name: "lint_fix"
description: "Lints the code in fix mode, which will fix some errors, format some files, and throw and error when there are violations."
command: "./scripts/lint.sh"
- name: "unit_tests"
description: "Runs the unit tests."
command: ./scripts/unit_test.sh
pr_review:
confidence_threshold: 0.7
rules:
- "Code should be DRY (Dont Repeat Yourself)"
- "There should no secrets or credentials in the code"
- "Extremely Complicated Code Needs Comments"
- "Use Descriptive Variable and Constant Names"
- "API routes must have error handling, they shouldn't intentionally return a HTTP 500"
- "Use retries when calling external API services"
- "Don't log sensitive data"
- "Follow the Single Responsibility Principle"
- "Function and Method Naming Should Follow Consistent Patterns"
Report:
Step
Result
Details
1
✅
Create DockerfileCreated the ellipsis.Dockerfile with the specified details.
2
✅
Create ellipsis.yaml fileCreated the ellipsis.yaml file with the specified details.
Something look wrong?: If this Pull Request doesn't contain the expected changes, add more information to #13. Then, add the ellipsis:create label to try again. For more information, check the documentation.
Summary:
Issue: https://github.com/sunholo-data/sunholo-py/issues/13
Implementation:
ellipsis.Dockerfile
. This file will be used to set up the Docker environment for the Ellipsis tool. The Dockerfile should include the following:FROM python:3.10
to use the Python 3.10 image.WORKDIR /app
to set the working directory to/app
.RUN apt-get update && apt-get install -y git
to install Git.COPY . /app
to copy the code into the working directory.RUN pip install -r requirements.txt
to install the dependencies. Note that you will need to create arequirements.txt
file that lists all the dependencies from thesetup.py
file.Here is an example of what the Dockerfile might look like:
Remember, do not include an ENTRYPOINT or CMD in the Dockerfile.
ellipsis.yaml
. This file will be used to configure the Ellipsis tool. The ellipsis.yaml file should include the following:version: 1.3
to set the version.Here is an example of what the ellipsis.yaml file might look like:
Create Dockerfile
Created the ellipsis.Dockerfile with the specified details.Create ellipsis.yaml file
Created the ellipsis.yaml file with the specified details.Something look wrong?: If this Pull Request doesn't contain the expected changes, add more information to #13. Then, add the
ellipsis:create
label to try again. For more information, check the documentation.