-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpyproject.toml
More file actions
180 lines (163 loc) · 4.29 KB
/
pyproject.toml
File metadata and controls
180 lines (163 loc) · 4.29 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
176
177
178
179
180
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "ocp-tool"
description = "Tool to generate OASIS files for coupling OpenIFS, FESOM2, and NEMO"
authors = [
{name = "Jan Streffing", email = "jan.streffing@awi.de"}
]
readme = "README.md"
license = {file = "licence"}
requires-python = ">=3.8"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Atmospheric Science",
]
dependencies = [
"numpy",
"netcdf4",
"eccodes",
"matplotlib",
"pandas",
"pyfesom2 @ git+https://github.com/FESOM/pyfesom2.git@feature/ascii-to-netcdf-performance-optimization",
"pyyaml",
"shapely",
"tqdm",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/pgierz/ocp-tool"
Repository = "https://github.com/pgierz/ocp-tool"
Issues = "https://github.com/pgierz/ocp-tool/issues"
[project.entry-points."scriptengine.tasks"]
"ocpt.main" = "ocp_tool.scriptengine_task:OCPTool"
[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"black",
"isort",
"flake8",
"mypy",
]
jupyter = [
"jupyterlab",
"notebook",
"ipykernel",
]
docs = [
"sphinx",
"sphinx-rtd-theme",
"nbsphinx",
"myst-parser",
"sphinx-autoapi",
]
[tool.setuptools]
packages = ["ocp_tool"]
[tool.setuptools.dynamic]
version = {attr = "ocp_tool.__version__"}
# Pixi configuration
[tool.pixi.workspace]
name = "ocp-tool"
description = "Tool to generate OASIS files for coupling OpenIFS, FESOM2, and NEMO"
authors = ["Jan Streffing <jan.streffing@awi.de>"]
channels = ["conda-forge", "bioconda", "eumetsat"]
platforms = ["linux-64", "linux-aarch64", "osx-64", "osx-arm64"]
[tool.pixi.dependencies]
python = ">=3.9"
numpy = "*"
scipy = "*"
netcdf4 = "*"
xarray = "*"
matplotlib = "*"
cartopy = "*"
pandas = "*"
pyyaml = "*"
python-eccodes = "*"
pip = "*"
[tool.pixi.pypi-dependencies]
# Use modernized pyfesom2 branch with Python 3.11+ support
pyfesom2 = { git = "https://github.com/FESOM/pyfesom2.git", branch = "modernize-packaging" }
[tool.pixi.feature.jupyter.dependencies]
jupyterlab = "*"
notebook = "*"
ipykernel = "*"
[tool.pixi.feature.dev.dependencies]
pytest = "*"
pytest-cov = "*"
black = "*"
isort = "*"
flake8 = "*"
mypy = "*"
[tool.pixi.feature.docs.dependencies]
sphinx = "*"
sphinx-rtd-theme = "*"
nbsphinx = "*"
myst-parser = "*"
sphinx-autoapi = "*"
[tool.pixi.environments]
default = { solve-group = "default" }
jupyter = { features = ["jupyter"], solve-group = "default" }
dev = { features = ["dev"], solve-group = "default" }
docs = { features = ["docs"], solve-group = "default" }
full = { features = ["jupyter", "dev", "docs"], solve-group = "default" }
[tool.pixi.tasks]
lint = "flake8 ocp_tool"
format = "black ocp_tool"
sort-imports = "isort ocp_tool"
type-check = "mypy ocp_tool"
test = "pytest"
clean-format = { depends-on = ["format", "sort-imports"] }
jupyter = "jupyter lab"
notebook = "jupyter notebook"
docs-build = "sphinx-build -W -b html docs/source docs/build/html"
docs-clean = "rm -rf docs/build"
docs-serve = "python -m http.server 8000 --directory docs/build/html"
workflow-dry = { cmd = "snakemake --dry-run", cwd = "workflow" }
workflow-lint = { cmd = "snakemake --lint", cwd = "workflow" }
workflow-run = { cmd = "snakemake --cores 4 --use-conda", cwd = "workflow" }
build = "python -m build"
install-dev = "pip install -e ."
[tool.black]
line-length = 88
target-version = ['py38']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
known_first_party = ["ocp_tool"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--cov=ocp_tool",
"--cov-report=term-missing",
"--cov-report=html",
]