Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into remove-skopt-learner
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed May 29, 2024
2 parents 1ae273c + 68f1928 commit 19935e7
Show file tree
Hide file tree
Showing 72 changed files with 2,112 additions and 894 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/auto-changelog-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Generate Changelog

on:
# Manual trigger only
workflow_dispatch:
inputs:
branch:
description: 'Branch name'
required: true

jobs:
generate-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0

- name: Install github-changelog-generator
run: gem install github_changelog_generator

- name: Generate Changelog
run: |
github_changelog_generator \
-u ${{ github.repository_owner }} \
-p ${{ github.event.repository.name }} \
--token ${{ secrets.GITHUB_TOKEN }} \
--output CHANGELOG.md
- name: Commit updated CHANGELOG.md
id: commit
run: |
git add CHANGELOG.md
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if git diff --quiet && git diff --staged --quiet; then
echo "No changes in CHANGELOG.md, skipping commit."
echo "commit_status=skipped" >> $GITHUB_ENV
else
git commit -m "Update CHANGELOG.md"
echo "commit_status=committed" >> $GITHUB_ENV
fi
- name: Echo CHANGELOG.md
run: cat CHANGELOG.md

- name: Push changes
if: env.commit_status == 'committed'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.event.inputs.branch }}
12 changes: 6 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.11
- name: Install dependencies
run: pip install nox codecov
run: pip install nox
- name: Test with nox
run: nox -e coverage
- name: Upload test coverage
run: codecov -t ${{ secrets.CODECOV_TOKEN }} -f .coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
15 changes: 5 additions & 10 deletions .github/workflows/nox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,19 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set Python version for nox
run: echo "PY_VERSION=$(echo ${version})" >> $GITHUB_ENV
shell: bash
env:
version: ${{ matrix.python-version }}
- name: Register Python problem matcher
run: echo "::add-matcher::.github/workflows/matchers/pytest.json"
- name: Install dependencies
run: pip install nox pytest-github-actions-annotate-failures
- name: Test with nox using minimal dependencies
run: nox -e "pytest-${{ env.PY_VERSION }}(all_deps=False)"
run: nox -e "pytest-${{ matrix.python-version }}(all_deps=False)"
- name: Test with nox with all dependencies
run: nox -e "pytest-${{ env.PY_VERSION }}(all_deps=True)"
run: nox -e "pytest-${{ matrix.python-version }}(all_deps=True)"
14 changes: 0 additions & 14 deletions .github/workflows/pre-commit.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install setuptools wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
10 changes: 10 additions & 0 deletions .github/workflows/toc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
on: push
name: TOC Generator
jobs:
generateTOC:
name: TOC Generator
runs-on: ubuntu-latest
steps:
- uses: technote-space/toc-generator@v4
with:
TOC_TITLE: ""
9 changes: 5 additions & 4 deletions .github/workflows/typeguard.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: typeguard

on:
- push
# TODO: enable this once typeguard=4 is released and issues are fixed.
# on:
# - push

jobs:
typeguard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
Expand Down
24 changes: 17 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-yaml
- id: debug-statements
- id: check-ast
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.261"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.5"
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
hooks:
- id: nbqa-black
additional_dependencies: [jupytext, black]
- id: nbqa
args: ["ruff", "--fix", "--ignore=E402,B018,F704"]
additional_dependencies: [jupytext, ruff]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
hooks:
- id: mypy
exclude: ipynb_filter.py|docs/source/conf.py
2 changes: 1 addition & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Authors
## 👥 Authors

The current maintainers of Adaptive are:

Expand Down
99 changes: 90 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,101 @@
# Changelog
# 🗞️ Changelog

## [v0.15.0](https://github.com/python-adaptive/adaptive/tree/v0.15.0) (2022-11-30)
## [v.1.2.0](https://github.com/python-adaptive/adaptive/tree/v1.2.0) (2024-04-10)

