Skip to content
Draft
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
27 changes: 18 additions & 9 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,23 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff
python -m pip install build --group dev # ruff, pytest
- name: Lint with ruff
run: ruff check src
- name: Install package
run: pip install .
- name: Run doctests
run: python -m cocopp.test doctest # takes about 5 seconds
run: ruff check src tests
- name: Build wheel
# cocopp is pure python: the wheel is the same py3-none-any wheel for all versions
run: python -m build --wheel -o dist .
- name: Install package from wheel
run: pip install dist/*.whl
- name: Run tests
run: python -m cocopp.test # takes about 5 minutes
# - name: Run all tests
# run: python -m cocopp.test all # takes about 30 minutes
run: pytest tests # offline, including the full pipeline and snapshot tests, takes about 10 minutes
- name: Run tests using the online data archives
# the doctests, the archives, and the former default scenarios of python -m cocopp.test
run: pytest tests/network --run-network -k "not legacy"
# - name: Run all tests using the online data archives
# run: pytest tests/network --run-network # takes about 30 minutes
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wheel-python-${{ matrix.python-version }}
path: dist/*.whl
5 changes: 3 additions & 2 deletions .github/workflows/tag_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build source Python package
run: python -m build -s -o dist .
- name: Build source and wheel Python packages
# cocopp is pure python, hence a single py3-none-any wheel serves all Python versions
run: python -m build -o dist .
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Release
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ authors = [
]
description = "Benchmarking framework for all types of black-box optimization algorithms, postprocessing."
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
license = {text = "BSD-3-Clause"}
classifiers = [
"Development Status :: 4 - Beta",
Expand Down Expand Up @@ -71,5 +71,6 @@ ignore = ['E401', 'E402',

[dependency-groups]
dev = [
"pytest>=9.1.1",
"ruff>=0.14.3",
]
Loading
Loading