From 617ff8027ee757596c840c13c23c15d06b2696c7 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel) YANG" Date: Tue, 15 Oct 2024 03:50:37 +0800 Subject: [PATCH] Reduce duplicate in dependency declare (#231) * reduce duplicate, new trick from https://github.com/hackingmaterials/matminer/pull/950#discussion_r1792190959 * reduce it further? * add a comma for readability --- pyproject.toml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c1ecb61c..3de9ded1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,8 @@ requires-python = ">=3.10" dependencies = [ "matplotlib>=3.9", "numpy>=1.26", - # output-formatting needed for pandas Stylers, see https://github.com/pandas-dev/pandas/blob/-/pyproject.toml + # output-formatting needed for pandas Stylers, + # see https://github.com/pandas-dev/pandas/blob/-/pyproject.toml "pandas[output-formatting]>=2.2", "plotly>=5.23", "pymatgen>=2024.7.18", @@ -37,25 +38,19 @@ dependencies = [ ] [project.optional-dependencies] +auto-text-pos = ["adjustText>=0.8"] +df-pdf-export = ["pdfCropMargins>=2", "weasyprint>=60"] +df-svg-export = ["bs4>=0.0.2", "cssutils>=2.9", "lxml>=4.9"] +# https://github.com/plotly/Kaleido/issues/176 +export-figs = ["kaleido>=0.2.1, !=0.2.1.post1"] +make-assets = ["pymatviz[export-figs]", "matminer>=0.9", "mp_api>=0.42"] +gh-pages = ["jupyter>=1.1", "lazydocs>=0.4", "nbconvert>=7.16"] test = [ - "adjustText>=0.8", - "bs4>=0.0.2", - "cssutils>=2.9", - # https://github.com/plotly/Kaleido/issues/176 - "kaleido>=0.2.1,!=0.2.1post1", - "lxml>=4.9", - "pdfCropMargins>=2", + "pymatviz[auto-text-pos,df-pdf-export,df-svg-export,export-figs]", "pytest-cov>=5", "pytest-split>=0.9", "pytest>=8", - "weasyprint>=60", ] -make-assets = ["kaleido>=0.2.1,!=0.2.1post1", "matminer>=0.9", "mp_api>=0.42"] -export-figs = ["kaleido>=0.2.1,!=0.2.1post1"] -gh-pages = ["jupyter>=1.1", "lazydocs>=0.4", "nbconvert>=7.16"] -df-pdf-export = ["pdfCropMargins>=2", "weasyprint>=60"] -df-svg-export = ["bs4>=0.0.2", "cssutils>=2.9", "lxml>=4.9"] -auto-text-pos = ["adjustText>=0.8"] [tool.setuptools.packages.find] include = ["pymatviz*"]