-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (156 loc) · 5.15 KB
/
pyproject.toml
File metadata and controls
175 lines (156 loc) · 5.15 KB
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
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "oteapi-core"
authors = [
{name = "SINTEF", email = "Team4.0@SINTEF.no"},
]
description = "Open Translation Environment (OTE) API."
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3",
"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", "OTEAPI"]
requires-python = "~=3.10"
dynamic = ["version"]
dependencies = [
# Core dependencies
"diskcache>=5.6.3,<6",
"pydantic~=2.12",
"pydantic-settings~=2.12",
# Strategy dependencies
"celery>=5.6.0,<6",
"openpyxl>=3.1.5,<4",
"paramiko<4", # version 4+ has some breaking changes and is not yet supported by pysftp
"Pillow>=10.4.0,<13",
"psycopg[binary]>=3.2.6,<4",
"pysftp~=0.2.9",
"requests>=2.32.3,<3",
]
[project.optional-dependencies]
docs = [
"mike~=2.1",
"mkdocs~=1.6",
"mkdocs-autorefs~=1.4",
"mkdocs-awesome-pages-plugin~=2.10",
"mkdocs-material~=9.7",
"mkdocstrings[python]~=1.0",
]
testing = [
"ase~=3.26",
"numpy>=1.26,<3",
"pytest~=9.0",
"pytest-celery[redis]~=1.2",
"pytest-cov~=7.0",
"redis~=7.0",
"requests-mock~=1.12",
]
dev = [
"oteapi-core[docs,testing]",
"pre-commit~=4.5",
]
[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.black]
target-version = ["py310","py311","py312","py313"]
[tool.mypy]
python_version = "3.10"
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.3"
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 = [
"PLC", # Convention related pylint codes
"PLR", # Refactor 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
]