diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dd1caea4..d7dab438 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,12 +17,12 @@ To set up your development environment for Agentex, please refer to the [README. 1. **Fork** the repository. 2. **Clone** your fork: ```bash - git clone https://github.com//agentex.git - cd agentex + git clone https://github.com//scale-agentex.git + cd scale-agentex ``` 3. **Set the original repo as upstream** (recommended): ```bash - git remote add upstream https://github.com/scaleapi/agentex.git + git remote add upstream https://github.com/scaleapi/scale-agentex.git ``` 4. **Create a new branch** for your feature or bugfix: ```bash @@ -30,14 +30,15 @@ To set up your development environment for Agentex, please refer to the [README. ``` 5. **Make your changes.** Follow project coding style and conventions. -6. **Test your changes:** +6. **Test your changes** (backend; runs from the repo root or from `agentex/`): ```bash make test ``` - Run linter/formatter as required: + Run the linter/formatter checks as required: ```bash make lint ``` + For the developer UI, run `npm run lint`, `npm run typecheck`, and `npm test` inside `agentex-ui/`. 7. **Commit your changes** (see commit message guidelines below). 8. **Push** to your fork: ```bash diff --git a/Makefile b/Makefile index 4e783f07..5683cd65 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,16 @@ # AgentEx Workspace Makefile -.PHONY: repo-setup help +.PHONY: repo-setup help lint test repo-setup: ## Setup development environment for the workspace uv sync --group dev uv run pre-commit install +lint: ## Run backend lint + format checks (delegates to agentex/) + $(MAKE) -C agentex lint + +test: ## Run backend tests (delegates to agentex/; see agentex/Makefile for FILE/NAME/ARGS) + $(MAKE) -C agentex test + help: ## Show this help message @echo "AgentEx Workspace Commands:" @echo "" diff --git a/agentex/Makefile b/agentex/Makefile index c66b5a5e..462b4811 100644 --- a/agentex/Makefile +++ b/agentex/Makefile @@ -105,6 +105,14 @@ docker-build-with-docs: ## Build production Docker image with docs included # Test Commands # +lint: ## Check lint and formatting with ruff (the same checks as the pre-commit hooks) + uv run ruff check . + uv run ruff format --check . + +lint-fix: ## Auto-fix lint errors and format with ruff + uv run ruff check . --fix + uv run ruff format . + test: ## Run tests (examples: make test FILE=path/to/test.py, make test NAME=pattern, make test ARGS="-v") @uv run python scripts/run_tests.py \ $(if $(FILE),$(FILE)) \