Commit Graph
112 Commits
Author SHA1 Message Date
Nicholas Tindle af572a5caa Allow changes to Spec (#272)
* feat: initial implementation of post endpoints, non working due to circular dependency

* fix: linting

* fix: recursive import

* feat: refactor to support module additions

* feat: fix up add route endpoint, move models to api layer

* feat: add deletes
2024-05-24 07:34:46 -05:00
Nicholas Tindle da8cb9023e Add some fallback handling for issues (#271) 2024-05-10 10:28:13 -05:00
Aarushi bcd70a037d Adding a flag to disable hosted deploys (#270) 2024-05-10 17:26:49 +02:00
Zamil Majdyandmajdyz 803b015f98 [AGPT-714] Implement inter-page linking on front-end page decomposition by prompting (#263)
## **User description**
Changes:
* Hint the UI page generation with its connection to another pages.
* Add validation on the page connection prompting
* Cleaner auto import on missing function and missing object (remove wildcard, import only the missing part). on missing object we try to find the related function and import the file that hosts that function (only support the object type referred by the ApiRouteSpec, it can still be improved).

Out of scope:
* Validation of ui.link and page connection (if LLM hallucinate the page on `ui.link`, we are not failing this yet!)


___

## **Type**
Enhancement, Bug fix


___

## **Description**
- Enhanced code validation to include checks for `ui.link` usage and ensure it references valid functions.
- Improved import handling in `__fix_missing_imports` by adding async fetching of functions related to object types and better error message integration.
- Added a new database function `get_object_type_referred_functions` to fetch functions related to an object type.
- Updated `PageDecompositionEntry` to use a dictionary for `used_functions` to include descriptions, and added `PageConnection` model for describing connections between pages.
- Enhanced validation in `PageDecompositionBlock` to include checks for main function naming, existence of a home page, and valid page connections.
- Updated Jinja2 template example to reflect new features in page decomposition, including detailed function usage and page connections.



___



## **Changes walkthrough**
<table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement
</strong></td><td><table>
<tr>
  <td>
    <details>
      <summary><strong>code_validation.py</strong><dd><code>Enhance Code Validation and Import Handling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>
      
codex/develop/code_validation.py

<li>Added validation for <code>ui.link</code> usage in function code to ensure it <br>references valid functions.<br> <li> Enhanced the <code>__fix_missing_imports</code> function to handle missing imports <br>more accurately, including async fetching of functions related to <br>object types.<br> <li> Improved error handling by appending problematic lines to error <br>messages.<br>


</details>
    

  </td>
  <td><a href="https://github.com/Significant-Gravitas/codex/pull/263/files#diff-deae541000e158a1fc146c31004d52ed52a858802dd058803d920d97477071d6">+35/-10</a>&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>database.py</strong><dd><code>Add Database Function for Object Type Function Fetching</code>&nbsp; &nbsp; </dd></summary>
<hr>
      
codex/develop/database.py

<li>Added a new function <code>get_object_type_referred_functions</code> to fetch <br>functions related to an object type.<br>


</details>
    

  </td>
  <td><a href="https://github.com/Significant-Gravitas/codex/pull/263/files#diff-61c5f5198f842fcc472b6b31ee2e5a53eac489a88152cbc792895f1f9d60f694">+23/-1</a>&nbsp; &nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
      <summary><strong>ai_page_decompose.py</strong><dd><code>Enhance Page Decomposition with Detailed Function Usage and Page </code><br><code>Connections</code></dd></summary>
<hr>
      
codex/requirements/blocks/ai_page_decompose.py

<li>Updated <code>PageDecompositionEntry</code> to use a dictionary for <code>used_functions</code> <br>to include descriptions.<br> <li> Added <code>PageConnection</code> model to describe connections between pages.<br> <li> Enhanced validation in <code>PageDecompositionBlock</code> to include checks for <br>main function naming, existence of a home page, and valid page <br>connections.<br>


</details>
    

  </td>
  <td><a href="https://github.com/Significant-Gravitas/codex/pull/263/files#diff-0539cf8ae85457e8d87308e181529144d8f564ad2453eabecc509b4f02c4abe2">+55/-9</a>&nbsp; &nbsp; </td>

</tr>                    
</table></td></tr><tr><td><strong>Documentation
</strong></td><td><table>
<tr>
  <td>
    <details>
      <summary><strong>system.j2</strong><dd><code>Update Example to Demonstrate Enhanced Page Decomposition Features</code></dd></summary>
<hr>
      
codex/prompts/gpt-4-turbo/requirements/page_decompose/system.j2

<li>Modified the example to reflect changes in the <code>PageDecompositionEntry</code> <br>model using a dictionary for <code>used_functions</code>.<br> <li> Added <code>connections</code> field to demonstrate inter-page linking in the <br>example.<br>


</details>
    

  </td>
  <td><a href="https://github.com/Significant-Gravitas/codex/pull/263/files#diff-c081d45d8aa12144bab35cca95d5b45f35e7a380a84e71632b1d425d9a712f6c">+26/-11</a>&nbsp; </td>

</tr>                    
</table></td></tr></tr></tbody></table>

___

> ✨ **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions

---------

Co-authored-by: majdyz <[email protected]>
2024-05-03 16:26:31 +07:00
Aarushi 2a6ec33a30 First iteration of tracing (#267)
* First iteration of tracing

* fixing linting

* add to Dockerfile
2024-05-02 11:24:07 +01:00
Aarushi a34ce5194d update naming (#266) 2024-05-02 09:24:32 +01:00
Aarushi bcf7da0ae4 add chat script (#265)
* add chat script

* include script

* fix formatting

* rename files

* fix script
2024-05-02 08:33:42 +01:00
Aarushiandcodiumai-pr-agent-pro[bot] e9bde49b92 fix port mapping (#259)
* fix port mapping

* Update codex/deploy/packager.py

Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com>

---------

Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com>
2024-04-29 17:19:29 +01:00
Aarushi cda57050c4 fix typo (#258)
* fix typo

* rename
2024-04-26 20:23:30 +01:00
Aarushi 16b5c43882 Setting up backend to accept deployment settings (#257)
setting up backend to accept deployment settings
2024-04-26 17:50:46 +00:00
Zamil Majdyandmajdyz 2eb25f909d [AGPT-688] NiceGUI Prototype (#220)
This is a very early prototype of the front-end code generation.

The current implementation is still super basic, but the idea is to evaluate early if this is possible. The hypothesis is if we can build a small fully working UI component, we can utilize more sophisticated agentic prompting.

I created a video of the quick run-through of the code and how to test it https://www.loom.com/share/b331582fa2694ece8594c00ae78c71e5?sid=59b6baa6-ca9b-4f46-bb7e-76a82b1fce98

These are the possible next steps:
https://www.notion.so/auto-gpt/Front-end-Codex-Plan-abf6c1d990104d23b758960cbaea26f9

---------

Co-authored-by: majdyz <[email protected]>
2024-04-26 22:37:36 +07:00
Aarushi 36c6b0022b refactor to use just one db cred generator (#241)
* refactor to use just one db cred generator

* add the actual file

* codium suggestions using secrets instead
2024-04-25 15:42:45 +00:00
Aarushiandcodiumai-pr-agent-pro[bot] d32fbef405 temporary fix for unique constraints (#251)
* temporary fix for unique constraints

* fix formatting

* use user id, app name and deliverable id

* fix name

* linting fix

* Apply suggestions from code review

Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com>

* fix formatting

---------

Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com>
2024-04-25 16:37:32 +01:00
AarushiandSwifty ea7d7260b9 Setup generated code db (#221)
* adding DB creation / migration steps

* set up codex to create a functional db for users

* adding env to dockerfile

* add variables to .env.example

* [AGPT-678] Ensure requirements systems creates what user requested (#216)

* Add InterviewBlock class and model definitions

* Updated the interview process

* new interview integrated with the requirements system

* updated prompt

* fix

* tweaking prompt

* delete simple agent

* change from my personal discord id to another

* fix prompts

* Add reference to the prompt in validation error message

* return feature functionality

* fix regerssion

* updated prompt

* Fix default values in InterviewStep table

* Pr comments

* Updating the requirements flow

* progressing the requirements system

* Updated requirements system

* Fix typo in variable name

* Propogating changes to develop

* Add print_interview and print_spec_summary functions***
***Implement explore_database function***
***Update module_routes/user.j2 template***
***Refactor generate_requirements and define_module_routes functions

* Add gpt-4-turbo model and new prompt templates

* Add unique constraint to repo field

* Update debug print statements and remove unnecessary migration files

* Add migrations

* isort

* Add note about allowed_access_roles in user.j2

* [AGPT-691] Clean up old unused requirements code (#218)

* delete old code

* [AGPT-693] Add back access level (#219)

* Added back access level

* Update migrations

* Delete comment

* Updated where access level is defnined.

* Add interactions

* updated migrations

* fixing deployment issue (#223)

* setting up two docker files (#222)

* Fix deployment error (#224)

* fixing deployment issue

* Update generate_readme function to include specification

* set up codex to create a functional db for users

* use instance connection name

* fix linting and formatting

---------

Co-authored-by: Swifty <[email protected]>
2024-04-23 17:11:56 +01:00
Swifty b472a58422 Req Update Fixes (#225)
* PR Coments

* Fixed db issue

* Add async main function to database.py

* fixed linting errors

* fixed linting errors

* fixed linting errors

* fixed linting errors

* more linting

* formatting
2024-04-22 10:32:40 +02:00
Swifty 88acd1b214 Fix deployment error (#224)
* fixing deployment issue

* Update generate_readme function to include specification
2024-04-18 16:43:38 +02:00
Swifty 7f3a17948d [AGPT-678] Ensure requirements systems creates what user requested (#216)
* Add InterviewBlock class and model definitions

* Updated the interview process

* new interview integrated with the requirements system

* updated prompt

* fix

* tweaking prompt

* delete simple agent

* change from my personal discord id to another

* fix prompts

* Add reference to the prompt in validation error message

* return feature functionality

* fix regerssion

* updated prompt

* Fix default values in InterviewStep table

* Pr comments

* Updating the requirements flow

* progressing the requirements system

* Updated requirements system

* Fix typo in variable name

* Propogating changes to develop

* Add print_interview and print_spec_summary functions***
***Implement explore_database function***
***Update module_routes/user.j2 template***
***Refactor generate_requirements and define_module_routes functions

* Add gpt-4-turbo model and new prompt templates

* Add unique constraint to repo field

* Update debug print statements and remove unnecessary migration files

* Add migrations

* isort

* Add note about allowed_access_roles in user.j2

* [AGPT-691] Clean up old unused requirements code (#218)

* delete old code

* [AGPT-693] Add back access level (#219)

* Added back access level

* Update migrations

* Delete comment

* Updated where access level is defnined.

* Add interactions

* updated migrations
2024-04-18 15:35:33 +02:00
AarushiandAarushi 5457cd848f adding git author in the initial commit (#209)
* adding git author in the initial commit

* use author type

* make author and commiter the same

---------

Co-authored-by: Aarushi <[email protected]>
2024-04-15 19:30:51 +01:00
Aarushi 34af40f8e0 adding code back in to create zip file if local environment & download (#207)
* adding code back in to create zip file if local environment & download

* fixing linting
2024-04-11 14:52:51 +02:00
Nicholas Tindle ca85e40a48 Allow fastapi.UploadFile as a type plus minor bug fixes (#197)
* feat: first go of UploadFile

* fix: fixes to main and quietly publishing to gh for now
* fix(deploy): add note to create the repos on dev env in private
(because people were contacting us about the publicly created agpt-coder repos)

* fix(deploy): Do not log created GitHub repo URL with token

* feat(requirements, develop): Add fastapi.UploadFile as available built-in type

* fix(requirements): Allow list for authorization_roles while refining requirements
2024-04-10 10:58:43 -05:00
Aarushi cd41af5654 change back to master (#201)
* change back to master

* set initial branch

* fix f linter
2024-04-10 15:14:21 +01:00
fbd9b9f7d4 [do not merge] [AGPT-646] Save GitHub repo (#191)
* feat(deploy): Use `gitpython` for Git operations in packager (#168)

- Rewrite `git_init` subroutine in `deploy.packager` to use `gitpython` rather than `subcommand.run(["git", ...])`
- Add `gitpython` dependency

* Avoid persisting request/response with no fields (#176)

Co-authored-by: majdyz <[email protected]>

* Update health check to use db user and db name. (#173)

* feat(deploy): Switch generated requirements.txt to Poetry (#164)

- Add `create_pyproject` and `poetry_lock` subroutines in packager.py
- Replace step to create requirements.txt with step to create pyproject.toml and poetry.lock
- Add default value `None` to `python_path` parameter on `execute_command` utility function
- Update generated Dockerfile and README.md for switch to Poetry

* [AGPT-510] Debugging Part 1: Auto Resume points, debug command start (#153)

* Add debug commands to codex main module

* Refactor debug command and add WhatToDebug model

* Refactor debug command and add explore_database function

* Add Interview field to Specification model

* Removed need for resume points table

* Formatting od debug messages

* poetry lock update

* Add migrations

* [AGPT-594] Introduce Event Logging (#169)

* Introduce event logging, captured event: All non-Get HTTP operations.
* Refactor routes.py on each API: removed redundant try-catch for unknown exception, use JsonResponse
* Fix broken api_test.py due to DB seeding being removed.

---------

Co-authored-by: majdyz <[email protected]>

* [AGPT-596] Create .github/workflows and related deployment file (#175)

* Create .github/workflows and related deployment file

* Update packager.py

* [AGPT-593] Avoid persisting request/response with no fields - Part 2 (#179)

Co-authored-by: majdyz <[email protected]>

* fix prisma query

* Add support for enhancing errors with context aware details (#180)

* fix: minor annoyance

* feat: v1 of error enhancement

* feat: refactor the initial implementation

* fix: linting 🙄

* feat: more loggin

* nit: typehinting

* fix: add migrations to docker image

* fix: run validate and formate and also fix the param used (#184)

* [AGPT-621] Moving on with code generation with a buggy code (Ruff - PyRight failure) (#181)

To prevent frustrated tester, we should let buggy code to be generated instead of failing the project generation (if it failed on the linter) by appending a # TODO line on the code.

---------

Co-authored-by: majdyz <[email protected]>

* feat: updates to our dockercompose for discussion (#177)

* [AGPT-631] Fix docker setup (#186)

* Fixing docker setup

* Added comment back in

* formatting

* create and push to github repo

* Fixing formatting and logging

* update to only create github repo, no zip file

* remove local changes

* fix formatting

* fix linting step

* fix formating

* use one single migration

---------

Co-authored-by: Reinier van der Leer <[email protected]>
Co-authored-by: Zamil Majdy <[email protected]>
Co-authored-by: majdyz <[email protected]>
Co-authored-by: Swifty <[email protected]>
Co-authored-by: Nicholas Tindle <[email protected]>
Co-authored-by: Nicholas Tindle <[email protected]>
2024-04-10 11:18:14 +01:00
Nicholas TindleandSwifty f2728ff27d Random fixes to stuff (#195)
* feat: random fixes to stuff

* fix: swap to uuid

* fix: remove virtual env clone

---------

Co-authored-by: Swifty <[email protected]>
2024-04-09 10:27:12 +02:00
Reinier van der Leer 38f8686adf Use pathlib to simplify code (#172)
* refactor(common, develop/validate): Use `pathlib` to clean up file writing & path processing

* refactor(deploy): Use `pathlib` to clean up file operations
2024-04-08 11:21:37 +02:00
8743809691 Create commit gh repo (#189)
* feat(deploy): Use `gitpython` for Git operations in packager (#168)

- Rewrite `git_init` subroutine in `deploy.packager` to use `gitpython` rather than `subcommand.run(["git", ...])`
- Add `gitpython` dependency

* Avoid persisting request/response with no fields (#176)

Co-authored-by: majdyz <[email protected]>

* Update health check to use db user and db name. (#173)

* feat(deploy): Switch generated requirements.txt to Poetry (#164)

- Add `create_pyproject` and `poetry_lock` subroutines in packager.py
- Replace step to create requirements.txt with step to create pyproject.toml and poetry.lock
- Add default value `None` to `python_path` parameter on `execute_command` utility function
- Update generated Dockerfile and README.md for switch to Poetry

* [AGPT-510] Debugging Part 1: Auto Resume points, debug command start (#153)

* Add debug commands to codex main module

* Refactor debug command and add WhatToDebug model

* Refactor debug command and add explore_database function

* Add Interview field to Specification model

* Removed need for resume points table

* Formatting od debug messages

* poetry lock update

* Add migrations

* [AGPT-594] Introduce Event Logging (#169)

* Introduce event logging, captured event: All non-Get HTTP operations.
* Refactor routes.py on each API: removed redundant try-catch for unknown exception, use JsonResponse
* Fix broken api_test.py due to DB seeding being removed.

---------

Co-authored-by: majdyz <[email protected]>

* [AGPT-596] Create .github/workflows and related deployment file (#175)

* Create .github/workflows and related deployment file

* Update packager.py

* [AGPT-593] Avoid persisting request/response with no fields - Part 2 (#179)

Co-authored-by: majdyz <[email protected]>

* fix prisma query

* Add support for enhancing errors with context aware details (#180)

* fix: minor annoyance

* feat: v1 of error enhancement

* feat: refactor the initial implementation

* fix: linting 🙄

* feat: more loggin

* nit: typehinting

* fix: add migrations to docker image

* fix: run validate and formate and also fix the param used (#184)

* [AGPT-621] Moving on with code generation with a buggy code (Ruff - PyRight failure) (#181)

To prevent frustrated tester, we should let buggy code to be generated instead of failing the project generation (if it failed on the linter) by appending a # TODO line on the code.

---------

Co-authored-by: majdyz <[email protected]>

* feat: updates to our dockercompose for discussion (#177)

* [AGPT-631] Fix docker setup (#186)

* Fixing docker setup

* Added comment back in

* formatting

* create and push to github repo

* Fixing formatting and logging

* adding types

---------

Co-authored-by: Reinier van der Leer <[email protected]>
Co-authored-by: Zamil Majdy <[email protected]>
Co-authored-by: majdyz <[email protected]>
Co-authored-by: Swifty <[email protected]>
Co-authored-by: Nicholas Tindle <[email protected]>
Co-authored-by: Nicholas Tindle <[email protected]>
2024-04-06 19:03:42 +01:00
Aarushi 3a02864260 [AGPT-596] Create .github/workflows and related deployment file (#175)
* Create .github/workflows and related deployment file

* Update packager.py
2024-04-04 18:11:47 +02:00
Zamil Majdyandmajdyz a9c6c41771 [AGPT-594] Introduce Event Logging (#169)
* Introduce event logging, captured event: All non-Get HTTP operations.
* Refactor routes.py on each API: removed redundant try-catch for unknown exception, use JsonResponse
* Fix broken api_test.py due to DB seeding being removed.

---------

Co-authored-by: majdyz <[email protected]>
2024-04-04 18:11:47 +02:00
Reinier van der Leer 99e21a5ceb feat(deploy): Switch generated requirements.txt to Poetry (#164)
- Add `create_pyproject` and `poetry_lock` subroutines in packager.py
- Replace step to create requirements.txt with step to create pyproject.toml and poetry.lock
- Add default value `None` to `python_path` parameter on `execute_command` utility function
- Update generated Dockerfile and README.md for switch to Poetry
2024-04-04 18:11:47 +02:00
Aarushi 308b6ef049 Update health check to use db user and db name. (#173) 2024-04-04 18:11:47 +02:00
Reinier van der Leer 9e09b130fb feat(deploy): Use gitpython for Git operations in packager (#168)
- Rewrite `git_init` subroutine in `deploy.packager` to use `gitpython` rather than `subcommand.run(["git", ...])`
- Add `gitpython` dependency
2024-04-04 18:11:47 +02:00
Reinier van der Leer 839ae23101 fix(compile): Resolve multiplicate dependencies -> fix static code analysis (#161)
- Move resolution of multiplicate dependencies from deploy to compile
- Rename `generate_requirements_txt` to `requirements_txt_from_packages`
2024-03-28 10:02:58 +01:00
Reinier van der Leer 36597885a3 feat(deploy): Include version specifiers in generated requirements.txt (#155)
If a package is specified multiple times, it is resolved to a requirement for the highest mentioned version.
2024-03-27 16:07:16 +01:00
Reinier van der Leer 5a776c911a fix(deploy): Deprecate pipreqs as a secondary package guesser (#149)
* fix(deploy): Deprecate `pipreqs` as a secondary package guesser

   The develop stage already outputs a list of packages required by the application,
and `pipreqs` is unreliable.

   - Remove usage of `pipreqs` from deploy.packager
   - Remove `pipreqs` dependency

* tweak incantations regarding imports & requirements
2024-03-27 10:38:30 +01:00
Zamil Majdyandmajdyz fa72f11b22 [AGPT-580] Support async subprocess execution (#145)
Subprocess execution implementation (for Ruff & PyRight) is currently a blocking call. This doesn't work well with the event-loop used by the fastapi.

Scope:

Make AiBlock.validate async
Make subprocess execution async.

---------

Co-authored-by: majdyz <[email protected]>
2024-03-25 18:22:18 +04:00
d379a0c363 [AGPT-571] Integrate PyRight (#141)
Integrating PyRight project-based code-linting. This will allow us to detect:
* Misuse of async functions.
* Misuse of optional type and other annotated types (currently disabled)
* Wrong usage of pydantic and prisma model.
* Wrong usage of third-party library.
* Use of undeclared field
* Use of uninstalled third-party library (which will prompt LLM to add the requirement list)

Known trade-off:

Setting-up PyRight requires building a full-project (generate the Prisma model code, installing 3rd-party library, compiling the function with the object dependency) this slows down the code-validation during the code-validation step.

---------

Co-authored-by: majdyz <[email protected]>
Co-authored-by: SwiftyOS <[email protected]>
2024-03-22 16:51:47 +04:00
Reinier van der Leer f3a2f4023a refactor(deploy): Clean up & improve generated docker setup 2024-03-21 11:15:53 +01:00
Reinier van der Leer 8682d54905 lint(deploy): remove disabled DB port config from generated docker compose file 2024-03-21 11:03:14 +01:00
Reinier van der Leer b3f1845db9 Make app port configurable through PORT env var 2024-03-21 10:56:18 +01:00
Zamil Majdyandmajdyz 92416fadac [AGPT-556] Overhaul code-validation design + Add PyRight in commented mode (#139)
This is a large but a much needed change to allow more sophisticated static code analysis to be added.

PyRight (used by pylance) will allow us to detect:

Misuse of async functions.
Misuse of optional type and other annotated types.
Wrong usage of pydantic and prisma model.
Wrong usage of third-party library.
The overhaul is required to allow us retrying while fixing the code as a project (not only as a function) and allow us to keep adding non-LLM fixes to it so that we can avoid wasting the retry.

The scope of this PR is still a refactoring and the adding of the PyRight linter, so this PR try to keep the existing behaviour.
The enablement and more tuning on the linter will be done in the followup PR.

---------

Co-authored-by: majdyz <[email protected]>
2024-03-21 13:28:17 +04:00
Toran Bruce Richards 1653a13288 Update git_init() call in packager.py to init in root directory rather than project folder. (#137) 2024-03-19 14:33:01 -05:00
Reinier van der Leer 6690bb76ac refactor(deploy): Clean up & improve generated docker setup
* Re-apply improvements from bb43387, with additional fixes:
  - Fix Prisma client generation
  - Fix `DATABASE_URL` in docker-compose.yml

* Simplify mechanism to wait for database availability before starting app container (introduced in a1963c9 through #133)
  - Remove deploy/wait-for-it.sh
2024-03-19 16:02:16 +01:00
Reinier van der LeerandSwiftyOS c06231d061 feat(deploy): Add instructions to run app to generated README (#131)
* Add instructions to run app to generated README

- Add `generate_readme` function to packager.py
- Fix usage/formatting of block strings in packager.py

* Add docstring to generate_readme

* Fix instructions regarding .env

* Change author in generated README to "AutoGPT" (remove mention of Codex)

* Update README generated by packager.py

Remove `cd` steps to go into and out of `project` folder. This is no longer needed since requirements.txt is now at the root level of the package.

* Update instructions in packager.py

---------

Co-authored-by: SwiftyOS <[email protected]>
2024-03-19 09:33:16 +01:00
Swifty a1963c97fd Add wait-for-it.sh script and update Dockerfile and docker-compose.ym… (#133)
* Add wait-for-it.sh script and update Dockerfile and docker-compose.yml***

* Update packager.py to use bash for wait-for-it.sh command
2024-03-19 09:27:52 +01:00
Toran Bruce Richards 9d28333782 AGPT-449 - Initialise a Git Repo with Generated Code (#120)
* Add Git user name and email to .env.example

* Add Git repository initialization and commit code in deploy step

* Extract git repository init to function.

* Update Git user configuration to only apply locally in newly initialized repository.

* Unset local Git user configuration after commiting

* Lint
2024-03-18 15:48:12 -05:00
Reinier van der Leer bb43387320 fix(deploy): Clean up & fix generated Docker setup
- Remove `ffmpeg` from `apt-get install` step
- Fix and deduplicate `COPY` statements: exclude irrelevant files and optimize for caching
- Add `DATABASE_URL` to `app` service in `docker-compose.yml`
2024-03-18 18:32:18 +01:00
Reinier van der Leer 61e263cb9e fix(deploy): Create .env as copy of .env.template
... rather than generating a new template and writing it to .env
2024-03-18 18:21:44 +01:00
SwiftyOS 7d0c56ec11 Add .env file and update packager.py 2024-03-18 17:24:51 +01:00
Swifty fef08c6bc6 [AGPT-516] add docker file (#130)
* Add Dockerfile and update docker-compose.yml

* Update system dependencies installation in packager.py

* Remove unused environment variable declaration
2024-03-18 17:19:06 +01:00
Reinier van der LeerandSwiftyOS 7d6e04a9b8 fix(deploy): [AGPT-515] Update generated project structure (#129)
* fix(deploy): [AGPT-515] Update generated project structure

Resolves [AGPT-515](https://linear.app/autogpt/issue/AGPT-515)

* Fixed file structure

---------

Co-authored-by: SwiftyOS <[email protected]>
2024-03-18 17:03:20 +01:00
Swifty f5034615fe [AGPT-552] fix type hint errors (#127)
* Fix function template and add validation for required fields

* Add pytest hook to .pre-commit-config.yaml

* Update pytest configuration to pass filenames and include only .py files
2024-03-18 14:49:13 +01:00