scipy-yli/yli/config.py

41 lines
1.5 KiB
Python
Raw Normal View History

2022-10-15 23:11:22 +11:00
# scipy-yli: Helpful SciPy utilities and recipes
# Copyright © 2022 Lee Yingtong Li (RunasSudo)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class Config:
2022-10-17 21:41:19 +11:00
"""Global configuration for the library"""
2022-10-15 23:11:22 +11:00
def __init__(self):
2022-10-19 08:54:22 +11:00
# NOTE: If change any attributes here, must also change docs/global.rst
2022-10-17 21:41:19 +11:00
#: Display at least this many decimal places for *p* values (*int*)
2022-10-15 23:11:22 +11:00
self.pvalue_min_dps = 2
2022-10-17 21:41:19 +11:00
#: Display at most this many decimal places for *p* values (*int*)
2022-10-15 23:11:22 +11:00
self.pvalue_max_dps = 3
2022-10-17 21:41:19 +11:00
#: Display a leading zero for *p* values (*bool*)
2022-10-15 23:11:22 +11:00
self.pvalue_leading_zero = True
2022-10-17 21:41:19 +11:00
#: Alpha level for significance tests, confidence intervals (*float*)
2022-10-15 23:11:22 +11:00
self.alpha = 0.05
#: If enabled, `__repr__` on test results, etc. directly calls the ``summary`` function (*bool*)
self.repr_is_summary = True
2023-04-17 22:38:44 +10:00
#: Path to hpstat binary
self.hpstat_path = './hpstat'
2022-10-15 23:11:22 +11:00
2022-10-17 21:41:19 +11:00
"""Global configuration singleton"""
2022-10-15 23:11:22 +11:00
config = Config()