You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.7 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # AGNext
  2. - [Documentation](http://microsoft.github.io/agnext)
  3. - [Examples](https://github.com/microsoft/agnext/tree/main/python/samples)
  4. ## Package layering
  5. - `core` are the the foundational generic interfaces upon which all else is built. This module must not depend on any other module.
  6. - `application` are implementations of core components that are used to compose an application.
  7. - `components` are the building blocks for creating agents.
  8. ## Development
  9. **TL;DR**, run all checks with:
  10. ```sh
  11. hatch run check
  12. ```
  13. ### Setup
  14. - [Install `hatch`](https://hatch.pypa.io/1.12/install/).
  15. ### Virtual environment
  16. To get a shell with the package available (virtual environment),
  17. in the current directory,
  18. run:
  19. ```sh
  20. hatch shell
  21. ```
  22. ### Common tasks
  23. - Format: `hatch run check`
  24. - Lint: `hatch run lint`
  25. - Test: `hatch run pytest -n auto`
  26. - Mypy: `hatch run mypy`
  27. - Pyright: `hatch run pyright`
  28. - Build docs: `hatch run docs:build`
  29. - Auto rebuild+serve docs: `hatch run docs:serve`
  30. > [!NOTE]
  31. > These don't need to be run in a virtual environment, `hatch` will automatically manage it for you.
  32. #### IntelliJ Support
  33. To enable the `hatch` virtual environment in IntelliJ, follow these steps:
  34. Under the `[tool.hatch.envs.default]` heading in `pyproject.toml`, add this:
  35. ```toml
  36. [tool.hatch.envs.default]
  37. type = "virtual"
  38. path = ".venv"
  39. ```
  40. Run `hatch shell` in the terminal to create the virtual environment.
  41. Then, in IntelliJ, go to `File` -> `Project Structure` -> `Project Settings` -> `Project` -> `Project SDK` and select the Python interpreter in the `.venv` directory.
  42. Once complete, your IDE should be able to resolve, run, and debug code.