forked from Huracan-project/huracanpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
97 lines (85 loc) · 2.47 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
[project]
name = "huracanpy"
version = "1.1.0"
authors = [
{ name="Leo Saffin", email="l.saffin@reading.ac.uk" },
{ name="Stella Bourdin", email="stella.bourdin@physics.ox.ac.uk" },
]
description = "A python package for working with various forms of feature tracking data"
requires-python = ">=3.8, <3.13"
dependencies = [
"numpy",
"xarray",
"cftime",
"parse",
"shapely",
"pandas",
# Issue with newer versions of fiona when using old versions of geopandas
# see https://stackoverflow.com/a/78949565/8270394
# Normally just specify the newer geopandas, but it does not exist for python3.8
# so pin the version of fiona when using python3.8
"geopandas>=0.14.4;python_version>='3.9'",
"geopandas;python_version<'3.9'",
"fiona<=1.9.6;python_version<'3.9'",
"matplotlib",
"seaborn",
"netcdf4",
"haversine",
"cartopy",
"matplotlib-venn<1",
"metpy",
"tqdm",
"pyarrow",
"pyproj"
]
[project.optional-dependencies]
dev = [
"pre-commit",
"pytest",
"ruff",
"tox",
]
docs = [
"pydata-sphinx-theme",
"sphinx-copybutton",
"nbsphinx",
"IPython",
"sphinx-design",
"ipykernel",
"myst-parser",
]
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.package-data]
huracanpy = ["_data/example_data/*", "_data/_ibtracs_files/*"]
[tool.ruff]
extend-include = ["*.ipynb"]
[tool.ruff.lint]
extend-select = [
"ARG", # Flake8 unused arguments
"S", # Flake8 bandit
"T20", # Flake8 print
]
[tool.ruff.lint.per-file-ignores]
# Only check for use of assert/print in main module
"!huracanpy/**" = ["S101", "T20"]
[tool.tox]
requires = ["tox>=4.15.0"]
env_list = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.tox.env_run_base]
extras = ["dev"]
commands = [
["ruff", "format", "--check"],
["ruff", "check"],
["pytest"]
]
# - How to distribute the package
# 0/ Applying black formatting
# 1/ Generate the distribution
# 1a. Make sure that build is up-to-date: `pip install --upgrade build`(add the --user option if necessary)
# 1b. Run python -m build in the package's root directory
# -> Two new files are created in the dist folder, a wheel (.whl) and a tarball (.tar.gz), with the the version code in the present file
# 2/ Distribute the distribution of PyPI
# 2a. Make sure that twine is up-to-date `pip install (--user) --upgrade twine`
# 2b. Upload the package: `python -m twine upload --repository pypi dist/*x.x.x*` (x.x.x = version number)