Skip to content

Commit 100145e

Browse files
committed
from setup to pyproject
1 parent c6110c8 commit 100145e

4 files changed

Lines changed: 115 additions & 45 deletions

File tree

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include BayesicFitting/examples/*.ipynb
2-
include BayesicFitting/examples/data/*.csv
2+
include BayesicFitting/examples/data/*
33
include docs/images/*.dia
44
include docs/images/*.png
5+
include docs/images/*.svg
56
include docs/*.md
67
include LICENSE

docs/manual.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,16 +1202,16 @@ A **Sample** is a collection of items.
12021202

12031203
The resulting samples from the posterior are collected in list of
12041204
samples, a **SampleList**. Once a sample list is obtained from a
1205-
NestedSampler run, weighted average parameters and scale can be obtainde
1206-
from it. The maximum likelihood version of the same, is located at the
1205+
NestedSampler run, weighted average parameters and scale can be
1206+
calculated. Maximum likelihood versions of the same, are located at the
12071207
last index of the sample list. Median and modus version can be found at
12081208
the midpoint of the cumulative weights, resp. the maximum value of the
12091209
weights.
12101210

12111211
slist = ns.samples
12121212
param = slist.parameters ## same as params above
12131213
mlpar = slist.maxLikelihoodParameters
1214-
1214+
medianIndex = slist.medianIndex
12151215

12161216

12171217

pyproject.toml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "BayesicFitting"
7+
version = "3.2.5"
8+
dependencies = [
9+
'numpy >= 1.9',
10+
'matplotlib >= 2.0',
11+
'scipy >= 1.0',
12+
'astropy >= 2.0',
13+
'future'
14+
]
15+
authors = [
16+
{ name = "Do Kester", email = "dokester@home.nl" }
17+
]
18+
description = "A Toolbox for Bayesian Fitting and Evidence Calculation"
19+
readme = "README.md"
20+
requires-python = ">=3.8"
21+
license = "GPL-3.0-or-later"
22+
keywords = [
23+
'Bayesian', 'modeling', 'evidence', 'statistics', 'analysis',
24+
'regression', 'inference', 'optimization','nested sampling', 'fitting'
25+
]
26+
classifiers = [
27+
"Development Status :: 4 - Beta",
28+
"Programming Language :: Python :: 3",
29+
"Operating System :: OS Independent",
30+
"Intended Audience :: Science/Research",
31+
"Topic :: Scientific/Engineering"
32+
]
33+
34+
[project-urls]
35+
homepage = "https://dokester.github.io/BayesicFitting/"
36+
37+
#[tool.setuptools]
38+
#packages=[
39+
# 'BayesicFitting', 'BayesicFitting/source', 'BayesicFitting/source/kernels',
40+
# 'BayesicFitting/test', 'BayesicFitting/examples'
41+
#]
42+
43+
[tool.ruff]
44+
# Exclude a variety of commonly ignored directories.
45+
exclude = [
46+
"BayesicFitting/TBD-examples",
47+
"BayesicFitting/TBD-tests",
48+
"BayesicFitting/__pycache__",
49+
".git",
50+
".pytest_cache",
51+
".ruff_cache",
52+
"build",
53+
"_build",
54+
"dist",
55+
"docs",
56+
"REFDOC",
57+
"refman"
58+
]
59+
60+
# Same as Black.
61+
line-length = 100
62+
indent-width = 4
63+
64+
# Assume Python 3.8
65+
target-version = "py310"
66+
67+
[tool.ruff.lint]
68+
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
69+
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
70+
# McCabe complexity (`C901`) by default.
71+
select = ["E4", "E7", "E9", "F", "NPY201"]
72+
73+
# F401 : imported not used
74+
# E701 : multiple statements on one line
75+
ignore = ["F401", "E701"]
76+
77+
# Allow fix for all enabled rules (when `--fix`) is provided.
78+
fixable = ["ALL"]
79+
unfixable = []
80+
81+
# Allow unused variables when underscore-prefixed.
82+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
83+
84+
[tool.ruff.format]
85+
# Like Black, use double quotes for strings.
86+
quote-style = "double"
87+
88+
# Like Black, indent with spaces, rather than tabs.
89+
indent-style = "space"
90+
91+
# Like Black, respect magic trailing commas.
92+
skip-magic-trailing-comma = false
93+
94+
# Like Black, automatically detect the appropriate line ending.
95+
line-ending = "auto"
96+
97+
# Enable auto-formatting of code examples in docstrings. Markdown,
98+
# reStructuredText code/literal blocks and doctests are all supported.
99+
#
100+
# This is currently disabled by default, but it is planned for this
101+
# to be opt-out in the future.
102+
docstring-code-format = false
103+
104+
# Set the line length limit used when formatting code snippets in
105+
# docstrings.
106+
#
107+
# This only has an effect when the `docstring-code-format` setting is
108+
# enabled.
109+
docstring-code-line-length = "dynamic"
110+

setup.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)