Skip to content

Commit

Permalink
importlib-metadata in toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Goldschmidt committed Jun 12, 2024
1 parent 2bfeb89 commit 00bcf85
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 4 additions & 3 deletions derivative/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
import numpy as np
from scipy.special import binom

if sys.version_info < (3, 10):
from importlib_metadata import entry_points
else:
try:
from importlib.metadata import entry_points
except ImportError:
# if sys.version_info < (3, 10):
from importlib_metadata import entry_points

hyperparam_algorithms = entry_points(group="derivative.hyperparam_opt")

Expand Down
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "derivative"
version = "0.6.1"
version = "0.6.2"
description = "Numerical differentiation in python."
repository = "https://github.com/andgoldschmidt/derivative"
documentation = "https://derivative.readthedocs.io/"
Expand All @@ -20,6 +20,9 @@ numpy = "^1.18.3"
scipy = "^1.4.1"
scikit-learn = "^1"

# third-party access to the functionality of importlib.metadata
importlib-metadata = "^7.1.0"

# docs
sphinx = {version = "^5", optional = true}
nbsphinx = {version = "^0.6.1", optional = true}
Expand All @@ -32,12 +35,12 @@ matplotlib = {version = "^3.2.1", optional = true}
pytest = {version = "^7", optional = true}

[tool.poetry.extras]
docs = ["sphinx", "nbsphinx", "ipykernel", "jupyter_client", "matplotlib", "pandoc"]
docs = ["sphinx", "nbsphinx", "ipykernel", "jupyter_client", "matplotlib"]
dev = ["pytest"]

[build-system]
requires = ["poetry-core>=1.1.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.plugins.'derivative.hyperparam_opt']
[tool.poetry.plugins."derivative.hyperparam_opt"]
"kalman.default" = "derivative.utils:_default_kalman"

0 comments on commit 00bcf85

Please sign in to comment.