-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
177 lines (158 loc) · 5.25 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 = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "oteapi-core"
authors = [
{name = "SINTEF", email = "[email protected]"},
]
description = "Open Translation Environment (OTE) API."
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
keywords = ["OTE", "OTE-API"]
requires-python = "~=3.9"
dynamic = ["version"]
dependencies = [
# Core dependencies
"agraph-python>=102.0.0,<105",
"diskcache>=5.6.3,<6",
"importlib_metadata; python_version < '3.10'",
"pydantic~=2.9,!=2.10.0,!=2.10.1",
"pydantic-settings~=2.6",
"typing-extensions~=4.12; python_version < '3.10'",
# Strategy dependencies
"celery>=5.4.0,<6",
"openpyxl>=3.1.5,<4",
"Pillow>=10.4.0,<12",
"psycopg[binary]~=3.2",
"pysftp~=0.2.9",
"requests>=2.32.0,<3",
# Follow issue EMMC-ASBL/oteapi-services#328 for more information
"urllib3<2",
]
[project.optional-dependencies]
docs = [
"mike~=2.1",
"mkdocs>=1.5.3,<1.7",
"mkdocs-autorefs~=1.2",
"mkdocs-awesome-pages-plugin~=2.9",
"mkdocs-material>=9.5.5,<10",
"mkdocstrings[python]~=0.28.0",
]
testing = [
"ase~=3.24",
"numpy>=1.26,<3",
"pytest~=8.3",
"pytest-celery[redis]~=1.1",
"pytest-cov~=6.0",
"redis~=5.0",
"requests-mock~=1.12",
]
dev = [
"pre-commit~=4.0",
"oteapi-core[docs,testing]",
]
[project.urls]
Home = "https://github.com/EMMC-ASBL/oteapi-core"
Documentation = "https://EMMC-ASBL.github.io/oteapi-core"
Source = "https://github.com/EMMC-ASBL/oteapi-core"
"Issue Tracker" = "https://github.com/EMMC-ASBL/oteapi-core/issues"
Changelog = "https://github.com/EMMC-ASBL/oteapi-core/blob/master/CHANGELOG.md"
Package = "https://pypi.org/project/oteapi-core"
# Entry points, i.e., strategy registration
[project.entry-points."oteapi.download"]
"oteapi.file" = "oteapi.strategies.download.file:FileStrategy"
"oteapi.http" = "oteapi.strategies.download.https:HTTPSStrategy"
"oteapi.https" = "oteapi.strategies.download.https:HTTPSStrategy"
"oteapi.ftp" = "oteapi.strategies.download.sftp:SFTPStrategy"
"oteapi.sftp" = "oteapi.strategies.download.sftp:SFTPStrategy"
[project.entry-points."oteapi.filter"]
"oteapi.filter/crop" = "oteapi.strategies.filter.crop_filter:CropImageFilter"
"oteapi.filter/sql" = "oteapi.strategies.filter.sql_query_filter:SQLQueryFilter"
[project.entry-points."oteapi.mapping"]
"oteapi.triples" = "oteapi.strategies.mapping.mapping:MappingStrategy"
[project.entry-points."oteapi.parse"]
"oteapi.parser/csv" = "oteapi.strategies.parse.text_csv:CSVParseStrategy"
"oteapi.parser/excel_xlsx" = "oteapi.strategies.parse.excel_xlsx:XLSXParseStrategy"
"oteapi.parser/image" = "oteapi.strategies.parse.image:ImageDataParseStrategy"
"oteapi.parser/json" = "oteapi.strategies.parse.application_json:JSONDataParseStrategy"
"oteapi.parser/postgres" = "oteapi.strategies.parse.postgres:PostgresParserStrategy"
"oteapi.parser/sqlite3" = "oteapi.strategies.parse.application_vnd_sqlite:SqliteParseStrategy"
[project.entry-points."oteapi.transformation"]
"oteapi.celery/remote" = "oteapi.strategies.transformation.celery_remote:CeleryRemoteStrategy"
[project.entry-points."oteapi.resource"]
"oteapi.resource/url" = "oteapi.strategies.resource.resource_url:ResourceURLStrategy"
[tool.flit.module]
name = "oteapi"
[tool.flit.sdist]
exclude = [
".github/",
"tests/",
".gitignore",
".pre-commit-config.yaml",
".codecov.yml",
]
[tool.mypy]
python_version = "3.9"
ignore_missing_imports = true
scripts_are_modules = true
warn_unused_configs = true
hide_error_codes = false
allow_redefinition = true
check_untyped_defs = true
plugins = ["pydantic.mypy"]
[tool.pytest.ini_options]
minversion = "8.2"
addopts = "-rs --cov-report=term-missing:skip-covered --no-cov-on-fail"
filterwarnings = [
# Treat all warnings as errors
"error",
# Ignore UserWarning from pysftp concerning known_hosts
# This is usually only a problem in testing environments,
# but we don't want to fail the tests locally if a known_hosts file is missing
"ignore:.*Failed to load HostKeys.*:UserWarning",
]
[tool.ruff.lint]
extend-select = [
"E", # pycodestyle
"F", # pyflakes
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"YTT", # flake8-2020
"EXE", # flake8-executable
"PYI", # flake8-pyi
]
ignore = [
"PLR", # Design related pylint codes
]
isort.required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"B018", # Useless attribute access
"B015", # Pointless comparison
"BLE", # flake8-blind-except
"T201", # flake8-print
]