mirror of
https://github.com/aljazceru/gpt-engineer.git
synced 2026-02-23 05:55:59 +01:00
Refactoring and suggestions (#334)
This commit is contained in:
4
.github/CODE_OF_CONDUCT.md
vendored
4
.github/CODE_OF_CONDUCT.md
vendored
@@ -60,7 +60,7 @@ representative at an online or offline event.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
anton.osika@gmail.com.
|
||||
<anton.osika@gmail.com>.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of reporters of incidents.
|
||||
@@ -128,4 +128,4 @@ For answers to common questions about this code of conduct, see the FAQ at
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
|
||||
10
.github/CONTRIBUTING.md
vendored
10
.github/CONTRIBUTING.md
vendored
@@ -15,7 +15,6 @@ To get started with contributing, please follow these steps:
|
||||
7. Push to the branch: `git push origin my-branch-name`.
|
||||
8. Submit a pull request to the `main` branch of the original repository.
|
||||
|
||||
|
||||
## Code Style
|
||||
|
||||
Please make sure to follow the established code style guidelines for this project. Consistent code style helps maintain readability and makes it easier for others to contribute to the project.
|
||||
@@ -37,13 +36,13 @@ pre-commit installed at .git/hooks/pre-commit
|
||||
|
||||
Or you could just run `make dev-install` to install the dependencies and the hooks!
|
||||
|
||||
|
||||
If you are not familiar with the concept of [git hooks](https://git-scm.com/docs/githooks) and/or [`pre-commit`](https://pre-commit.com/) please read the documentation to understand how they work.
|
||||
|
||||
As an introduction of the actual workflow, here is an example of the process you will encounter when you make a commit:
|
||||
|
||||
Let's add a file we have modified with some errors, see how the pre-commit hooks run `black` and fails.
|
||||
`black` is set to automatically fix the issues it finds:
|
||||
|
||||
```bash
|
||||
$ git add chat_to_files.py
|
||||
$ git commit -m "commit message"
|
||||
@@ -58,6 +57,7 @@ All done! ✨ 🍰 ✨
|
||||
```
|
||||
|
||||
You can see that `chat_to_files.py` is both staged and not staged for commit. This is because `black` has formatted it and now it is different from the version you have in your working directory. To fix this you can simply run `git add chat_to_files.py` again and now you can commit your changes.
|
||||
|
||||
```bash
|
||||
$ git status
|
||||
On branch pre-commit-setup
|
||||
@@ -71,8 +71,8 @@ Changes not staged for commit:
|
||||
modified: chat_to_files.py
|
||||
```
|
||||
|
||||
|
||||
Now let's add the file again to include the latest commits and see how `ruff` fails.
|
||||
|
||||
```bash
|
||||
$ git add chat_to_files.py
|
||||
$ git commit -m "commit message"
|
||||
@@ -86,6 +86,7 @@ Found 2 errors (2 fixed, 0 remaining).
|
||||
```
|
||||
|
||||
Same as before, you can see that `chat_to_files.py` is both staged and not staged for commit. This is because `ruff` has formatted it and now it is different from the version you have in your working directory. To fix this you can simply run `git add chat_to_files.py` again and now you can commit your changes.
|
||||
|
||||
```bash
|
||||
$ git add chat_to_files.py
|
||||
$ git commit -m "commit message"
|
||||
@@ -100,13 +101,10 @@ Now your file has been committed and you can push your changes.
|
||||
|
||||
At the beginning this might seem like a tedious process (having to add the file again after `black` and `ruff` have modified it) but it is actually very useful. It allows you to see what changes `black` and `ruff` have made to your files and make sure that they are correct before you commit them.
|
||||
|
||||
|
||||
|
||||
## Issue Tracker
|
||||
|
||||
If you encounter any bugs, issues, or have feature requests, please [create a new issue](https://github.com/AntonOsika/gpt-engineer/issues/new) on the project's GitHub repository. Provide a clear and descriptive title along with relevant details to help us address the problem or understand your request.
|
||||
|
||||
|
||||
## Licensing
|
||||
|
||||
By contributing to GPT Engineer, you agree that your contributions will be licensed under the [LICENSE](../LICENSE) file of the project.
|
||||
|
||||
3
.github/ISSUE_TEMPLATE/issue-template.md
vendored
3
.github/ISSUE_TEMPLATE/issue-template.md
vendored
@@ -4,12 +4,11 @@ about: All templates should use this format unless there is a reason not to
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**YOU MAY DELETE THE ENTIRE TEMPLATE BELOW.**
|
||||
|
||||
# Issue Template
|
||||
## Issue Template
|
||||
|
||||
## Expected Behavior
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
## How Has This Been Tested?
|
||||
|
||||
Please describe if you have either:
|
||||
|
||||
- Generated the "example" project
|
||||
- Ran the entire benchmark suite
|
||||
- Something else
|
||||
|
||||
16
.github/workflows/ci.yaml
vendored
16
.github/workflows/ci.yaml
vendored
@@ -1,25 +1,23 @@
|
||||
name: Pytest Execution
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
branches: [main]
|
||||
paths:
|
||||
- "**.py"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
branches: [main]
|
||||
paths:
|
||||
- "**.py"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.10"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
python-version: "3.10"
|
||||
cache: pip
|
||||
|
||||
- name: Install package
|
||||
|
||||
14
.github/workflows/pre-commit.yaml
vendored
14
.github/workflows/pre-commit.yaml
vendored
@@ -8,7 +8,15 @@ on:
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: pre-commit/action@v3.0.0
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
|
||||
- uses: pre-commit/action@v3.0.0
|
||||
with:
|
||||
extra_args: --all-files
|
||||
|
||||
Reference in New Issue
Block a user