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

Add pyproject.toml #84

Merged
merged 15 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 14 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
8 changes: 6 additions & 2 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ jobs:
with:
path: micro-manager

- name: Install Micro Manager and uninstall pyprecice
working-directory: micro-manager
- name: Install dependencies
run: |
apt-get -qq update
apt-get -qq install python3-dev python3-pip git python-is-python3 pkg-config
pip3 install --upgrade pip
- name: Install Micro Manager and uninstall pyprecice
working-directory: micro-manager
run: |
pip3 install --user .
pip3 uninstall -y pyprecice
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## latest

- Use `pyproject.toml` instead of `setup.py` to configure the build. Package name is now `micro_manager_precice` https://github.com/precice/micro-manager/pull/84
- Add handling of crashing micro simulations https://github.com/precice/micro-manager/pull/85
- Add switch to turn adaptivity on and off in configuration https://github.com/precice/micro-manager/pull/93

Expand Down
43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[build-system]
requires = ["setuptools>=41", "wheel", "setuptools-git-versioning"]
build-backend = "setuptools.build_meta"

[project]
name="micro-manager-precice"
dynamic = [ "version" ]
dependencies = [
"pyprecice>=3.0.0.0", "numpy", "mpi4py", "scikit-learn"
IshaanDesai marked this conversation as resolved.
Show resolved Hide resolved
]
requires-python = ">=3.8"
authors = [
{ name = "The preCICE Developers", email="info@precice.org"}
]
maintainers = [
{ name = "Ishaan Desai", email="ishaan.desai@ipvs.uni-stuttgart.de"}
]
description="A tool which facilitates two-scale macro-micro coupled simulations using preCICE."
readme = "README.md"
license={ text = "GPLv3" }
keywords = [ "preCICE", "multiscale", "coupling" ]
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering",
]

[project.urls]
Homepage = "https://precice.org"
Documentation = "https://precice.org/tooling-micro-manager-overview.html"
Repository = "https://github.com/precice/micro-manager"
"Bug Tracker" = "https://github.com/precice/micro-manager/issues"

[project.scripts]
micro_manager_precice = "micro_manager.micro_manager:main"
IshaanDesai marked this conversation as resolved.
Show resolved Hide resolved

[tool.setuptools]
packages=["micro_manager", "micro_manager.adaptivity"]

[tool.setuptools-git-versioning]
enabled = true
36 changes: 2 additions & 34 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
import os
from setuptools import setup

# from https://stackoverflow.com/a/9079062
import sys

from setuptools import find_packages, setup

if sys.version_info[0] < 3:
raise Exception(
"micromanager only supports Python3. Did you run $python setup.py <option>.? "
"Try running $python3 setup.py <option>."
)

this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()

setup(
name="micro-manager-precice",
version="v0.4.0",
description="micro-manager-precice is a package which facilitates two-scale macro-micro coupled simulations using preCICE",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://precice.org/tooling-micro-manager-overview.html",
entry_points={
"console_scripts": ["micro_manager=micro_manager.micro_manager:main"]
},
author="Ishaan Desai",
author_email="ishaan.desai@uni-stuttgart.de",
license="LGPL-3.0",
packages=find_packages(exclude=["examples"]),
install_requires=["pyprecice>=3.0.0.0", "numpy>=1.13.3", "scikit-learn", "mpi4py"],
test_suite="tests",
zip_safe=False,
)
setup()