[Full Changelog](https://github.com/python-adaptive/adaptive/compare/v0.14.2...v0.15.0)
[Full Changelog](https://github.com/python-adaptive/adaptive/compare/v1.1.0...HEAD)

**Closed issues:**

- Issues with Multiprocess and AsyncRunner in adaptive for Phase Diagram Illustration [\#449](https://github.com/python-adaptive/adaptive/issues/449)
- Create API for just signle process \(No pickle\) [\#442](https://github.com/python-adaptive/adaptive/issues/442)
- Handling with regions unreachable inside the `ConvexHull` in `LearnerND` [\#438](https://github.com/python-adaptive/adaptive/issues/438)
- Use in script with BlockingRunner: get log and/or feedback on progress [\#436](https://github.com/python-adaptive/adaptive/issues/436)

**Merged pull requests:**

- Test Python 3.12 and fix its installation [\#453](https://github.com/python-adaptive/adaptive/pull/453) ([basnijholt](https://github.com/basnijholt))
- \[pre-commit.ci\] pre-commit autoupdate [\#447](https://github.com/python-adaptive/adaptive/pull/447) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- Use ruff-format instead of black [\#446](https://github.com/python-adaptive/adaptive/pull/446) ([basnijholt](https://github.com/basnijholt))
- Bump versions to compatible packages in `docs/environment.yml` [\#445](https://github.com/python-adaptive/adaptive/pull/445) ([basnijholt](https://github.com/basnijholt))
- Add `AsyncRunner.block_until_done` [\#444](https://github.com/python-adaptive/adaptive/pull/444) ([basnijholt](https://github.com/basnijholt))
- Add `live_info_terminal`, closes \#436 [\#441](https://github.com/python-adaptive/adaptive/pull/441) ([basnijholt](https://github.com/basnijholt))
- \[pre-commit.ci\] pre-commit autoupdate [\#434](https://github.com/python-adaptive/adaptive/pull/434) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- Add benchmarks page for Learner1D and Learner2D functions [\#405](https://github.com/python-adaptive/adaptive/pull/405) ([basnijholt](https://github.com/basnijholt))

## [v1.1.0](https://github.com/python-adaptive/adaptive/tree/v1.1.0) (2023-08-14)

[Full Changelog](https://github.com/python-adaptive/adaptive/compare/v1.0.0...v1.1.0)

**Closed issues:**

- large delay when using start\_periodic\_saving [\#439](https://github.com/python-adaptive/adaptive/issues/439)
- Target function returns NaN [\#435](https://github.com/python-adaptive/adaptive/issues/435)

**Merged pull requests:**

- Ensure periodic saving fires immediately after runner task is finished [\#440](https://github.com/python-adaptive/adaptive/pull/440) ([jbweston](https://github.com/jbweston))
- Add Learner2D loss function 'thresholded\_loss\_factory' [\#437](https://github.com/python-adaptive/adaptive/pull/437) ([basnijholt](https://github.com/basnijholt))
- \[pre-commit.ci\] pre-commit autoupdate [\#433](https://github.com/python-adaptive/adaptive/pull/433) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- \[pre-commit.ci\] pre-commit autoupdate [\#431](https://github.com/python-adaptive/adaptive/pull/431) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- Add adaptive.utils.daskify [\#422](https://github.com/python-adaptive/adaptive/pull/422) ([basnijholt](https://github.com/basnijholt))

## [v1.0.0](https://github.com/python-adaptive/adaptive/tree/v1.0.0) (2023-05-15)

[Full Changelog](https://github.com/python-adaptive/adaptive/compare/v0.15.0...v1.0.0)

**Closed issues:**

- No module named 'typing\_extensions'" [\#394](https://github.com/python-adaptive/adaptive/issues/394)
- Documentation: use cases of coroutine by Learner and Runner not properly explained [\#360](https://github.com/python-adaptive/adaptive/issues/360)

**Merged pull requests:**

- Update CHANGELOG for v1.0.0 [\#429](https://github.com/python-adaptive/adaptive/pull/429) ([basnijholt](https://github.com/basnijholt))
- \[pre-commit.ci\] pre-commit autoupdate [\#426](https://github.com/python-adaptive/adaptive/pull/426) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- Allow storing the full sequence in SequenceLearner.to\_dataframe [\#425](https://github.com/python-adaptive/adaptive/pull/425) ([basnijholt](https://github.com/basnijholt))
- \[pre-commit.ci\] pre-commit autoupdate [\#423](https://github.com/python-adaptive/adaptive/pull/423) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- Add github-changelog-generator CI workflow [\#421](https://github.com/python-adaptive/adaptive/pull/421) ([basnijholt](https://github.com/basnijholt))
- Use versioningit to work with pyproject.toml and remove setup.py [\#420](https://github.com/python-adaptive/adaptive/pull/420) ([basnijholt](https://github.com/basnijholt))
- Update Python version requirement to 3.9 in accordance with NEP 29 [\#418](https://github.com/python-adaptive/adaptive/pull/418) ([basnijholt](https://github.com/basnijholt))
- Update GitHub Actions CI [\#416](https://github.com/python-adaptive/adaptive/pull/416) ([basnijholt](https://github.com/basnijholt))
- Disable typeguard CI pipeline [\#415](https://github.com/python-adaptive/adaptive/pull/415) ([basnijholt](https://github.com/basnijholt))
- Add mypy to pre-commit and fix all current typing issues [\#414](https://github.com/python-adaptive/adaptive/pull/414) ([basnijholt](https://github.com/basnijholt))
- \[pre-commit.ci\] pre-commit autoupdate [\#413](https://github.com/python-adaptive/adaptive/pull/413) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- Use codecov/codecov-action instead of removed codecov package [\#412](https://github.com/python-adaptive/adaptive/pull/412) ([basnijholt](https://github.com/basnijholt))
- Cache the loss of a SequenceLearner [\#411](https://github.com/python-adaptive/adaptive/pull/411) ([basnijholt](https://github.com/basnijholt))
- Only really import packages when needed [\#410](https://github.com/python-adaptive/adaptive/pull/410) ([basnijholt](https://github.com/basnijholt))
- Remove \_RequireAttrsABCMeta metaclass and replace with simple check [\#409](https://github.com/python-adaptive/adaptive/pull/409) ([basnijholt](https://github.com/basnijholt))
- Use the build module [\#407](https://github.com/python-adaptive/adaptive/pull/407) ([basnijholt](https://github.com/basnijholt))
- Avoid asyncio.coroutine error in Readthedocs.org builds [\#406](https://github.com/python-adaptive/adaptive/pull/406) ([basnijholt](https://github.com/basnijholt))
- Bump scikit-optimize in environment.yml [\#403](https://github.com/python-adaptive/adaptive/pull/403) ([basnijholt](https://github.com/basnijholt))
- Replace isort, flake8, and pyupgrade by ruff [\#402](https://github.com/python-adaptive/adaptive/pull/402) ([basnijholt](https://github.com/basnijholt))
- Move to pyproject.toml based install [\#401](https://github.com/python-adaptive/adaptive/pull/401) ([basnijholt](https://github.com/basnijholt))
- Rewrite parts of README, reorder sections, and add features section [\#400](https://github.com/python-adaptive/adaptive/pull/400) ([basnijholt](https://github.com/basnijholt))
- \[pre-commit.ci\] pre-commit autoupdate [\#398](https://github.com/python-adaptive/adaptive/pull/398) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- \[pre-commit.ci\] pre-commit autoupdate [\#397](https://github.com/python-adaptive/adaptive/pull/397) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- Use nb\_execution\_raise\_on\_error Sphinx myst-nb option [\#396](https://github.com/python-adaptive/adaptive/pull/396) ([basnijholt](https://github.com/basnijholt))
- \[pre-commit.ci\] pre-commit autoupdate [\#395](https://github.com/python-adaptive/adaptive/pull/395) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- \[pre-commit.ci\] pre-commit autoupdate [\#393](https://github.com/python-adaptive/adaptive/pull/393) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- \[pre-commit.ci\] pre-commit autoupdate [\#392](https://github.com/python-adaptive/adaptive/pull/392) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci))
- Add nbQA for notebook and docs linting [\#361](https://github.com/python-adaptive/adaptive/pull/361) ([basnijholt](https://github.com/basnijholt))
- Fix HoloViews opts deprecation warnings [\#357](https://github.com/python-adaptive/adaptive/pull/357) ([basnijholt](https://github.com/basnijholt))

## [v0.15.0](https://github.com/python-adaptive/adaptive/tree/v0.15.0) (2022-12-02)

[Full Changelog](https://github.com/python-adaptive/adaptive/compare/v0.15.1...v0.15.0)

## [v0.15.1](https://github.com/python-adaptive/adaptive/tree/v0.15.1) (2022-12-02)

[Full Changelog](https://github.com/python-adaptive/adaptive/compare/v0.14.2...v0.15.1)

**Closed issues:**

- Fix branch name \(master --\> main\) in binder link in readme [\#383](https://github.com/python-adaptive/adaptive/issues/383)

**Merged pull requests:**

- Add support for Python 3.11 and test on it [\#387](https://github.com/python-adaptive/adaptive/pull/387) ([basnijholt](https://github.com/basnijholt))
- Rename master -\> main [\#384](https://github.com/python-adaptive/adaptive/pull/384) ([basnijholt](https://github.com/basnijholt))
- Add loss\_goal, npoints\_goal, and an auto\_goal function and use it in the runners [\#382](https://github.com/python-adaptive/adaptive/pull/382) ([basnijholt](https://github.com/basnijholt))
- Add type-hints to Runner [\#370](https://github.com/python-adaptive/adaptive/pull/370) ([basnijholt](https://github.com/basnijholt))
- Add docs section about executing coroutines [\#364](https://github.com/python-adaptive/adaptive/pull/364) ([juandaanieel](https://github.com/juandaanieel))

## [v0.14.2](https://github.com/python-adaptive/adaptive/tree/v0.14.2) (2022-10-14)
Expand Down Expand Up @@ -198,7 +280,7 @@
- bump pre-commit filter dependencies [\#293](https://github.com/python-adaptive/adaptive/pull/293) ([basnijholt](https://github.com/basnijholt))
- fix docs [\#291](https://github.com/python-adaptive/adaptive/pull/291) ([basnijholt](https://github.com/basnijholt))
- update to miniver 0.7.0 [\#290](https://github.com/python-adaptive/adaptive/pull/290) ([basnijholt](https://github.com/basnijholt))
- add `runner.live\_plot\(\)` in README example [\#288](https://github.com/python-adaptive/adaptive/pull/288) ([basnijholt](https://github.com/basnijholt))
- add `runner.live_plot()` in README example [\#288](https://github.com/python-adaptive/adaptive/pull/288) ([basnijholt](https://github.com/basnijholt))
- Update pre commit [\#287](https://github.com/python-adaptive/adaptive/pull/287) ([basnijholt](https://github.com/basnijholt))
- Use m2r2 [\#286](https://github.com/python-adaptive/adaptive/pull/286) ([basnijholt](https://github.com/basnijholt))
- temporarily pin scikit-learn\<=0.23.1 [\#285](https://github.com/python-adaptive/adaptive/pull/285) ([basnijholt](https://github.com/basnijholt))
Expand Down Expand Up @@ -243,7 +325,6 @@

**Closed issues:**


- add minimum number of points parameter to AverageLearner [\#273](https://github.com/python-adaptive/adaptive/issues/273)
- Release v0.10 [\#258](https://github.com/python-adaptive/adaptive/issues/258)

Expand Down Expand Up @@ -433,7 +514,7 @@
- Gracefully handle exceptions when evaluating the function to be learned [\#125](https://github.com/python-adaptive/adaptive/issues/125)
- Allow BalancingLearner to return arbitrary number of points from 'choose\_points' [\#124](https://github.com/python-adaptive/adaptive/issues/124)
- Increase the default refresh rate for 'live\_plot' [\#120](https://github.com/python-adaptive/adaptive/issues/120)
- remove default number of points to choose in `choose\_points` [\#118](https://github.com/python-adaptive/adaptive/issues/118)
- remove default number of points to choose in `choose_points` [\#118](https://github.com/python-adaptive/adaptive/issues/118)
- Consider using Gaussian process optimization as a learner [\#115](https://github.com/python-adaptive/adaptive/issues/115)
- Make `distributed.Client` work with automatic scaling of the cluster [\#104](https://github.com/python-adaptive/adaptive/issues/104)
- Improve plotting for learners [\#83](https://github.com/python-adaptive/adaptive/issues/83)
Expand Down Expand Up @@ -520,7 +601,7 @@
- Remove public 'fname' learner attribute [\#17](https://github.com/python-adaptive/adaptive/issues/17)
- Release v0.7.0 [\#14](https://github.com/python-adaptive/adaptive/issues/14)
- \(Learner1D\) improve time complexity [\#13](https://github.com/python-adaptive/adaptive/issues/13)
- Typo in documentation for` adaptive.learner.learner2D.uniform\_loss\(ip\)` [\#12](https://github.com/python-adaptive/adaptive/issues/12)
- Typo in documentation for` adaptive.learner.learner2D.uniform_loss(ip)` [\#12](https://github.com/python-adaptive/adaptive/issues/12)
- \(LearnerND\) fix plotting of scaled domains [\#11](https://github.com/python-adaptive/adaptive/issues/11)
- suggested points lie outside of domain [\#7](https://github.com/python-adaptive/adaptive/issues/7)
- DEVELOPMENT IS ON GITLAB: https://gitlab.kwant-project.org/qt/adaptive [\#5](https://github.com/python-adaptive/adaptive/issues/5)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2017-2021, Adaptive authors
Copyright (c) 2017-2023, Adaptive authors
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
Loading

0 comments on commit 19935e7

Please sign in to comment.