Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (126 loc) · 3.94 KB
/
Copy pathpyproject.toml
File metadata and controls
139 lines (126 loc) · 3.94 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
127
128
129
130
131
132
133
134
135
136
137
138
139
# Active Fedference Configuration
# Robust federated active inference (FedGVI x Friston et al. 2024)
# Inherits workspace settings from root pyproject.toml
[build-system]
requires = ["setuptools==81.0.0"]
build-backend = "_fedference_build_backend"
backend-path = ["."]
[project]
name = "active_fedference"
version = "1.1.0"
description = "Robust federated active inference: FedGVI applied to Friston et al. (2024) belief sharing"
readme = {file = "README.md", content-type = "text/markdown"}
license = "MIT"
license-files = ["LICENSE"]
authors = [
{name = "Daniel Ari Friedman", email = "daniel@activeinference.institute"}
]
keywords = [
"active inference",
"federated learning",
"generalised variational inference",
"belief sharing",
"robustness",
"FedGVI",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
requires-python = ">=3.10"
dependencies = [
"numpy>=1.24.0",
"scipy>=1.10.0",
"matplotlib>=3.7.0",
"pyyaml>=6.0",
"tomli>=2.0; python_version < '3.11'",
"typing-extensions>=4.9.0",
]
[project.scripts]
fedference = "fedference_cli:main"
[project.urls]
DOI = "https://doi.org/10.5281/zenodo.22149133"
Homepage = "https://github.com/ActiveInferenceInstitute/Active_Fedference"
Repository = "https://github.com/ActiveInferenceInstitute/Active_Fedference"
Documentation = "https://github.com/ActiveInferenceInstitute/Active_Fedference/tree/main/docs"
[project.optional-dependencies]
dev = [
"mypy>=1.17.1",
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"ruff>=0.15.21",
"torch>=2.0.0",
"hypothesis>=6.0",
]
torch = [
"torch>=2.0.0",
]
bnn = [
"torch>=2.0.0",
]
[tool.pytest.ini_options]
# RASP Strict Assertion: Tests must be clearly separated and structurally identifiable
pythonpath = [".", "src"]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
# `--strict-markers` prevents typos in marker definitions
addopts = "-v --tb=short --strict-markers"
markers = [
"requires_torch: tests that require PyTorch installed",
"slow: computationally expensive seeded experiments or publication checks",
"integration: multi-module or transport integration coverage",
"publication: tests that exercise generated manuscript or release artifacts",
]
[tool.coverage.run]
# Core Template Rule: We only calculate coverage for primary source code (`src/`),
# ensuring test code itself does not artificially inflate metric scores.
source = ["src"]
branch = true
omit = [
"tests/*",
"*/__init__.py",
"*/test_*.py",
]
[tool.coverage.report]
# ≥90% on src/ is the enforced gate; the live percentage is recorded in the
# source-bound output/data/test_coverage_receipt.json (do not hardcode it here).
fail_under = 90
show_missing = true
precision = 2
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"raise NotImplementedError",
]
[tool.mypy]
mypy_path = "src"
ignore_missing_imports = true
namespace_packages = true
explicit_package_bases = true
disable_error_code = ["import-untyped"]
[tool.uv]
# Inherits workspace settings from root pyproject.toml
[tool.setuptools.package-data]
fedference = [
"config/*.yaml",
"data/*.csv",
"py.typed",
]
[tool.ruff]
line-length = 110
target-version = "py310"
exclude = [".venv", "output", "**/__pycache__"]
[tool.ruff.lint]
# E=pycodestyle errors, F=pyflakes, W=pycodestyle warnings, I=import sort
# N (naming) and D (docstring) excluded: the project uses uppercase A/B/C for
# likelihood/transition matrices (Active Inference convention) and Google-style
# docstrings with relaxed markup.
select = ["E", "F", "W", "I"]