Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
126 lines (113 loc) · 5.31 KB
/
Copy pathpyproject.toml
File metadata and controls
126 lines (113 loc) · 5.31 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
# Packaging for HJCFIT.
#
# scikit-build-core drives the existing CMake build rather than replacing it, so
# there is one build system rather than two descriptions of the same thing that
# can drift apart.
#
# MPFR is off for wheels. It is the arbitrary-precision fallback for root
# bracketing, it has never been available on Windows, and it cannot be built on
# macOS at all because HJCFITConfig.h.in instantiates std::complex<mpfr::mpreal>,
# which the standard does not define (F26). Shipping it on Linux alone would mean
# wheels that compute slightly different things on different platforms, which is
# worse than not shipping it. Build from source with -DHJCFIT_USE_MPFR=ON if you
# need it.
[build-system]
# swig is a build tool, not a library, and the PyPI package ships a real
# binary so a version can be pinned -- Homebrew, yum and chocolatey each serve
# whatever is current. SWIG 4.5.0 generates Python 2 C-API calls into the
# generated wrapper and the build fails to compile (#188). Putting it here
# rather than in a CI step is what the package documents, and is what puts it
# in the isolated build environment where the console script can import its
# own module.
requires = ["scikit-build-core>=0.10", "numpy>=1.25", "swig<4.5"]
build-backend = "scikit_build_core.build"
[project]
name = "hjcfit"
version = "1.2.0"
description = "Maximum likelihood fitting of ion-channel mechanisms with exact missed-events correction"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10"
authors = [
{ name = "Mayeul d'Avezac" },
{ name = "Jens Hedegaard Nielsen" },
{ name = "Raquel Alegre" },
{ name = "Remigijus Lape" },
]
keywords = [
"ion channels", "single channel", "patch clamp", "electrophysiology",
"maximum likelihood", "Q-matrix", "missed events", "HJC",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
dependencies = [
"numpy>=1.25",
"scipy>=1.10",
]
# The likelihood needs numpy and scipy and nothing else, and a test asserts
# that importing HJCFIT leaves dcio and scalcs out of sys.modules. Reading a
# record, defining a mechanism and running a fit need more than that, so they
# are an extra rather than a dependency: someone who wants Log10Likelihood on
# a Q matrix they already have should not acquire a mechanism library and a
# plotting stack to get it.
#
# pip install hjcfit the likelihood
# pip install hjcfit[fitting] records, mechanisms, fits, displays
#
# scalcs is GPL-2.0-or-later, which HJCFIT (GPL-3.0-or-later) can combine
# with. It could not have been combined with GPL-2.0-only, which is what the
# metadata claimed until DCPROGS/SCALCS#24.
[project.optional-dependencies]
fitting = [
"dcio>=0.1.2", # records: formats, dead time, periods, bursts
# 0.1.2 because 0.1.1 reports the wrong __version__
"scalcs>=1.2.0", # mechanisms, rate constants, constraints, curves
# 1.2.0 because the fitter needs Rate.is_free, which
# 1.1.0 does not have: the looser pin let the extra
# resolve and the fit then fail on a missing attribute
"matplotlib>=3.6", # the displays; nothing in the likelihood draws
# A fit specification is TOML, which is in the standard library from 3.11.
# tomli is the same parser by the same author, for 3.10.
"tomli>=1.1; python_version < '3.11'",
]
# EKDIST -- exponential mixtures and t_crit estimation -- is deliberately not
# an extra. It is not on PyPI, so declaring it would make
# `pip install hjcfit[...]` fail outright rather than install what it can;
# EKDIST's own dcio dependency was unresolvable in exactly that way until dcio
# was published. Install it from source when a display needs it.
# `hjcfit fit spec.toml` -- the command over a fit specification. It needs the
# [fitting] extra to do anything, and says so rather than failing on an import;
# `pip install hjcfit` alone still installs the script, which is better than a
# script whose presence depends on how the package was installed.
[project.scripts]
hjcfit = "HJCFIT.likelihood.cli:main"
[project.urls]
Homepage = "https://github.com/DCPROGS/HJCFIT"
Documentation = "http://dcprogs.github.io/HJCFIT"
Repository = "https://github.com/DCPROGS/HJCFIT"
Issues = "https://github.com/DCPROGS/HJCFIT/issues"
[tool.scikit-build]
cmake.version = ">=3.16"
build-dir = "build/{wheel_tag}"
# Tests need googletest fetched from the network and behave installed; neither
# belongs in a wheel build. The documentation targets need doxygen, sphinx,
# pandoc and latex.
cmake.define.tests = "OFF"
cmake.define.compileDocs = "OFF"
cmake.define.executenotebooks = "OFF"
cmake.define.HJCFIT_USE_MPFR = "OFF"
# The CMake install rules place everything; there is no source package tree to
# copy in on top of them.
wheel.packages = []
# Jupyter's editor state, checked in years ago, duplicates the notebooks it
# shadows -- two copies of a 371 KB file in every source distribution.
sdist.exclude = [".ipynb_checkpoints"]