Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into sphinx_autodoc_typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Dec 4, 2022
2 parents 85ed5cc + 6c69e88 commit 66967c3
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typeguard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: pip install nox
- name: Test with nox
Expand Down
55 changes: 51 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,61 @@
# Changelog

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

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

**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)

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

**Closed issues:**

- Rename master branch to main [\#368](https://github.com/python-adaptive/adaptive/issues/368)

**Merged pull requests:**

- Avoid uncecessary iteration in SequenceLearner [\#380](https://github.com/python-adaptive/adaptive/pull/380) ([jbweston](https://github.com/jbweston))
- Use numbers module from stdlib as type [\#379](https://github.com/python-adaptive/adaptive/pull/379) ([basnijholt](https://github.com/basnijholt))
- Add type-hints to tests and misc [\#378](https://github.com/python-adaptive/adaptive/pull/378) ([basnijholt](https://github.com/basnijholt))
- Add type-hints to Learner2D [\#375](https://github.com/python-adaptive/adaptive/pull/375) ([basnijholt](https://github.com/basnijholt))
- Add type-hints to DataSaver [\#373](https://github.com/python-adaptive/adaptive/pull/373) ([basnijholt](https://github.com/basnijholt))
- Type hint IntegratorLearner [\#372](https://github.com/python-adaptive/adaptive/pull/372) ([basnijholt](https://github.com/basnijholt))
- Add type-hints to BalancingLearner [\#371](https://github.com/python-adaptive/adaptive/pull/371) ([basnijholt](https://github.com/basnijholt))
- Optionally run tests with pandas [\#369](https://github.com/python-adaptive/adaptive/pull/369) ([basnijholt](https://github.com/basnijholt))
- Typehint SequenceLearner [\#366](https://github.com/python-adaptive/adaptive/pull/366) ([basnijholt](https://github.com/basnijholt))

## [v0.14.1](https://github.com/python-adaptive/adaptive/tree/v0.14.1) (2022-10-11)

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

**Merged pull requests:**

- Use typing.TypeAlias [\#367](https://github.com/python-adaptive/adaptive/pull/367) ([basnijholt](https://github.com/basnijholt))
- Add Learner.new\(\) method that returns an empty copy of the learner [\#365](https://github.com/python-adaptive/adaptive/pull/365) ([basnijholt](https://github.com/basnijholt))

## [v0.14.0](https://github.com/python-adaptive/adaptive/tree/v0.14.0) (2022-10-05)

[Full Changelog](https://github.com/python-adaptive/adaptive/compare/v0.14.0...HEAD)
[Full Changelog](https://github.com/python-adaptive/adaptive/compare/v0.13.2...v0.14.0)

**Closed issues:**

- Stop using atomic writes [\#352](https://github.com/python-adaptive/adaptive/issues/352)

**Merged pull requests:**

- Release 0.14 [\#363](https://github.com/python-adaptive/adaptive/pull/363) ([basnijholt](https://github.com/basnijholt))
- Allow to periodically save with any function [\#362](https://github.com/python-adaptive/adaptive/pull/362) ([basnijholt](https://github.com/basnijholt))
- Update pre-commit versions [\#359](https://github.com/python-adaptive/adaptive/pull/359) ([basnijholt](https://github.com/basnijholt))
- Add getting learner's data as pandas.DataFrame; add learner.to\_dataframe method [\#358](https://github.com/python-adaptive/adaptive/pull/358) ([basnijholt](https://github.com/basnijholt))
Expand Down Expand Up @@ -152,7 +198,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 @@ -197,6 +243,7 @@

**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 @@ -386,7 +433,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 @@ -473,7 +520,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
8 changes: 3 additions & 5 deletions adaptive/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,11 +932,9 @@ def replay_log(
# -- Internal executor-related, things


def _ensure_executor(
executor: ExecutorTypes | None,
) -> concurrent.Executor:
def _ensure_executor(executor: ExecutorTypes | None) -> concurrent.Executor:
if executor is None:
executor = concurrent.ProcessPoolExecutor()
executor = _default_executor()

if isinstance(executor, concurrent.Executor):
return executor
Expand Down Expand Up @@ -979,7 +977,7 @@ def _get_ncores(

# TODO: deprecate
def stop_after(
*, seconds: float = 0, minutes: float = 0, hours: float = 0
*, seconds: float = 0.0, minutes: float = 0.0, hours: float = 0.0
) -> Callable[[BaseLearner], bool]:
"""Stop a runner after a specified time.
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import nox


@nox.session(python=["3.7", "3.8", "3.9", "3.10"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
@nox.parametrize("all_deps", [True, False])
def pytest(session, all_deps):
session.install(".[testing,other]" if all_deps else ".[testing]")
session.run("coverage", "erase")
session.run("pytest")


@nox.session(python="3.10")
@nox.session(python="3.11")
def pytest_typeguard(session):
session.install(".[testing,other]")
session.run("coverage", "erase")
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def get_version_and_cmdclass(package_name):
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
packages=find_packages("."),
install_requires=install_requires,
Expand Down

0 comments on commit 66967c3

Please sign in to comment.