Move python code to subdir (#98)

This commit is contained in:
Jack Gerrits 2024-06-20 15:19:56 -04:00 committed by GitHub
parent c9e09e2d27
commit d365a588cb
102 changed files with 57 additions and 51 deletions

View File

@ -16,6 +16,7 @@ jobs:
- name: Install Hatch
uses: pypa/hatch@install
- run: hatch run ruff format --check
working-directory: ./python
lint:
runs-on: ubuntu-latest
@ -24,6 +25,7 @@ jobs:
- name: Install Hatch
uses: pypa/hatch@install
- run: hatch run ruff check
working-directory: ./python
mypy:
runs-on: ubuntu-latest
@ -32,6 +34,7 @@ jobs:
- name: Install Hatch
uses: pypa/hatch@install
- run: hatch run mypy
working-directory: ./python
pyright:
runs-on: ubuntu-latest
@ -40,6 +43,7 @@ jobs:
- name: Install Hatch
uses: pypa/hatch@install
- run: hatch run pyright
working-directory: ./python
test:
runs-on: ubuntu-latest
@ -51,6 +55,7 @@ jobs:
- name: Install Hatch
uses: pypa/hatch@install
- run: hatch run +python=${{ matrix.python-version }} test-matrix:pytest -n auto
working-directory: ./python
docs:
runs-on: ubuntu-latest
@ -59,3 +64,4 @@ jobs:
- name: Install Hatch
uses: pypa/hatch@install
- run: hatch run docs:check
working-directory: ./python

View File

@ -33,10 +33,11 @@ jobs:
- name: Install Hatch
uses: pypa/hatch@install
- run: hatch run docs:build
working-directory: ./python
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/build'
path: 'python/docs/build'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -1,7 +0,0 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}

View File

@ -1,45 +1,6 @@
# AutoGenNext
# AGNext
- [Documentation](http://microsoft.github.io/agnext)
- [Examples](https://github.com/microsoft/agnext/tree/main/examples)
See corresponding subdirectories for more information.
## Package layering
- `core` are the the foundational generic interfaces upon which all else is built. This module must not depend on any other module.
- `components` are the building blocks for creating single agents
- `application` are implementations of core components that are used to compose an application
- `chat` is the concrete implementation of multi-agent interactions. Most users will deal with this module.
## Development
**TL;DR**, run all checks with:
```sh
hatch run check
```
### Setup
- [Install `hatch`](https://hatch.pypa.io/1.12/install/).
### Virtual environment
To get a shell with the package available (virtual environment) run:
```sh
hatch shell
```
### Common tasks
- Format: `hatch run check`
- Lint: `hatch run lint`
- Test: `hatch run pytest -n auto`
- Mypy: `hatch run mypy`
- Pyright: `hatch run pyright`
- Build docs: `hatch run docs:build`
- Auto rebuild+serve docs: `hatch run docs:serve`
> [!NOTE]
> These don't need to be run in a virtual environment, `hatch` will automatically manage it for you.
- [Python Documentation](http://microsoft.github.io/agnext)
- [Python Examples](https://github.com/microsoft/agnext/tree/main/python/examples)

View File

45
python/README.md Normal file
View File

@ -0,0 +1,45 @@
# AGNext
- [Documentation](http://microsoft.github.io/agnext)
- [Examples](https://github.com/microsoft/agnext/tree/main/python/examples)
## Package layering
- `core` are the the foundational generic interfaces upon which all else is built. This module must not depend on any other module.
- `components` are the building blocks for creating single agents
- `application` are implementations of core components that are used to compose an application
- `chat` is the concrete implementation of multi-agent interactions. Most users will deal with this module.
## Development
**TL;DR**, run all checks with:
```sh
hatch run check
```
### Setup
- [Install `hatch`](https://hatch.pypa.io/1.12/install/).
### Virtual environment
To get a shell with the package available (virtual environment) run:
```sh
hatch shell
```
### Common tasks
- Format: `hatch run check`
- Lint: `hatch run lint`
- Test: `hatch run pytest -n auto`
- Mypy: `hatch run mypy`
- Pyright: `hatch run pyright`
- Build docs: `hatch run docs:build`
- Auto rebuild+serve docs: `hatch run docs:serve`
> [!NOTE]
> These don't need to be run in a virtual environment, `hatch` will automatically manage it for you.

Some files were not shown because too many files have changed in this diff Show More