-
Notifications
You must be signed in to change notification settings - Fork 56
/
pyproject.toml
177 lines (167 loc) · 7.09 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "gramex"
version = "1.94.4"
description = "Gramex: Low Code Data Solutions Platform"
# People with 2+ contributions on https://github.com/gramener/gramex/graphs/contributors
authors = [
{name = "Anand S", email = "s.anand@gramener.com"},
{name = "Pratap Vardhan", email = "pratapapvr@gmail.com"},
{name = "Jaidev Deshpande", email = "jaidev.deshpande@gramener.com"},
{name = "Bhanu Kamapantula", email = "talk2kish@gmail.com"},
{name = "Radheya Kale", email = "radheya.kale@gramener.com"},
{name = "Karmanya Aggarwal", email = "karmanyaaggarwal@gmail.com"},
{name = "Sandeep Bhat", email = "sandeep.bhat@gramener.com"},
{name = "Shraddheya Shrivastava", email = "shraddheya.shrivastava@gramener.com"},
{name = "Sundeep Reddy Mallu", email = "sundeep.mally@gramener.com"},
]
license = {text = "MIT"}
keywords = ["gramex", "data", "low code", "framework", "machine learning"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
requires-python = ">=3.7"
readme = "README.md"
dependencies = [
# It's OK to specify minimum versions, i.e. >=.
# But avoid <= or == without a strong reason. Makes it hard to mix with other libraries.
"astor", # for gramex.transforms.build_transform
"blinker", # for MessageHandler
"cachetools>=3.0.0", # for services.cache for memory cache
"colorlog>=2.7.0", # for Coloured log files
"cron-descriptor", # for gramex.apps.admin2.gramexadmin admin/schedule to pretty-print
"crontab>=0.21", # for services.schedule to parse crontab entries
"diskcache>=2.8.3", # for urlcache.DiskCache
"h5py", # for MLHandler saves .h5 files. TODO: Migrate away from .h5
"joblib", # for gramex.ml
"lxml", # for gramex.pptgen2
"markdown", # OPT: for transforms, gramex.services.create_alert()
"matplotlib", # for gramex.data.download() charts, scale.colors, pptgen2
# Pin numpy<2 to avoid Pandas incompatibility with NumPy 2.x
# https://stackoverflow.com/a/78641304/100904
"numpy<2", # for ml, topcause, pptgen.
"oauthlib>=1.1.2", # for socialhandler, twitterstream
"openpyxl", # for gramex.cache.open .XLSX reading
"orderedattrdict>=1.6.0", # for OrderedDict with attr access for configs
"packaging", # for gramex.init() to parse gramex versions
# Pin pandas<2.2 to avoid cursor object issue: https://stackoverflow.com/a/77949093/100904
"pandas<2.2", # for all data processing
"pillow", # for pptgen2
"psutil", # for gramexadmin to monitor process
"python-dateutil", # for gramex.config.CustomJSONEncoder, gramex.data._convertor
# See https://github.com/scanny/python-pptx/issues/754
"python-pptx>=0.6.6,<=0.6.19", # for pptgen2
"python-slugify", # for pre-defined slugs at gramex.config.slug
"pyyaml>=5.1", # for parsing YAML files for config
"redis>=2.10.0", # for RedisStore
"requests", # for all HTTP requests
"seaborn", # OPT: gramex.data.download()
"six", # for gramex.yaml backward compatibility
"sqlalchemy<2", # for gramex.data.filter()
"sqlitedict>=1.5.0", # for SQLiteStore
"tables", # for HDF5 reading / writing. TODO: Where do we need this?
"tornado>=5.1.1", # for Web server
"typing_extensions", # for future-proof typing
"watchdog", # for Monitor file changes
]
[project.urls]
Homepage = "https://gramener.com/gramex/"
Documentation = "https://gramener.com/gramex/guide/"
Repository = "https://github.com/gramener/gramex"
Changelog = "https://gramener.com/gramex/guide/release/"
Issues = "https://github.com/gramener/gramex/issues"
Stackoverflow = "https://stackoverflow.com/questions/tagged/gramex"
[project.scripts]
gramex = "gramex:commandline"
secrets = "gramex.secrets:commandline"
slidesense = "gramex.pptgen2:commandline"
[tool.setuptools.packages.find]
include = ["gramex*"]
[tool.black]
# pytest/complexity_error/invalid.py has non-parseable Python code
force-exclude = "complexity_error"
[tool.ruff]
exclude = ["build", "dist", "docs", ".eggs", "node_modules", ".vscode", "pytest/complexity_error/invalid.py"]
line-length = 99
# E203 allows whitespace before :. Black needs this
# E911 allows use of str(). Required for pathlib.Path to string conversions
# N802 ignores "function name should be in lowercase". Required for
# tearDownModule(), extendMarkdown, etc where function name is pre-defined
# B902 ignores "blind except Exception:". We trap broad errors often
lint.ignore = ["E203", "N802", "B006", "B007", "B008", "S101"]
[tool.ruff.lint.per-file-ignores]
# ML libraries use capital "X" as a function argument or a variable. That's OK
"gramex/ml_api.py" = ["N803", "N806"]
"gramex/sm_api.py" = ["N803", "N806"]
"gramex/transformers.py" = ["N803", "N806"]
# requests.post infers filename from open(...) handle, so avoid context handler (flake8-simplify)
"tests/test_uploadhandler.py" = ["SIM115"]
# Ignore bandit checks for test cases
"pytest/**/*.py" = ["S"]
"testlib/**/*.py" = ["S"]
"tests/**/*.py" = ["S"]
[tool.pytest.ini_options]
testpaths = "pytest"
[project.optional-dependencies]
# pip install "gramex[full]" for better debugging and ML support
full = [
"boto3", # for gramex.services.sns.AmazonSNS
"datasets", # for gramex.transformers
"line_profiler", # for gramex.debug.lineprofile
"pymysql", # for MySQL connections
"scipy", # for gramex.topcause
"spacy", # for gramex.transformers
"scikit-learn", # for MLHandler, gramex.ml. TODO: version >=0.23.2,<1.0
"statsmodels", # for gramex.ml_api
"transformers", # for gramex.transformers
"xlrd", # for gramex.cache.open .XLS support (not .xlsx)
# "conda", # not required except for rpy2 or reporting conda version
# "rpy2", # deprecated
]
influxdb = ["influxdb_client[ciso]"]
mongodb = [
"pymongo",
"bson",
]
servicenow = [
"pysnow",
]
win32 = [
"pywin32",
]
doc = [
"mkdocs",
"mkdocstrings",
"mkdocstrings[python]",
]
test = [
"boto3", # for gramex.services.sns.AmazonSNS testing
"coverage", # for code coverage
"cssselect", # for tests.check_css() in test_admin, test_auth, test_alerts
"datasets", # for gramex.transformers
"elasticsearch7", # for gramexlog: features
"gramexenterprise", # for auth testing
"mccabe", # for pkg/usage/pycomplexity.py
"nose", # for all test cases
"pdfminer.six", # for test_capturehandler
"psycopg2-binary", # for PostgreSQL tests
"pymongo", # for MongoDB tests
"pymysql", # for MySQL tests
"pytest", # for newer test cases
"scipy", # for gramex.topcause
"spacy", # for gramex.transformers
"statsmodels", # for gramex.ml_api
"testfixtures", # For logcapture
"transformers", # for gramex.transformers
"websocket-client", # For test_websockethandler
]