Files
autogen/test/coding/test_kubernetes.commandline_code_executor.md
kiyoung 02977ee250 K8s code executor (#3419)
* remove coding directory from gitignore

* add k8s PodCommandLineCodeExecutor

* add error handlings and custom pod spec parameter

* change parameter name to kube_config_file

* add param container_name

* add test case for PodCommandLineCodeExecutor

* add test guide

* draft for docs notebook

* test code fix indent

* add document

* add license info

* revise documentation

* modify document: install autogen-agentchat

* apply pre-commit

* revert change to gitignore

* error handling: move import block into try block

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-10-16 12:22:50 -07:00

1.1 KiB

Test Environment for autogen.coding.kubernetes.PodCommandLineCodeExecutor

To test PodCommandLineCodeExecutor, the following environment is required.

  • kubernetes cluster config file
  • autogen package

kubernetes cluster config file

kubernetes cluster config file, kubeconfig file's location should be set on environment variable KUBECONFIG or It must be located in the .kube/config path of your home directory.

For Windows, C:\Users\<<user>>\.kube\config, For Linux or MacOS, place the kubeconfig file in the /home/<<user>>/.kube/config directory.

package install

Clone autogen github repository for package install and testing

Clone the repository with the command below.

before contribution

git clone -b k8s-code-executor https://github.com/questcollector/autogen.git

after contribution

git clone https://github.com/microsoft/autogen.git

install autogen with kubernetes >= 27.0.2

cd autogen
pip install .[kubernetes] -U

test execution

Perform the test with the following command

pytest test/coding/test_kubernetes_commandline_code_executor.py