diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66a3886221f2..d809f8bd7398 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: python -m pip install --upgrade pip wheel pip install -e . python -c "import autogen" - pip install -e. pytest mock + pip install pytest mock - name: Set AUTOGEN_USE_DOCKER based on OS shell: bash run: | @@ -53,8 +53,7 @@ jobs: - name: Coverage if: matrix.python-version == '3.10' run: | - pip install -e .[test] - pip install -e .[redis] + pip install -e .[test,redis] coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai coverage xml - name: Upload coverage to Codecov diff --git a/autogen/cache/__init__.py b/autogen/cache/__init__.py index e69de29bb2d1..0eb8cfa71c85 100644 --- a/autogen/cache/__init__.py +++ b/autogen/cache/__init__.py @@ -0,0 +1,3 @@ +from .cache import Cache + +__all__ = ["Cache"] diff --git a/autogen/cache/cache.py b/autogen/cache/cache.py index fbcfb9a9fc36..d20aadef9370 100644 --- a/autogen/cache/cache.py +++ b/autogen/cache/cache.py @@ -1,4 +1,3 @@ -import os from typing import Dict, Any from autogen.cache.cache_factory import CacheFactory diff --git a/autogen/version.py b/autogen/version.py index 6cd38b746590..c49a95c35721 100644 --- a/autogen/version.py +++ b/autogen/version.py @@ -1 +1 @@ -__version__ = "0.2.7" +__version__ = "0.2.8" diff --git a/test/agentchat/test_cache_agent.py b/test/agentchat/test_cache_agent.py index deb5e377923c..8da9a919f849 100644 --- a/test/agentchat/test_cache_agent.py +++ b/test/agentchat/test_cache_agent.py @@ -5,7 +5,7 @@ import pytest import autogen from autogen.agentchat import AssistantAgent, UserProxyAgent -from autogen.cache.cache import Cache +from autogen.cache import Cache sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from conftest import skip_openai, skip_redis # noqa: E402 diff --git a/test/conftest.py b/test/conftest.py index fd65deccea7f..9992615403c5 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,15 +1,17 @@ import pytest skip_openai = False +skip_redis = False -# Registers command-line option '--skip-openai' via pytest hook. -# When this flag is set, it indicates that tests requiring OpenAI should be skipped. +# Registers command-line option '--skip-openai' and '--skip-redis' via pytest hook. +# When these flags are set, it indicates that tests requiring OpenAI or Redis (respectively) should be skipped. def pytest_addoption(parser): parser.addoption("--skip-openai", action="store_true", help="Skip all tests that require openai") + parser.addoption("--skip-redis", action="store_true", help="Skip all tests that require redis") -# pytest hook implementation extracting the '--skip-openai' command line arg and exposing it globally +# pytest hook implementation extracting the '--skip-openai' and '--skip-redis' command line arg and exposing it globally @pytest.hookimpl(tryfirst=True) def pytest_configure(config): global skip_openai