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 181 182 183 184 185 186 187 188 189
|
[build-system]
requires = [
"hatchling",
"hatch-requirements-txt",
"hatch-sphinx",
"hatch-vcs",
"bumps",
"docutils",
"matplotlib",
"columnize",
"numpy",
"scipy",
"siphash24",
"sphinx",
"tccbox",
]
build-backend = "hatchling.build"
[project]
name = "sasmodels"
dynamic = [
"version",
"dependencies",
"optional-dependencies",
]
description = "SasModels small-angle scattering modelling"
readme = "README.rst"
requires-python = ">=3.9"
license = { text = "Public domain" }
authors = [
{name = "SasView Team", email = "developers@sasview.org"},
]
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: Public Domain',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: C',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Physics',
]
keywords = [
"small-angle",
"scattering",
"data analysis",
"neutron",
"X-ray",
]
[project.urls]
Homepage = "http://sasview.org"
Documentation = "https://www.sasview.org/docs/user/qtgui/Perspectives/Fitting/models/index.html"
Repository = "https://github.com/SasView/sasmodels/"
Issues = "https://github.com/SasView/sasmodels/issues"
Changelog = "https://github.com/SasView/sasmodels/blob/master/CHANGES.rst"
[project.entry-points.pyinstaller40]
hook-dirs = "sasmodels.__pyinstaller:get_hook_dirs"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.metadata.hooks.requirements_txt]
files = [ "build_tools/requirements.txt" ]
[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
test = [ "build_tools/requirements-test.txt" ]
dev = [ "build_tools/requirements-dev.txt" ]
server = [ "build_tools/requirements-server.txt" ]
OpenCL = [ "build_tools/requirements-opencl.txt" ]
CUDA = [ "build_tools/requirements-cuda.txt" ]
docs = [ "build_tools/requirements-docs.txt" ]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "sasmodels/_version.py"
[tool.hatch.build.targets.sdist]
include = [
"build_tools",
"CHANGES.rst",
"conftest.py",
"README.rst",
"doc",
"example",
"explore",
"sasmodels",
]
exclude = [
"build",
"dist",
"__pycache__",
]
ignore-vcs = true
[tool.hatch.build.targets.wheel]
packages = [
"sasmodels",
]
artifacts = [
# match .gitignore but are wanted in the wheel
"sasmodels/models/lib/gauss*.c",
]
exclude = [
"__pycache__",
]
[tool.hatch.build.targets.wheel.force-include]
"doc/" = "sasmodels/docs-source"
[[tool.hatch.build.targets.wheel.hooks.sphinx.tools]]
tool = "custom"
environment = { PYTHONPATH = ".." }
out_dir = "model"
expand_globs = true
commands = [
"{python} genapi.py",
"{python} genmodel.py ../sasmodels/models/[a-z]*.py",
"{python} -c \"import shutil; shutil.copytree('../sasmodels/models/img/', 'model/img/', dirs_exist_ok=True)\"",
"{python} gentoc.py ../sasmodels/models/[a-z]*.py",
]
[[tool.hatch.build.targets.wheel.hooks.sphinx.tools]]
tool = "build"
format = "html"
source = "."
out_dir = "../build/doc"
warnings = true
keep_going = true
[tool.pytest.ini_options]
minversion = "6.0"
addopts = [
"--doctest-modules",
"-v",
"-rsx",
]
doctest_optionflags = "ELLIPSIS"
testpaths = [
"sasmodels",
]
python_files = [
"*.py",
]
python_functions = [
"*_test",
"test_*",
"model_tests",
]
log_level = "DEBUG"
filterwarnings = [
]
norecursedirs = [
"docs-source",
]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
# The ruff rules are available at: https://docs.astral.sh/ruff/rules/
select = ["E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"W", # pycodestyle warnings
"SIM118", # Use `key in dict` instead of `key in dict.keys()`
"SIM300"] # Yoda condition detected
ignore = ["E501", # line too long (leave to formatter)
"UP008", # Use `super()` instead of `super(__class__, self)`
"UP031"] # Use format specifiers instead of percent format
[tool.ruff.lint.isort.sections]
# Group all SasView and SasData imports into a separate section.
"sas" = ["sas", "sasdata"]
[tool.ruff.lint.isort]
section-order = ["future", "standard-library", "third-party", "sas", "first-party", "local-folder"]
|