Skip to content

Commit

Permalink
reorganizing dependencies, adding optinal deps, and adjusting workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gbomarito committed Nov 4, 2024
1 parent 80153f8 commit 6a90bfc
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/performance_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python 3.12
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: 3.12
python-version: "3.x"
- name: Install MPI
uses: mpi4py/setup-mpi@v1
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: 3.12
python-version: "3.x"
- name: Install MPI
run: |
sudo apt-get update
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: mpi4py/setup-mpi@v1
- name: Build using pip
run: |
pip install .
pip install .[ONNX,TESTS]
- name: Set safe forking var
run: |
echo "RDMAV_FORK_SAFE=1" >> $GITHUB_ENV
Expand Down Expand Up @@ -51,9 +51,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-mock
pip install coveralls
pip install build
pip install -r requirements.txt
- name: Build bingocpp
run: |
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-mock
pip install coverage
pip install coveralls
pip install -r requirements.txt
- name: Set pythonpath
Expand Down
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,28 @@ requires = [
]
build-backend = "setuptools.build_meta"

[project]
dependencies = [
"mpi4py>=2.0.0,<4.0",
"numpy",
"scipy",
"dill",
"sympy",
"scikit-learn",
"smcpy",
"pybind11[global]",
]

[project.optional-dependencies]
ONNX = ["onnx"]
TESTS = [
"pytest",
"pytest-mock",
"pytest-timeout",
"pytest-cov",
"coverage",
"coveralls"
]

[tool.cibuildwheel]
skip = "pp*"
15 changes: 10 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# h5py==2.7.0
# matplotlib==2.2.3
# main
mpi4py>=2.0.0,<4.0
numpy>=1.14.3
pytest>=3.6
pytest-mock>=1.10.0
pytest-timeout>=1.4.2
scipy>=1.6.2
dill>=0.2.9
sympy>=1.0
scikit-learn>=1.1
smcpy>=0.1.4
pybind11[global]
# ONNX
onnx
# TESTS
pytest>=3.6
pytest-mock>=1.10.0
pytest-timeout>=1.4.2
pytest-cov
coverage
coveralls
19 changes: 5 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext

# from distutils.version import LooseVersion

# Convert distutils Windows platform specifiers to CMake -A arguments
Expand All @@ -16,13 +17,15 @@
"win-arm64": "ARM64",
}


def get_property(prop, project):
result = re.search(
r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop),
open(project + "/__init__.py").read(),
)
return result.group(1)


__version__ = get_property("__version__", "bingo")


Expand Down Expand Up @@ -78,7 +81,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
ninja_executable_path = Path(ninja.BIN_DIR) / "ninja"
cmake_args += [
"-GNinja",
'-DCMAKE_JOB_POOLS:STRING=compile=1;link=1'
"-DCMAKE_JOB_POOLS:STRING=compile=1;link=1"
f"-DCMAKE_MAKE_PROGRAM:FILEPATH={ninja_executable_path}",
]
except ImportError:
Expand Down Expand Up @@ -161,19 +164,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
"bingo.util",
"bingo.variation",
],
install_requires=[
"mpi4py>=2.0.0,<4.0",
"numpy",
"pytest",
"pytest-mock",
"pytest-timeout",
"scipy",
"dill",
"sympy",
"scikit-learn",
"smcpy",
"pybind11[global]"
],
install_requires=[],
python_requires=">=3.9",
classifiers=[
"Programming Language :: Python :: 3.12",
Expand Down

0 comments on commit 6a90bfc

Please sign in to comment.