Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pyproject.toml instead of setup.py #22

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "optimparallel"
version = "0.1.4"
authors = [{ name = "Florian Gerber", email = "flora.fauna.gerber@gmail.com" }, {name = "Lewis Blake"}]
description = "A parallel version of the L-BFGS-B optimizer of scipy.optimize.minimize()."
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Development Status :: 3 - Alpha",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Mathematics",
]
requires-python = ">=3.9"
dependencies = [
"scipy",
"numpy",
]

[project.readme]
file = "README.md"
content-type = "text/markdown"

[project.urls]
Homepage = "https://github.com/florafauna/optimParallel-python"
"Bug Tracker" = "https://github.com/florafauna/optimParallel-python/issues"
"Source Code" = "https://github.com/florafauna/optimParallel-python"

[project.optional-dependencies]
test = [
"pytest",
]
lint = ["mypy", "black"]
dev = ["pytest-sugar"]

# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
# skipsdist = true
envlist = """
# py
py39
py310
py311
py312
# pypy"""

[testenv]
deps = """
pytest
numpy
scipy"""
commands = "pytest"
29 changes: 0 additions & 29 deletions setup.py

This file was deleted.

7 changes: 4 additions & 3 deletions src/optimparallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- optimparallel: same as `minimize_parallel()`
- fmin_l_bfgs_b_parallel: parallel version of `scipy.optimize.fmin_l_bfgs_b()`
"""

from __future__ import annotations

import warnings
Expand Down Expand Up @@ -420,9 +421,9 @@ def minimize_parallel(
if parallel_used.get("loginfo"):
out.loginfo = {
k: (
lambda x: np.array(x)
if isinstance(x[0], list)
else np.array(x)[np.newaxis].T
lambda x: (
np.array(x) if isinstance(x[0], list) else np.array(x)[np.newaxis].T
)
)(v)
for k, v in fun_jac.info.items()
}
Expand Down
21 changes: 0 additions & 21 deletions tox.ini

This file was deleted.

Loading