.openhands_instructions 1.2 KB

12345678910111213141516171819202122232425262728
  1. OpenHands is an automated AI software engineer. It is a repo with a Python backend
  2. (in the `openhands` directory) and TypeScript frontend (in the `frontend` directory).
  3. General Setup:
  4. - To set up the entire repo, including frontend and backend, run `make build`
  5. - To run linting and type-checking before finishing the job, run `poetry run pre-commit run --all-files --config ./dev_config/python/.pre-commit-config.yaml`
  6. Backend:
  7. - Located in the `openhands` directory
  8. - Testing:
  9. - All tests are in `tests/unit/test_*.py`
  10. - To test new code, run `poetry run pytest tests/unit/test_xxx.py` where `xxx` is the appropriate file for the current functionality
  11. - Write all tests with pytest
  12. Frontend:
  13. - Located in the `frontend` directory
  14. - Prerequisites: A recent version of NodeJS / NPM
  15. - Setup: Run `npm install` in the frontend directory
  16. - Testing:
  17. - Run tests: `npm run test`
  18. - To run specific tests: `npm run test -- -t "TestName"`
  19. - Building:
  20. - Build for production: `npm run build`
  21. - Environment Variables:
  22. - Set in `frontend/.env` or as environment variables
  23. - Available variables: VITE_BACKEND_HOST, VITE_USE_TLS, VITE_INSECURE_SKIP_VERIFY, VITE_FRONTEND_PORT
  24. - Internationalization:
  25. - Generate i18n declaration file: `npm run make-i18n`