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

Create ellipsis Dockerfile #13

Open
MarkEdmondson1234 opened this issue Mar 9, 2024 · 1 comment
Open

Create ellipsis Dockerfile #13

MarkEdmondson1234 opened this issue Mar 9, 2024 · 1 comment

Comments

@MarkEdmondson1234
Copy link
Contributor

Hi @ellipsis-dev - can you create the Dockerfile you need to test your code? And an ellipsis.yaml file - an example below:

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"

This repo carries a python package in sunholo/ - you can see the dependencies etc in /.setup.py

instructions below for the dockerfile:

⚠️ A Dockerfile is not required to use Ellipsis, but will increase the quality of code generation tasks. Dockerfiles are unused for code reviews.

Improving the quality of Ellipsis' code generation takes 5 minutes:

    Add a Dockerfile to your repository:
        The file should install the dependencies and copy your code into the container. We build this from the root of the repository.
        The Dockerfile needs to include the [Git CLI](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
        Do not include an ENTRYPOINT or CMD.
        Update your ellipsis.yaml to point to this file by adding file which is under build (see below)

    Add commands to your config file:
        Commands are executed from the root of the repository and can lint, build, and even run your tests.
        See the below example.

    Upload dev environment variables:
        Open the [console](https://app.ellipsis.dev/) and select your repository from the drop down.
        Note: Only required if your project needs environment variables to run the commands.

Here's what (part of) your ellipsis.yaml might look like after these changes:

version: 1.3
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
@MarkEdmondson1234 MarkEdmondson1234 added the ellipsis:create Assigns Ellipsis to create a Pull Request for this issue. label Mar 9, 2024
ellipsis-dev bot added a commit that referenced this issue Mar 9, 2024
@ellipsis-dev ellipsis-dev bot removed the ellipsis:create Assigns Ellipsis to create a Pull Request for this issue. label Mar 9, 2024
@MarkEdmondson1234
Copy link
Contributor Author

Its not being used yet

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

No branches or pull requests

1 participant