Skip to content

Commit

Permalink
python package updates (#74)
Browse files Browse the repository at this point in the history
* update package versions

* ruff updates

* update pybind11

* exact pin
  • Loading branch information
shapiromatron authored Nov 1, 2024
1 parent d77f3be commit b0be96d
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 23 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ExternalProject_Add(
pybind11
PREFIX .
GIT_REPOSITORY "https://github.com/pybind/pybind11.git"
GIT_TAG "80dc998efced8ceb2be59756668a7e90e8bef917" # v2.10.4
GIT_TAG "a2e59f0e7065404b44dfe92a28aca47ba1378dc4" # v2.13.6
SOURCE_DIR "${CMAKE_BINARY_DIR}/third-party/pybind11"
# Override default steps with no action, we just want the clone step.
UPDATE_COMMAND ""
Expand Down Expand Up @@ -80,7 +80,7 @@ set(FETCHCONTENT_QUIET FALSE)

FetchContent_Declare(
pybind11
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.10.4.tar.gz
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.13.6.tar.gz
)

FetchContent_GetProperties(pybind11)
Expand Down
31 changes: 16 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ dependencies = [

[project.optional-dependencies]
dev = [
"coverage~=7.5.1",
"mypy~=1.10.0",
"pybind11~=2.10.4",
"coverage~=7.6.4",
"mypy~=1.13.0",
"pybind11==2.13.6",
"pytest-mpl~=0.17.0",
"pytest~=8.2.1",
"ruff~=0.5.7",
"setuptools~=67.7.2",
"wheel~=0.43.0",
"pytest~=8.3.3",
"ruff~=0.7.1",
"setuptools~=75.3.0",
"wheel~=0.44.0",
]
docs = [
"Sphinx~=7.4.7",
"myst-nb~=1.1.1",
"myst-parser~=3.0.1",
"furo==2024.7.18",
"sphinx_design==0.6.0",
"sphinx-autobuild~=2024.4.16",
"Sphinx~=8.1.3",
"myst-nb~=1.1.2",
"myst-parser~=4.0.0",
"furo==2024.8.6",
"sphinx_design~=0.6.1",
"sphinx-autobuild~=2024.10.3",
]

[project.scripts]
"bmds-priors-report" = "pybmds.cli.priors_report:main"

[build-system]
requires = [
"pybind11~=2.10.4",
"setuptools~=67.7.2",
"pybind11==2.13.6",
"setuptools~=75.3.0",
]
build-backend = "setuptools.build_meta"

Expand Down Expand Up @@ -119,6 +119,7 @@ addopts = "--mpl-baseline-path=tests/data/mpl"
python_files = ["test_*.py"]

[tool.ruff]
exclude = ["docs"]
line-length = 100
lint.select = ["F", "E", "W", "I", "UP", "S", "B", "T20", "ERA", "NPY", "RUF", "PTH"]
lint.ignore = ["E501"]
Expand Down
2 changes: 1 addition & 1 deletion src/pybmds/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def inspect_cpp_obj(lines: list[str], obj: Any, depth: int):
depth += 1
indent = " " * depth + "- "
for attr, value in inspect.getmembers(obj):
if attr.startswith("__"):
if attr.startswith("__") or attr.startswith("_pybind11"):
continue
elif attr == "models" and "multitumor" in obj.__class__.__name__:
lines.append(f"{indent}{attr}:")
Expand Down
3 changes: 2 additions & 1 deletion tests/test_bmdscore/testCont.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import bmdscore
import numpy as np

import bmdscore

pyAnal = bmdscore.python_continuous_analysis()
pyAnal.model = bmdscore.cont_model.exp_5
# isIncreasing needed if detectAdvDir is set to false
Expand Down
3 changes: 2 additions & 1 deletion tests/test_bmdscore/testDicho.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import bmdscore
import numpy as np

import bmdscore

pyAnal = bmdscore.python_dichotomous_analysis()
pyAnal.model = bmdscore.dich_model.d_weibull
pyAnal.n = 4
Expand Down
3 changes: 2 additions & 1 deletion tests/test_bmdscore/testDichoMA.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import bmdscore
import numpy as np

import bmdscore

pyMA = bmdscore.python_dichotomousMA_analysis()
pyMA.nmodels = 9
pyMA.actual_parms = np.array([4, 3, 2, 3, 3, 4, 2, 2, 3])
Expand Down
3 changes: 2 additions & 1 deletion tests/test_bmdscore/testMultitumor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import bmdscore
import numpy as np

import bmdscore


def getMultitumorPrior(degree, prior_cols):
prG = np.array([0, -17, 0, -18, 18])
Expand Down
3 changes: 2 additions & 1 deletion tests/test_bmdscore/testNested.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import sys

import bmdscore
import numpy as np

import bmdscore


def getNLogisticPrior(ngrp, prior_cols, restricted):
prG = np.array([0, 1])
Expand Down

0 comments on commit b0be96d

Please sign in to comment.