-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add pyproject.toml, with pixi as project management tool. add pixi.lock #1459
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9adea69
add pyproject.toml, with pixi as project management tool. add pixi.lock
jlnav b10c99e
add necessary deps to normal dependency tag so pip should work. remov…
jlnav 640923f
typo
jlnav ae1c3c2
specify to setuptools the libensemble src dir
jlnav cf501b6
python/pip shouldn't need to be specified as pypi packages
jlnav ba563de
put back pip
jlnav 76ab6aa
fix setuptools packaging target
jlnav e5487ae
we still need a minimal 2-line setup.py for package building. tiny ad…
jlnav 393f9d4
move .black and .typos.toml config to pyproject.toml
jlnav 04b07c2
remove pixi.lock. will investigate git-lfs solution in the future
jlnav 559d416
Merge branch 'develop' into refactor/pyprojecttoml
jlnav 8324014
add python 3.13 to pyproject.toml
jlnav 61fb6b8
move build dependencies under build-system, rearrange other dependencies
jlnav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,4 @@ dist/ | |
.spyproject/ | ||
|
||
.hypothesis | ||
.pixi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include pyproject.toml | ||
include setup.py | ||
include *.cfg | ||
include *.rst | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
[project] | ||
|
||
authors = [{name = "Jeffrey Larson"}, {name = "Stephen Hudson"}, | ||
{name = "Stefan M. Wild"}, {name = "David Bindel"}, | ||
{name = "John-Luke Navarro"}] | ||
|
||
dependencies = ["numpy", "psutil", "pydantic", "pyyaml", "tomli"] | ||
|
||
description = "A Python toolkit for coordinating asynchronous and dynamic ensembles of calculations." | ||
name = "libensemble" | ||
requires-python = ">=3.9" | ||
license = {file = "LICENSE"} | ||
readme = "README.rst" | ||
|
||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Natural Language :: English", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: Unix", | ||
"Operating System :: MacOS", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
version = "1.4.3+dev" | ||
|
||
[project.urls] | ||
Documentation = "https://libensemble.readthedocs.io/en/main/" | ||
Repository = "https://github.com/Libensemble/libensemble" | ||
Issues = "https://github.com/Libensemble/libensemble/issues" | ||
|
||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["setuptools", "wheel", "pip>=24.3.1,<25", "setuptools>=75.1.0,<76", ] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["."] | ||
include = ["libensemble*"] | ||
|
||
[tool.pixi.project] | ||
channels = ["conda-forge"] | ||
platforms = ["osx-arm64", "linux-64", "osx-64"] | ||
|
||
[tool.pixi.pypi-dependencies] | ||
libensemble = { path = ".", editable = true } | ||
|
||
[tool.pixi.environments] | ||
default = [] | ||
dev = ["dev"] | ||
|
||
[tool.pixi.feature.dev.dependencies] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thinking lower bounds should be based on what we support. Or if we want to be latest, maybe make a comment to that effect. |
||
mpi = ">=1.0.1,<2" | ||
mpich = ">=4.2.3,<5" | ||
mpi4py = ">=4.0.1,<5" | ||
flake8 = ">=7.1.1,<8" | ||
coverage = ">=7.6.4,<8" | ||
pytest = ">=8.3.3,<9" | ||
pytest-cov = ">=5.0.0,<6" | ||
pytest-timeout = ">=2.3.1,<3" | ||
mock = ">=5.1.0,<6" | ||
python-dateutil = ">=2.9.0,<3" | ||
anyio = ">=4.6.2.post1,<5" | ||
matplotlib = ">=3.9.2,<4" | ||
mpmath = ">=1.3.0,<2" | ||
rich = ">=13.9.3,<14" | ||
sphinx = ">=8.1.3,<9" | ||
sphinxcontrib-bibtex = ">=2.6.3,<3" | ||
sphinxcontrib-spelling = ">=4.3.0,<5" | ||
sphinx-design = ">=0.6.1,<0.7" | ||
sphinx_rtd_theme = ">=3.0.1,<4" | ||
sphinx-copybutton = ">=0.5.2,<0.6" | ||
pre-commit = ">=4.0.1,<5" | ||
nlopt = ">=2.8.0,<3" | ||
scipy = ">=1.9.1,<2" | ||
|
||
[tool.pixi.dependencies] | ||
python = ">=3.9,<3.14" | ||
pip = ">=24.3.1,<25" | ||
setuptools = ">=75.1.0,<76" | ||
numpy = ">=1.21,<3" | ||
pydantic = ">=1.10,<3" | ||
pyyaml = ">=6.0,<7" | ||
tomli = ">=1.2.1,<3" | ||
psutil = ">=5.9.4,<7" | ||
|
||
[tool.pixi.target.osx-arm64.dependencies] | ||
clang_osx-arm64 = ">=19.1.2,<20" | ||
|
||
[tool.black] | ||
line-length = 120 | ||
target-version = ['py39', 'py310', 'py311', 'py312', 'py313'] | ||
force-exclude = ''' | ||
( | ||
/( | ||
| \.git | ||
| \.github | ||
)/ | ||
| libensemble/files/to/avoid | ||
) | ||
''' | ||
|
||
[tool.typos.default] | ||
extend-ignore-identifiers-re = [ | ||
".*NDArray.*", | ||
"8ba9de56.*" | ||
] | ||
|
||
[tool.typos.default.extend-words] | ||
als = "als" | ||
datas = "datas" | ||
numer = "numer" | ||
inout = "inout" | ||
arange = "arange" | ||
wrk = "wrk" | ||
EOF = "EOF" | ||
HPE = "HPE" | ||
RO = "RO" | ||
lst = "lst" | ||
noy = "noy" | ||
|
||
[tool.typos.files] | ||
extend-exclude = ["*.bib", "*.xml", "docs/nitpicky"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,115 +1,3 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# This is for setting up libEnsemble, license and details can be | ||
# found at https://github.com/Libensemble/libensemble/ | ||
|
||
"""libEnsemble | ||
|
||
libEnsemble is a Python toolkit for coordinating workflows of asynchronous | ||
and dynamic ensembles of calculations. | ||
|
||
libEnsemble can help users take advantage of massively parallel resources to | ||
solve design, decision, and inference problems and expand the class of | ||
problems that can benefit from increased parallelism. | ||
|
||
""" | ||
|
||
from pathlib import Path | ||
|
||
from setuptools import setup | ||
from setuptools.command.test import test as TestCommand | ||
|
||
exec(open("libensemble/version.py").read()) | ||
|
||
|
||
class Run_TestSuite(TestCommand): | ||
def run_tests(self): | ||
import os | ||
import sys | ||
|
||
py_version = sys.version_info[0] | ||
print("Python version from setup.py is", py_version) | ||
run_string = "libensemble/tests/run-tests.sh -p " + str(py_version) | ||
os.system(run_string) | ||
|
||
|
||
class ToxTest(TestCommand): | ||
user_options = [] | ||
|
||
def initialize_options(self): | ||
TestCommand.initialize_options(self) | ||
|
||
def run_tests(self): | ||
import tox | ||
|
||
tox.cmdline() | ||
|
||
|
||
setup( | ||
name="libensemble", | ||
version=__version__, | ||
description="Library to coordinate the concurrent evaluation of dynamic ensembles of calculations", | ||
long_description=Path("README.rst").read_text(encoding="utf-8"), | ||
url="https://github.com/Libensemble/libensemble", | ||
author="Jeffrey Larson, Stephen Hudson, Stefan M. Wild, David Bindel and John-Luke Navarro", | ||
author_email="libensemble@lists.mcs.anl.gov", | ||
license="BSD 3-clause", | ||
packages=[ | ||
"libensemble", | ||
"libensemble.gen_funcs", | ||
"libensemble.sim_funcs", | ||
"libensemble.sim_funcs.branin", | ||
"libensemble.alloc_funcs", | ||
"libensemble.tests", | ||
"libensemble.comms", | ||
"libensemble.utils", | ||
"libensemble.tools", | ||
"libensemble.tools.live_data", | ||
"libensemble.executors", | ||
"libensemble.resources", | ||
"libensemble.tests.unit_tests", | ||
"libensemble.tests.regression_tests", | ||
], | ||
install_requires=["numpy>=1.21", "psutil>=5.9.4", "pydantic>=1.10", "tomli>=1.2.1", "pyyaml>=6.0"], | ||
# numpy - oldest working version. psutil - oldest working version. | ||
# pyyaml - oldest working version. | ||
# If run tests through setup.py - downloads these but does not install | ||
tests_require=[ | ||
"pytest>=3.1", | ||
"pytest-cov>=2.5", | ||
"pytest-pep8>=1.0", | ||
"pytest-timeout", | ||
"mock", | ||
], | ||
extras_require={ | ||
"docs": [ | ||
"autodoc_pydantic", | ||
"sphinx<9", | ||
"sphinx_design", | ||
"sphinx_rtd_theme", | ||
"sphinxcontrib-bibtex", | ||
"sphinxcontrib-spelling", | ||
"sphinx-copybutton", | ||
], | ||
}, | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Natural Language :: English", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: Unix", | ||
"Operating System :: MacOS", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
], | ||
cmdclass={"test": Run_TestSuite, "tox": ToxTest}, | ||
) | ||
setup() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now support Python 3.13 - make sure any updates to setup.py are put in here.