mirror of
https://github.com/microsoft/qlib.git
synced 2026-11-13 06:20:56 +08:00
* ci: fix dependency compatibility failures Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * build: constrain fastjsonschema on older Python Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * build: constrain filelock for fork compatibility Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * ci: unify source and PyPI compatibility checks * ci: build grpcio locally on older macOS ARM64 Python * ci: use macOS SDK zlib for grpcio source builds * ci: install test dependencies by workflow and platform * ci: prepare macOS OpenMP before model import checks --------- Co-authored-by: Bowen Xian (Shanghai Wicresoft Co Ltd) <v-boxian@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
134 lines
3.8 KiB
TOML
134 lines
3.8 KiB
TOML
[build-system]
|
|
requires = ["setuptools", "setuptools-scm", "cython", "numpy>=1.24.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
classifiers = [
|
|
"Operating System :: POSIX :: Linux",
|
|
"Operating System :: Microsoft :: Windows",
|
|
"Operating System :: MacOS",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Development Status :: 3 - Alpha",
|
|
"Programming Language :: Python",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
]
|
|
name = "pyqlib"
|
|
dynamic = ["version"]
|
|
description = "A Quantitative-research Platform"
|
|
requires-python = ">=3.8.0"
|
|
readme = {file = "README.md", content-type = "text/markdown"}
|
|
license = { text = "MIT" }
|
|
|
|
dependencies = [
|
|
"pyyaml",
|
|
"numpy",
|
|
# Since version 1.1.0, pandas supports the ffill and bfill methods.
|
|
# Since version 2.1.0, pandas has deprecated the method parameter of the fillna method.
|
|
# qlib has updated the fillna method in PR 1987 and limited the minimum version of pandas.
|
|
"pandas>=1.1",
|
|
# Qlib's filesystem tracking backend is disabled by default in MLflow 3.13.
|
|
"mlflow<3.13",
|
|
# filelock 3.30 rejects forks while another thread changes lock descriptor ownership.
|
|
"filelock>=3.16.0,<3.30",
|
|
"redis",
|
|
"dill",
|
|
"fire",
|
|
"ruamel.yaml>=0.17.38",
|
|
"python-redis-lock",
|
|
"tqdm",
|
|
"pymongo",
|
|
"loguru",
|
|
"lightgbm",
|
|
"gym",
|
|
"cvxpy",
|
|
# Use the Windows/Python 3.8 wheel verified in PR #2308, including on fresh installs.
|
|
"osqp==1.0.5; sys_platform == 'win32' and python_version == '3.8'",
|
|
"joblib",
|
|
"matplotlib",
|
|
"jupyter",
|
|
"nbconvert",
|
|
# fastjsonschema 2.22 uses Python 3.10 type syntax without declaring the requirement.
|
|
"fastjsonschema<2.22; python_version < '3.10'",
|
|
"pyarrow",
|
|
"pydantic-settings",
|
|
"setuptools-scm",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest",
|
|
"statsmodels",
|
|
"tomli; python_version < '3.11'",
|
|
]
|
|
# On macos-13 system, when using python version greater than or equal to 3.10,
|
|
# pytorch can't fully support Numpy version above 2.0, so, when you want to install torch,
|
|
# it will limit the version of Numpy less than 2.0.
|
|
rl = [
|
|
"tianshou<=0.4.10",
|
|
"torch",
|
|
"numpy<2.0.0",
|
|
]
|
|
|
|
lint = [
|
|
# Keep Python and notebook formatting on the same version family.
|
|
"black<26.1",
|
|
"pylint",
|
|
"mypy<1.5.0",
|
|
"flake8",
|
|
"nbqa",
|
|
]
|
|
# snowballstemmer, a dependency of sphinx, was released on 2025-05-08 with version 3.0.0,
|
|
# which causes errors in the build process. So we've limited the version for now.
|
|
docs = [
|
|
# After upgrading scipy to version 1.16.0,
|
|
# we encountered ImportError: cannot import name '_lazywhere', in the build documentation,
|
|
# so we restricted the version of scipy to: 1.15.3
|
|
"scipy<=1.15.3",
|
|
"sphinx",
|
|
"sphinx_rtd_theme",
|
|
"readthedocs_sphinx_ext",
|
|
"snowballstemmer<3.0",
|
|
]
|
|
package = [
|
|
"twine",
|
|
"build",
|
|
]
|
|
# test_pit dependency packages
|
|
test = [
|
|
"yahooquery",
|
|
"baostock",
|
|
# Avoid source builds requiring external libxml2 headers on Windows.
|
|
"lxml<6.1.3",
|
|
]
|
|
analysis = [
|
|
# Qlib still imports figure_factory.create_distplot, removed in Plotly 7.
|
|
"plotly<7",
|
|
"statsmodels",
|
|
]
|
|
client = [
|
|
"python-socketio<6",
|
|
"tables",
|
|
]
|
|
|
|
# In the process of releasing a new version, when checking the manylinux package with twine, an error is reported:
|
|
# InvalidDistribution: Invalid distribution metadata: unrecognized or malformed field 'license-file'
|
|
# To solve this problem, we added license-files here. Refs: https://github.com/pypa/twine/issues/1216
|
|
[tool.setuptools]
|
|
packages = [
|
|
"qlib",
|
|
]
|
|
license-files = []
|
|
|
|
[project.scripts]
|
|
qrun = "qlib.cli.run:run"
|
|
|
|
[tool.setuptools_scm]
|
|
local_scheme = "no-local-version"
|
|
version_scheme = "guess-next-dev"
|
|
write_to = "qlib/_version.py"
|