summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorsid <48367591+sidpbury@users.noreply.github.com>2023-08-01 17:35:41 -0400
committerGitHub <noreply@github.com>2023-08-01 17:35:41 -0400
commit3369acc0508d49e584d5c7412102b2942d826726 (patch)
tree3e85fca253bf76b4eae9e6d0e91f166568dc52ec /var
parent26f4fc0f34f8dbd38bccbe27a1b86d9387853851 (diff)
downloadspack-3369acc0508d49e584d5c7412102b2942d826726.tar.gz
spack-3369acc0508d49e584d5c7412102b2942d826726.tar.bz2
spack-3369acc0508d49e584d5c7412102b2942d826726.tar.xz
spack-3369acc0508d49e584d5c7412102b2942d826726.zip
py-openai, py-pandas-stubs (#38912)
* simple build of py-openai * added variants to py-openai * py-pandas-stubs is a dependency for py-openai * fixed format and flake8 errors for py-openai * black format error for py-pandas-stubs * [@spackbot] updating style on behalf of sidpbury * made style and format changes to py-openai * made style and format changes to py-pandas-stubs * py-types-pytz is a dependency for py-openai * [@spackbot] updating style on behalf of sidpbury * updated py-openpyxl for ver 3.0.7 and 3.1.2 * Update var/spack/repos/builtin/packages/py-pandas-stubs/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * ajs requested changes for py-openai * updated py-openpyxl for supported python * [@spackbot] updating style on behalf of sidpbury * updated py-openpyxl * removed requirement.txt dependencies in py-openpyxl * removed python depends on from openpyxl --------- Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-openai/package.py58
-rw-r--r--var/spack/repos/builtin/packages/py-openpyxl/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-pandas-stubs/package.py26
-rw-r--r--var/spack/repos/builtin/packages/py-types-pytz/package.py21
4 files changed, 109 insertions, 9 deletions
diff --git a/var/spack/repos/builtin/packages/py-openai/package.py b/var/spack/repos/builtin/packages/py-openai/package.py
new file mode 100644
index 0000000000..62efe6ad1c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-openai/package.py
@@ -0,0 +1,58 @@
+# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class PyOpenai(PythonPackage):
+ """The OpenAI Python library provides convenient access to the OpenAI API
+ from applications written in the Python language. It includes a pre-defined
+ set of classes for API resources that initialize themselves dynamically from
+ API responses which makes it compatible with a wide range of versions of the
+ OpenAI API."""
+
+ homepage = "https://github.com/openai/openai-python"
+ pypi = "openai/openai-0.27.8.tar.gz"
+
+ version("0.27.8", sha256="2483095c7db1eee274cebac79e315a986c4e55207bb4fa7b82d185b3a2ed9536")
+
+ variant("datalib", default=False, description="facilities for data loading")
+ variant(
+ "wandb",
+ default=False,
+ description="keeps track of hyperparameters, system metrics, and predictions",
+ )
+ variant("embeddings", default=False, description="represents a text string vector")
+
+ depends_on("python@3.7.1:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-requests@2.20:", type=("build", "run"))
+ depends_on("py-tqdm", type=("build", "run"))
+ depends_on("py-typing-extensions", when="^python@3.7", type=("build", "run"))
+ depends_on("py-aiohttp", type=("build", "run"))
+
+ with when("+datalib"):
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-pandas@1.2.3:", type=("build", "run"))
+ depends_on("py-pandas-stubs@1.1.0.11:", type=("build", "run"))
+ depends_on("py-openpyxl@3.0.7:", type=("build", "run"))
+
+ with when("+wandb"):
+ depends_on("py-wandb", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-pandas@1.2.3:", type=("build", "run"))
+ depends_on("py-pandas-stubs@1.1.0.11:", type=("build", "run"))
+ depends_on("py-openpyxl@3.0.7:", type=("build", "run"))
+
+ with when("+embeddings"):
+ depends_on("py-scikit-learn@1.0.2:", type=("build", "run"))
+ depends_on("py-tenacity@8.0.1:", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
+ depends_on("py-plotly", type=("build", "run"))
+ depends_on("py-numpy", type=("build", "run"))
+ depends_on("py-scipy", type=("build", "run"))
+ depends_on("py-pandas@1.2.3:", type=("build", "run"))
+ depends_on("py-pandas-stubs@1.1.0.11:", type=("build", "run"))
+ depends_on("py-openpyxl@3.0.7:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-openpyxl/package.py b/var/spack/repos/builtin/packages/py-openpyxl/package.py
index 4d81f37222..246164f688 100644
--- a/var/spack/repos/builtin/packages/py-openpyxl/package.py
+++ b/var/spack/repos/builtin/packages/py-openpyxl/package.py
@@ -10,20 +10,15 @@ class PyOpenpyxl(PythonPackage):
"""A Python library to read/write Excel 2010 xlsx/xlsm files"""
homepage = "https://openpyxl.readthedocs.org/"
- pypi = "openpyxl/openpyxl-3.0.3.tar.gz"
+ pypi = "openpyxl/openpyxl-3.1.2.tar.gz"
+ version("3.1.2", sha256="a6f5977418eff3b2d5500d54d9db50c8277a368436f4e4f8ddb1be3422870184")
+ version("3.0.7", sha256="6456a3b472e1ef0facb1129f3c6ef00713cebf62e736cd7a75bcc3247432f251")
version("3.0.3", sha256="547a9fc6aafcf44abe358b89ed4438d077e9d92e4f182c87e2dc294186dc4b64")
version("2.4.5", sha256="78c331e819fb0a63a1339d452ba0b575d1a31f09fdcce793a31bec7e9ef4ef21")
version("2.2.0", sha256="c34e3f7e3106dbe6d792f35d9a2f01c08fdd21a6fe582a2f540e39a70e7443c4")
version("1.8.6", sha256="aa11a4acd2765392808bca2041f6f9ba17565c72dccc3f5d876bf78effa06126")
- depends_on("python@3.6:", when="@3.0:", type=("build", "run"))
- depends_on("python@2.7:2.8,3.5:", when="@2.6:", type=("build", "run"))
- depends_on("python@2.7:2.8,3.4:", when="@2.5:", type=("build", "run"))
- depends_on("python@2.6:2.8,3.3:", when="@2.1:", type=("build", "run"))
- depends_on("python@2.6:", type=("build", "run"))
-
depends_on("py-setuptools", type="build")
-
- depends_on("py-jdcal", when="@2.2:", type=("build", "run"))
depends_on("py-et-xmlfile", when="@2.4:", type=("build", "run"))
+ depends_on("py-jdcal", when="@2.2.0:3.0.6", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-pandas-stubs/package.py b/var/spack/repos/builtin/packages/py-pandas-stubs/package.py
new file mode 100644
index 0000000000..8a11e32704
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pandas-stubs/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class PyPandasStubs(PythonPackage):
+ """These are public type stubs for pandas, following the convention of
+ providing stubs in a separate package, as specified in PEP 561. The stubs
+ cover the most typical use cases of pandas. In general, these stubs are
+ narrower than what is possibly allowed by pandas, but follow a convention of
+ suggesting best recommended practices for using pandas."""
+
+ homepage = "https://pandas.pydata.org/"
+ pypi = "pandas_stubs/pandas_stubs-2.0.2.230605.tar.gz"
+
+ version(
+ "2.0.2.230605", sha256="624c7bb06d38145a44b61be459ccd19b038e0bf20364a025ecaab78fea65e858"
+ )
+
+ depends_on("python@3.8:", type=("build", "run"))
+ depends_on("py-poetry-core@1:", type="build")
+ depends_on("py-numpy@1.24.3:", type=("build", "run"))
+ depends_on("py-types-pytz@2022.1.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/py-types-pytz/package.py b/var/spack/repos/builtin/packages/py-types-pytz/package.py
new file mode 100644
index 0000000000..58f0d9c37e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-types-pytz/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class PyTypesPytz(PythonPackage):
+ """This is a PEP 561 type stub package for the pytz package. It can be used
+ by type-checking tools like mypy, pyright, pytype, PyCharm, etc. to check
+ code that uses pytz."""
+
+ homepage = "https://github.com/python/typeshed"
+ pypi = "types-pytz/types-pytz-2023.3.0.0.tar.gz"
+
+ version(
+ "2023.3.0.0", sha256="ecdc70d543aaf3616a7e48631543a884f74205f284cefd6649ddf44c6a820aac"
+ )
+
+ depends_on("py-setuptools", type="build")