-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue #4103: Improve description of how to do frontend setup and …
…testing in `.openhands_instructions`
- Loading branch information
1 parent
d669c7b
commit b962b48
Showing
1 changed file
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
OpenHands is an automated AI software engineer. It is a repo with a Python backend | ||
(in the `openhands` directory) and typescript frontend (in the `frontend` directory). | ||
(in the `openhands` directory) and TypeScript frontend (in the `frontend` directory). | ||
|
||
- Setup: To set up the repo, including frontend/backend you can `make build` | ||
- Backend Testing: All tests are in `tests/unit/test_*.py`. To test new code, you | ||
can do `poetry run pytest tests/unit/test_xxx.py` where `xxx` is the appropriate | ||
file for the current functionality. Write all tests with pytest. | ||
General Setup: | ||
- To set up the entire repo, including frontend and backend, run `make build` | ||
|
||
Backend: | ||
- Located in the `openhands` directory | ||
- Testing: | ||
- All tests are in `tests/unit/test_*.py` | ||
- To test new code, run `poetry run pytest tests/unit/test_xxx.py` where `xxx` is the appropriate file for the current functionality | ||
- Write all tests with pytest | ||
|
||
Frontend: | ||
- Located in the `frontend` directory | ||
- Prerequisites: A recent version of NodeJS / NPM | ||
- Setup: Run `npm install` in the frontend directory | ||
- Development: | ||
- Start the app: `npm run start -- --port 3001` | ||
- View the app at http://localhost:3001 | ||
- Testing: | ||
- Run tests: `npm run test` | ||
- To run specific tests: `npm run test -- -t "TestName"` | ||
- Building: | ||
- Build for production: `npm run build` | ||
- Environment Variables: | ||
- Set in `frontend/.env` or as environment variables | ||
- Available variables: VITE_BACKEND_HOST, VITE_USE_TLS, VITE_INSECURE_SKIP_VERIFY, VITE_FRONTEND_PORT | ||
- Internationalization: | ||
- Generate i18n declaration file: `npm run make-i18n` |