-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
170 lines (149 loc) · 5.79 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
[project]
name = "skema"
authors = [
{name="Keith Alcock", email="[email protected]"},
{name="Tito Ferra", email="[email protected]"},
{name="Clayton Morrison", email="[email protected]"},
{name="Enrique Noriega", email="[email protected]"},
{name = "Adarsh Pyarelal", email="[email protected]"},
{name="Vincent Raymond", email="[email protected]"},
]
description = "Scientific Knowledge Extraction and Model Analysis"
version = "0.1.0"
dependencies=[
"Cython",
"numpy",
"dill==0.3.7",
"networkx==2.8.8",
"PyYAML==6.*",
"tree-sitter==0.20.4",
"neo4j==5.14.1",
"requests",
"beautifulsoup4==4.12.*", # used to remove comments etc from pMML before sending to MORAE
"typing_extensions", # see https://github.com/pydantic/pydantic/issues/5821#issuecomment-1559196859
"fastapi~=0.100.0",
"starlette",
"httpx",
"pydantic>=2.0.0",
"uvicorn",
"python-multipart",
"func_timeout==4.3.5"
]
# The Python program analysis pipeline does not currently work with Python 3.9
# or 3.10. This may change in the future.
requires-python = "==3.8.*"
license = {text="MIT"}
dynamic = ["readme"]
[project.optional-dependencies]
# Dev dependencies.
# - pytest: for running tests
# - black: Autoformatting
# - pygraphviz: for creating function network visualizations for debugging.
# Pygraphviz is often tricky to install, so we reserve it for the dev extras
# list.
# - six: Required by auto-generated Swagger models
dev = ["pytest", "pytest-cov", "pytest-xdist", "pytest-asyncio", "pytest-mock", "black", "mypy", "coverage", "pygraphviz", "six"]
demo = ["notebook"]
# ISA dependencies.
isa = [
"pydot==1.4.2",
"graphviz==0.20.1",
"graspologic==3.2.0", # NOTE: this depends on rust when installing on an M1/ARM64 machine
"Levenshtein==0.21.1",
"sentence_transformers==2.2.2"
]
# shared ML dependencies
ml = ["torch==2.0.1", "torchvision==0.15.2", "beartype==0.15.0", "huggingface_hub"]
# Im2MML dependencies. The img2mml service converts equation images to MathML.
# See the skema/img2mml directory.
img2mml = ["skema[ml]", "lxml==4.9.3", "Pillow==10.0.1"]
# dependencies for METAL utilities.
metal = ["skema[ml]",
"fire==0.5.0",
"pyarrow==13.0.0",
"transformers==4.33.2",
"sentence_transformers==2.2.2",
"mock",
"askem_extractions[all]@git+https://github.com/ml4ai/ASKEM-TA1-DataModel"]
# for llm use in skema
llms = ["langchain==0.0.325", "openai==0.28.0"]
# dependencies for text reading utilities.
tr = ["skema[ml]", "pyarrow==13.0.0",
"tqdm",
"pandas==2.0.3"]
# project documentation generation
doc = ["mkdocs==1.2.3", "pdoc3==0.10.0", "mkdocs-git-snippet==0.1.1", "mkdocs-git-revision-date-localized-plugin==0.11.1", "mkdocs-git-authors-plugin==0.6.3", "mkdocs-rtd-dropdown==1.0.2", "jinja2<3.1.0"]
core = ["skema[img2mml]", "skema[isa]", "skema[tr]", "skema[metal]", "skema[llms]"]
# see skema/img2mml/render_mml/mathpix_annotator
annotations = ["matplotlib", "notebook"]
# all extras
all = ["skema[core]", "skema[dev]", "skema[doc]", "skema[demo]", "skema[annotations]"]
[tool.setuptools.package-dir]
"skema.gromet" = "skema/gromet"
"skema.img2mml" = "skema/img2mml"
"skema.isa" = "skema/isa"
"skema.model_assembly" = "skema/model_assembly"
"skema.program_analysis" = "skema/program_analysis"
"skema.rest" = "skema/rest"
"skema.skema_py" = "skema/skema_py"
"skema.utils" = "skema/utils"
"skema.data" = "skema/data"
# re-map skema/text_reading/python to skema.text_reading
#"skema.text_reading" = "skema/text_reading/python"
"skema.metal.model_linker" = "skema/metal/model_linker/skema_model_linker"
# [tool.setuptools.packages]
# find = {} # Scan the project directory with the default parameters
[tool.setuptools.package-data]
# needed to ensure models are included in package/discoverable
"*" = ["*.json", "*vocab.txt", "*.pt", "*.png", "*.html", "*.yml", "*.yaml", "*.zip"]
[tool.setuptools.dynamic]
readme = {file = ["README.md"], content-type = "text/markdown"}
# runnables
[project.scripts]
#skema-tree-sitter-build-fortran-grammar = "skema.program_analysis.CAST.fortran.build_tree_sitter_fortran:main"
link_amr = "skema.metal.model_linker.link_amr:main"
#parquet2json = "skema.text_reading.cosmos_integration:main"
# Minimum requirements for the build system to execute.
[build-system]
requires = ["setuptools>=67", "wheel"]
build-backend = "setuptools.build_meta"
# pytest
[tool.pytest.ini_options]
markers = [
"ci_only: marks tests to only be run in CI (deselect with '-m \"not ci_only\"')"
]
minversion = "7.0"
addopts = "-v --cov=skema --cov-report html:docs/coverage/python"
testpaths = [
# NOTE: There are currently a couple of test ordering dependencies that should be maintained or could cause CI failures
# 1. skema/img2mm/tests needs be run first to generate model files
# 2. program_analysis/tests needs to be run before skema/gromet/execution_engine and any test that may build the python primitive map
"skema/img2mml/tests",
"skema/program_analysis/tests",
"skema/program_analysis/comment_extractor/tests",
"skema/program_analysis/tree_sitter_parsers/tests",
"skema/program_analysis/CAST/matlab/tests",
# TODO: Fix fortran tests
"skema/program_analysis/CAST/fortran/tests",
#"skema/program_analysis/CAST/python/tests"
"skema/gromet/execution_engine/tests",
"skema/rest/tests",
"skema/skema_py/tests",
]
# Configuration for Black.
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
[tool.black]
line-length = 88
target-version = ['py38']
include = '\.pyi?$'
extend-exclude = '''
/(
# The following are specific to Black, you probably don't want those.
| blib2to3
| tests/data
| profiling
)/
'''