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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ci:

repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.3.9017
rev: v0.4.3.9020
hooks:
- id: parsable-R
- id: no-browser-statement
Expand Down Expand Up @@ -45,19 +45,19 @@ repos:
exclude: '(\.Rd|python/doc/source/reference/.*|test-doctest-.*)'

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.7.0"
rev: "1.7.1"
hooks:
- id: tox-ini-fmt

- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.11.0"
rev: "v2.16.0"
hooks:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.12.1"]

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.3
rev: v0.15.1
hooks:
# Run the formatter.
- id: ruff-format
Expand All @@ -69,6 +69,6 @@ repos:
require_serial: true

- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.1
rev: v1.0.2
hooks:
- id: sphinx-lint
5 changes: 3 additions & 2 deletions python/benchmarks/bench_hv.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@
"moarchiving (float)": lambda z, ref=ref: float(
moarch_get_mo_archive(z, reference_point=ref).hypervolume
),
"botorch": lambda z,
hv=botorch_HV(ref_point=torch.from_numpy(-ref)): hv.compute(z),
"botorch": lambda z, hv=botorch_HV(ref_point=torch.from_numpy(-ref)): (
hv.compute(z)
),
"fast_pareto": lambda z, ref=ref: fp_hv(
z, ref_point=ref, assume_pareto=False
),
Expand Down
100 changes: 49 additions & 51 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ keywords = [
]
license = "LGPL-2.1-or-later"
license-files = [ "COPYRIGHTS" ]
authors = [
{ name = "Manuel López-Ibáñez", email = "manuel.lopez-ibanez@manchester.ac.uk" },
{ name = "Fergus Rooney", email = "fergus.rooney@outlook.com" },
{ name = "Lennart Schäpermeier", email = "lennart.schaepermeier@uni-muenster.de" },
]
requires-python = ">=3.10"
classifiers = [
"Intended Audience :: Science/Research",
Expand All @@ -41,8 +36,17 @@ dependencies = [
"numpy>=1.24",
"platformdirs",
]

optional-dependencies.benchmarks = [
[[project.authors]]
name = "Manuel López-Ibáñez"
email = "manuel.lopez-ibanez@manchester.ac.uk"
[[project.authors]]
name = "Fergus Rooney"
email = "fergus.rooney@outlook.com"
[[project.authors]]
name = "Lennart Schäpermeier"
email = "lennart.schaepermeier@uni-muenster.de"
[project.optional-dependencies]
benchmarks = [
"botorch",
"desdeo",
"fast-pareto",
Expand All @@ -59,13 +63,12 @@ optional-dependencies.benchmarks = [
"pymoo",
"seqme",
]

optional-dependencies.coverage = [
coverage = [
"coverage[toml]",
"gcovr",
]
optional-dependencies.dev = [ "pre-commit>=3.3.2", "ruff>=0.11.2", "tox>=4.6.2" ]
optional-dependencies.docs = [
dev = [ "pre-commit>=3.3.2", "ruff>=0.11.2", "tox>=4.6.2" ]
docs = [
"ipykernel",
"ipywidgets",
"jupyter",
Expand All @@ -83,19 +86,19 @@ optional-dependencies.docs = [
"sphinxcontrib-bibtex",
"sphinxcontrib-napoleon",
]
optional-dependencies.test = [
test = [
"pandas>=2",
"pytest>7",
]
urls.Documentation = "https://multi-objective.github.io/moocore/python/"
urls.Homepage = "https://multi-objective.github.io/moocore/python/"
urls.Source = "https://github.com/multi-objective/moocore/"
urls.Tracker = "https://github.com/multi-objective/moocore/issues"
[project.urls]
Documentation = "https://multi-objective.github.io/moocore/python/"
Homepage = "https://multi-objective.github.io/moocore/python/"
Source = "https://github.com/multi-objective/moocore/"
Tracker = "https://github.com/multi-objective/moocore/issues"

[tool.setuptools]
zip-safe = false
package-dir = { "" = "src" }

[tool.setuptools.package-data]
"*" = [ "*.c", "*.h" ]
"moocore.data" = [ "*.txt", "*.dat", "*.xz", "*.csv", "*.10" ]
Expand All @@ -116,8 +119,7 @@ test-extras = [ "test" ]
test-command = [
"pytest --doctest-modules --doctest-continue-on-failure {package}/tests {package}/src/moocore/_moocore.py",
]
#test-skip = "*-*linux_{aarch64,ppc64le,s390x}"

# test-skip = "*-*linux_{aarch64,ppc64le,s390x}"
[tool.cibuildwheel.linux]
archs = [ "native" ]
manylinux-x86_64-image = "manylinux_2_28"
Expand All @@ -130,7 +132,13 @@ repair-wheel-command = [
"auditwheel repair -w {dest_dir} {wheel}",
"abi3audit --verbose --strict --report {wheel}",
]

[tool.cibuildwheel.macos]
archs = [ "universal2" ]
before-build = "pip install abi3audit"
repair-wheel-command = [
"delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}",
"abi3audit --verbose --strict --report {wheel}",
]
[tool.cibuildwheel.windows]
archs = [ "native" ]
# Use delvewheel on windows
Expand All @@ -140,19 +148,13 @@ repair-wheel-command = [
"abi3audit --verbose --strict --report {wheel}",
]

[tool.cibuildwheel.macos]
archs = [ "universal2" ]
before-build = "pip install abi3audit"
repair-wheel-command = [
"delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}",
"abi3audit --verbose --strict --report {wheel}",
]

[tool.ruff]
line-length = 80
format.docstring-code-line-length = 80
format.docstring-code-format = true
lint.extend-select = [
[tool.ruff.format]
docstring-code-line-length = 80
docstring-code-format = true
[tool.ruff.lint]
extend-select = [
"D", # pydocstyle
"D402", # no-signature
"D415", # ends-in-punctuation
Expand All @@ -163,31 +165,27 @@ lint.extend-select = [
"RUF",
"UP",
]
lint.ignore = [
ignore = [
"D203", # one-blank-line-before-class
"D213", # multi-line-summary-second-line
]

lint.extend-per-file-ignores."*benchmarks*/*.py" = [
extend-per-file-ignores."*benchmarks*/*.py" = [
"D",
"N806", # non-lowercase-variable-in-function
"N813",
]

lint.extend-per-file-ignores."*examples*/*.py" = [
extend-per-file-ignores."*examples*/*.py" = [
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
"D415", # First line should end with a period, question mark, or exclamation point
"D415", # First line should end with a period, question mark, or exclamation point
"E402", # Module level import not at top of file
]

lint.extend-per-file-ignores."*tests*/*.py" = [
extend-per-file-ignores."*tests*/*.py" = [
"N806", # non-lowercase-variable-in-function
]

lint.pycodestyle.max-doc-length = 80
lint.pycodestyle.max-line-length = 80
lint.pydocstyle.convention = "numpy"
pycodestyle.max-doc-length = 80
pycodestyle.max-line-length = 80
pydocstyle.convention = "numpy"

[tool.pyproject-fmt]
# Table format: "short" collapses sub-tables to dotted keys, "long" expands to [table.subtable] headers
Expand All @@ -200,10 +198,10 @@ addopts = [ "--import-mode=importlib", "--durations=5", "--durations-min=1.0" ]

[tool.coverage.report]
exclude_also = [
'.*(?:#|//)\s+nocov',
'.* ASSUME\s?\(.+\);',
'.* unreachable\s?\(\);',
'.*(?:GCOVR?|LCOV)_EXCL_LINE',
".*(?:#|//)\\s+nocov",
".* ASSUME\\s?\\(.+\\);",
".* unreachable\\s?\\(\\);",
".*(?:GCOVR?|LCOV)_EXCL_LINE",
]

[tool.mypy]
Expand All @@ -226,8 +224,8 @@ files = [ "src/" ]

[tool.gcovr]
exclude-lines-by-pattern = [
'.*(?:#|//)\s+nocov',
'.* ASSUME\s?\(.+\);',
'.* unreachable\s?\(\);',
'.*(?:GCOVR?|LCOV)_EXCL_LINE',
".*(?:#|//)\\s+nocov",
".* ASSUME\\s?\\(.+\\);",
".* unreachable\\s?\\(\\);",
".*(?:GCOVR?|LCOV)_EXCL_LINE",
]