-
Notifications
You must be signed in to change notification settings - Fork 33
/
pyproject.toml
135 lines (125 loc) · 4.26 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
# Enrich using https://www.maturin.rs/metadata.html
[project]
name = "mocpy"
# 3.6 is no longer maintained and no more supported by maturin
requires-python = ">=3.8"
# https://numpy.org/neps/nep-0029-deprecation_policy.html
# https://docs.astropy.org/en/stable/changelog.html
dependencies = [
"astropy<5.3; python_version == '3.8'",
"astropy; python_version > '3.8'",
"numpy",
"matplotlib", # Used in fill and border
"cdshealpix>=0.6.4", # Used in fill and border
"networkx>=2.5", # Used in get_boundaries
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Rust",
"License :: OSI Approved :: BSD License",
"Topic :: Scientific/Engineering :: Astronomy",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Programming Language :: Python :: 3.8",
"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",
]
keywords=["astronomy", "astrophysics", "HEALPix"]
[project.optional-dependencies]
# optional to load FITS from URLs
query_fits = ["requests"]
# optional to support astropy regions
astropy_regions = ["regions"]
# for the documentation
docs = [
"astropy-sphinx-theme",
"nbsphinx",
"numpydoc",
"sphinx-astropy",
"sphinx-collections",
"sphinx-copybutton",
"sphinx-gallery",
"sphinxcontrib-bibtex",
"ipython" # for syntaxic coloration in docs
]
# for developpement
dev = [
"pre-commit >= 2.20",
"pytest > 6.0",
"pytest-mock",
"pytest-cov",
"requests",
"regions",
"ruff >= 0.5.0"
]
# to run the notebooks
notebooks = [
"astroquery",
"ipyaladin",
"regions",
"nbmake" # to test the notebooks
]
[project.urls]
Documentation = "https://cds-astro.github.io/mocpy/"
Repository = "https://github.com/cds-astro/mocpy"
Issues = "https://github.com/cds-astro/mocpy/issues"
Changelog = "https://github.com/cds-astro/mocpy/blob/master/CHANGELOG.md"
# Build a mocpy-x.x.x.tar.gz containing sources (from maturin).
[build-system]
requires = ["maturin>=0.13"]
build-backend = "maturin"
[tool.maturin]
# See https://github.com/PyO3/maturin#mixed-rustpython-projects
# "to avoid the a common ImportError pitfall"
python-source = "python"
# Bindings type
bindings = "pyo3"
# Strip the library for minimum file size
strip = true
# Build artifacts with the specified Cargo profile
profile = "release"
# Cargo manifest path
# manifest-path = "Cargo.toml"
# Require Cargo.lock and cache are up to date
frozen = false
# Require Cargo.lock is up to date
locked = false
[tool.ruff]
fix = true
show-fixes = true
force-exclude = true
exclude = ["docs/conf.py"]
extend-include = ["*.ipynb"]
target-version = "py38"
[tool.ruff.lint]
extend-select = ["SIM", "FBT", "D", "UP", "N", "S", "B", "A",
"C4", "ICN", "RET", "ARG", "PD", "PGH",
"RUF", "YTT", "BLE", "COM", "DTZ", "EXE",
"ISC", "ICN001", "PIE", "PTH", "W", "I", "T20",
"PYI", "PT", "SIM", "NPY", "PERF", "FURB"
]
extend-ignore = ["D203", "D213", "D100", "N816", "D105", "N806", "N803", "FBT002",
"N802", "COM812", "ISC001"]
# N806, N816: variables names should be lowercase (would require to change all API)
# D203: 1 blank line required before class docstring (not compatible with numpy docstyle)
# FBT002: Boolean default in function definition (would require to change all API)
[tool.ruff.lint.per-file-ignores]
# D104: Missing docstring in public package
# D103: Missing docstring in public function
# D100: Missing docstring in public module
# B008: Do not perforn function call in argument defaults
"__init__.py" = ["D104"]
"python/mocpy/moc/plot/wcs.py" = ["B008"]
"python/mocpy/tests/*.py" = ["S101", "D103"] # S101: use of "assert" detected
"python/mocpy/serializer.py" = ["A002"] # Argument "format" is shadowing a python builtin
"notebooks/*.ipynb" = ["T201"] # print is okish in notebooks
[tool.ruff.lint.pydocstyle]
convention = "numpy" # Accepts: "google", "numpy", or "pep257"
[tool.pytest.ini_options]
addopts = "--doctest-modules"
doctest_optionflags = "NORMALIZE_WHITESPACE"
testpaths = "python"