forked from cds-astro/mocpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
125 lines (114 loc) · 3.67 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
# 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'",
"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"
]
[project.optional-dependencies]
# optional to load FITS from URLs
query_fits = ["requests"]
# for the documentation
docs = [
"astropy-sphinx-theme",
"astropy_healpix",
"healpy",
"nbsphinx",
"numpydoc",
"sphinx-astropy",
"sphinx-collections",
"sphinx-copybutton",
"sphinx-gallery",
"sphinxcontrib-bibtex"
]
# for developpement
dev = [
"astropy_healpix",
"pre-commit >= 2.20",
"pytest > 6.0",
"pytest-mock",
"pytest-cov",
"requests"
]
# to run the notebooks
notebooks = [
"astroquery",
"ipyaladin",
"maser-data",
"regions",
"nbmake" # to test the notebooks
]
[project.urls]
repository = "https://github.com/cds-astro/mocpy"
# 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.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.nbqa.addopts]
ruff = ["--ignore=B018,FBT003,T201"]
[tool.ruff]
fix = true
show-fixes = true
force-exclude = true
exclude = ["docs/conf.py"]
extend-include = ["*.ipynb"]
output-format = "grouped"
show-source = true
ignore-init-module-imports = true
target-version = "py37"
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"
]
extend-ignore = ["E501", "D203", "D213", "D100", "N816", "D105", "N806", "N803", "FBT002", "N802"]
# E501: line length (done by black in our case)
# 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.pydocstyle]
convention = "numpy" # Accepts: "google", "numpy", or "pep257"
[tool.pytest.ini_options]
addopts = "--doctest-modules"
doctest_optionflags = "NORMALIZE_WHITESPACE"
testpaths = "python"