Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.10"
python-version: "3.14"

- name: Install the project
run: uv sync --all-extras --dev
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ COPY . /build
RUN uv build --wheel

# Runtime stage - install and run the package
FROM python:3.10-slim-bookworm AS runtime
FROM python:3.14.1-slim AS runtime

# So that STDOUT/STDERR is printed
ENV PYTHONUNBUFFERED="1"
ARG UV_VERSION=0.8.3
ARG UV_VERSION=0.9.16
ENV UV_VERSION=${UV_VERSION}

# We create the default user and group to run unprivileged
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ integrated with a pull request.

See the documentation in https://otava.apache.org/docs/overview/.

## Python Versions
## Supported Python Versions

Apache Otava is tested against Python 3.8, 3.9, and 3.10.
Apache Otava is tested against Python 3.10, 3.11, 3.12, 3.13, and 3.14.


## License
Expand Down
55 changes: 31 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

[project]
name = "apache-otava"
version = "0.7.0"
version = "1.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably about time.

description = "Apache Otava (Incubating): Change Detection for Continuous Performance Engineering"
readme = "README.md"
requires-python = ">=3.8,<3.11"
requires-python = ">=3.10,<3.15"
license = { text = "Apache-2.0" }
authors = [
{ name = "Apache Otava (Incubating)", email = "dev@otava.apache.org" }
Expand All @@ -30,38 +30,45 @@ maintainers = [
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.8",
"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",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"dateparser>=1.0.0",
"numpy==1.24.*",
"python-dateutil>=2.8.1",
"scipy==1.10.*",
"ruamel.yaml==0.17.21",
"requests>=2.25.1",
"pystache>=0.6.0",
"tabulate>=0.8.7",
"validators>=0.18.2",
"slack-sdk>=3.4.2",
"google-cloud-bigquery>=3.25.0",
"pg8000>=1.31.2",
"numpy==2.2.0.*",
"python-dateutil>=2.9.0",
"ruamel.yaml==0.18.16",
"requests>=2.32.5",
"pystache>=0.6.8",
"tabulate>=0.9.0",
"validators>=0.35.0",
"slack-sdk>=3.39.0",
"google-cloud-bigquery>=3.38.0",
"pg8000>=1.31.5",
"configargparse>=1.7.1",
"expandvars>=0.12.0",

# For Python 3.10: last series that supports it
"scipy>=1.15,<1.16; python_version < '3.11'",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to support all of these python versions? I would be more aggressive in jumping to the newest and dropping older versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a solid default to support all officially supported Python versions.

Reasons:

  1. It seems reasonable to me for an infrastructure library to be biased towards being conservative. Stability or lack of maintenance may be as important of a feature as new shiny features for this kind of software. For example, all Otava installations I care about at the moment have been running with 0 maintenance for years, which I am proud of.
  2. It does not cost us that much extra effort - Scipy has been the only library that caused an issue and we only use 1 simple method out of it -

    otava/otava/analysis.py

    Lines 123 to 126 in 3154520

    if len(left) + len(right) > 2:
    (_, p) = ttest_ind_from_stats(
    mean_l, std_l, len(left), mean_r, std_r, len(right), alternative="two-sided"
    )
    . I would not even mind extracting that method and dropping that dependency.

WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok lets try it

As for multithreading and such, we could implement it in a way so that the default is 1 thread and it can only have some other value if python version is 3.14.


# For Python 3.11–3.14: newer series
"scipy>=1.16,<1.17; python_version >= '3.11'",
]

[project.optional-dependencies]
dev = [
"pytest>=6.2.2",
"pytest-benchmark>=4.0.0",
"pytz==2021.1",
"tox==3.25",
"flake8>=4.0.1",
"autoflake>=1.4",
"isort>=5.10.1",
"ruff>=0.6.9",
"pre-commit==3.5.0",
"pytest>=9.0.1",
"pytest-benchmark>=5.2.3",
"pytz==2025.2",
"tox==4.32.0",
"flake8>=7.3.0",
"autoflake>=2.3.1",
"isort>=7.0.0",
"ruff>=0.14.8",
"pre-commit==4.5.0",
]

[project.scripts]
Expand Down
22 changes: 2 additions & 20 deletions tests/csv_e2e_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,7 @@ def test_analyze_csv():
f"Stderr:\n{proc.stderr}\n"
)

# Python 3.9 and earlier does not print it for some reason...
output_without_log = proc.stdout.replace(
"Computing change points for test local.sample...", ""
)
# Python 3.9 complains about importlib.metadata.packages_distributions...
output_without_log = output_without_log.replace(
"An error occurred: module 'importlib.metadata' has no attribute 'packages_distributions'",
"",
)
assert _remove_trailing_whitespaces(output_without_log) == expected_output.rstrip("\n")
assert _remove_trailing_whitespaces(proc.stdout) == expected_output.rstrip("\n")


def test_regressions_csv():
Expand Down Expand Up @@ -214,16 +205,7 @@ def test_regressions_csv():
f"Stderr:\n{proc.stderr}\n"
)

# Python 3.9 and earlier does not print it for some reason...
output_without_log = proc.stdout.replace(
"Computing change points for test local.sample...", ""
)
# Python 3.9 complains about importlib.metadata.packages_distributions...
output_without_log = output_without_log.replace(
"An error occurred: module 'importlib.metadata' has no attribute 'packages_distributions'",
"",
)
assert _remove_trailing_whitespaces(output_without_log) == expected_output.rstrip("\n")
assert _remove_trailing_whitespaces(proc.stdout) == expected_output.rstrip("\n")


def _remove_trailing_whitespaces(s: str) -> str:
Expand Down
Loading