-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop support for py38 & uv chore upgrade (#606)
* py3.9 Signed-off-by: Teo <[email protected]> * trigger wf Signed-off-by: Teo <[email protected]> * add Python 3.13 support * remove devin test timing out CI Signed-off-by: Teo <[email protected]> --------- Signed-off-by: Teo <[email protected]>
- Loading branch information
Showing
9 changed files
with
126 additions
and
273 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# :: Use nektos/act to run this locally | ||
# :: Example: | ||
# :: `act push -j python-tests --matrix python-version:3.10 --container-architecture linux/amd64` | ||
name: Python Tests | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'agentops/**/*.py' | ||
- 'agentops/**/*.ipynb' | ||
- 'tests/**/*.py' | ||
- 'tests/**/*.ipynb' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'agentops/**/*.py' | ||
- 'agentops/**/*.ipynb' | ||
- 'tests/**/*.py' | ||
- 'tests/**/*.ipynb' | ||
|
||
jobs: | ||
python-tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup UV | ||
uses: astral-sh/setup-uv@v5 | ||
continue-on-error: true | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache-prefix: uv-${{ matrix.python-version }} | ||
enable-cache: true | ||
cache-dependency-glob: "**/pyproject.toml" | ||
|
||
- name: Install dependencies | ||
run: | | ||
uv sync --group test --group dev | ||
- name: Run tests with coverage | ||
timeout-minutes: 10 | ||
run: | | ||
uv run -m pytest tests/ -v --cov=agentops --cov-report=xml | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
AGENTOPS_API_KEY: ${{ secrets.AGENTOPS_API_KEY }} | ||
PYTHONUNBUFFERED: "1" | ||
|
||
# Only upload coverage report for python3.11 | ||
- name: Upload coverage to Codecov | ||
if: ${{matrix.python-version == '3.11'}} | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.xml | ||
flags: unittests | ||
name: codecov-umbrella | ||
fail_ci_if_error: true # Should we? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,20 @@ authors = [ | |
{ name="Alex Reibman", email="[email protected]" }, | ||
{ name="Shawn Qiu", email="[email protected]" }, | ||
{ name="Braelyn Boynton", email="[email protected]" }, | ||
{ name="Howard Gil", email="[email protected]" } | ||
{ name="Howard Gil", email="[email protected]" }, | ||
{ name="Constantin Teodorescu", email="[email protected]" }, | ||
{ name="Pratyush Shukla", email="[email protected]" } | ||
] | ||
description = "Observability and DevTool Platform for AI Agents" | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
requires-python = ">=3.9,<3.14" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
] | ||
|
@@ -24,52 +31,69 @@ dependencies = [ | |
"psutil>=5.9.8,<6.1.0", | ||
"termcolor>=2.3.0,<2.5.0", | ||
"PyYAML>=5.3,<7.0", | ||
"opentelemetry-api>=1.22.0,<2.0.0", # API for interfaces | ||
"opentelemetry-sdk>=1.22.0,<2.0.0", # SDK for implementation | ||
"opentelemetry-exporter-otlp-proto-http>=1.22.0,<2.0.0", # For OTLPSpanExporter | ||
"opentelemetry-api>=1.22.0,<2.0.0", | ||
"opentelemetry-sdk>=1.22.0,<2.0.0", | ||
"opentelemetry-exporter-otlp-proto-http>=1.22.0,<2.0.0", | ||
# "typing-extensions>=4.9.0; python_version >= '3.8'", | ||
# "pydantic>=2.7.4,<3.0.0; python_version < '3.13'", | ||
# "pydantic-core>=2.23.4; python_version >= '3.8' and python_version < '3.13'" | ||
] | ||
|
||
[dependency-groups] | ||
dev = [ | ||
"pytest==7.4.0", | ||
"pytest-depends", | ||
"pytest-asyncio", | ||
"pytest-vcr", | ||
"pytest-mock", | ||
"pyfakefs", | ||
"requests_mock==1.11.0", | ||
"ruff", | ||
"vcrpy>=6.0.0; python_version >= '3.8'", | ||
"python-dotenv" | ||
] | ||
ci = [ | ||
"tach~=0.9", | ||
test = [ | ||
"openai>=1.0.0,<2.0.0", | ||
"langchain", | ||
"pytest-cov", | ||
] | ||
|
||
[project.optional-dependencies] | ||
langchain = [ | ||
"langchain==0.2.14; python_version >= '3.8.1'" | ||
dev = [ | ||
# Testing essentials | ||
"pytest>=7.4.0,<8.0.0", # Testing framework with good async support | ||
"pytest-depends", # For testing complex agent workflows | ||
"pytest-asyncio", # Async test support for testing concurrent agent operations | ||
"pytest-mock", # Mocking capabilities for isolating agent components | ||
"pyfakefs", # File system testing | ||
"pytest-recording", # Alternative to pytest-vcr with better Python 3.x support | ||
"vcrpy @ git+https://github.com/kevin1024/vcrpy.git@81978659f1b18bbb7040ceb324a19114e4a4f328", | ||
# Code quality and type checking | ||
"ruff", # Fast Python linter for maintaining code quality | ||
"mypy", # Static type checking for better reliability | ||
"types-requests", # Type stubs for requests library | ||
|
||
# HTTP mocking and environment | ||
"requests_mock>=1.11.0", # Mock HTTP requests for testing agent external communications | ||
"python-dotenv", # Environment management for secure testing | ||
|
||
# Agent integration testing | ||
] | ||
|
||
# CI dependencies | ||
ci = [ | ||
"tach~=0.9" # Task runner for CI/CD pipelines | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/AgentOps-AI/agentops" | ||
Issues = "https://github.com/AgentOps-AI/agentops/issues" | ||
|
||
[tool.uv] | ||
compile-bytecode = true # Enable bytecode compilation for better performance | ||
default-groups = ["test", "dev"] # Default groups to install for development | ||
|
||
[tool.autopep8] | ||
max_line_length = 120 | ||
|
||
[project.scripts] | ||
agentops = "agentops.cli:main" | ||
|
||
[tool.pytest.ini_options] | ||
asyncio_mode = "strict" | ||
asyncio_default_fixture_loop_scope = "function" | ||
asyncio_mode = "auto" | ||
asyncio_default_fixture_loop_scope = "function" # WARNING: Changing this may break tests. A `module`-scoped session might be faster, but also unstable. | ||
test_paths = [ | ||
"tests", | ||
] | ||
addopts = "--import-mode=importlib --tb=short -p no:warnings" | ||
addopts = "--tb=short -p no:warnings" | ||
pythonpath = ["."] | ||
faulthandler_timeout = 30 # Reduced from 60 | ||
timeout = 60 # Reduced from 300 | ||
disable_socket = true # Add this to prevent hanging on socket cleanup | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.