plima 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. plima-0.1.1/.github/workflows/ci.yml +60 -0
  2. plima-0.1.1/.github/workflows/docs.yml +45 -0
  3. plima-0.1.1/.github/workflows/publish.yml +32 -0
  4. plima-0.1.1/.gitignore +51 -0
  5. plima-0.1.1/CITATION.cff +14 -0
  6. plima-0.1.1/LICENSE +21 -0
  7. plima-0.1.1/PKG-INFO +91 -0
  8. plima-0.1.1/README.md +53 -0
  9. plima-0.1.1/docs/_build/html/index.html +10 -0
  10. plima-0.1.1/docs/_static/.gitkeep +0 -0
  11. plima-0.1.1/docs/_templates/pages_redirect.html +10 -0
  12. plima-0.1.1/docs/api/.gitkeep +0 -0
  13. plima-0.1.1/docs/api/index.rst +8 -0
  14. plima-0.1.1/docs/conf.py +150 -0
  15. plima-0.1.1/docs/index.rst +5 -0
  16. plima-0.1.1/logo/logo_ellipses.py +204 -0
  17. plima-0.1.1/logo/logo_sticks.py +195 -0
  18. plima-0.1.1/pyproject.toml +244 -0
  19. plima-0.1.1/setup.cfg +4 -0
  20. plima-0.1.1/src/__init__.py +1 -0
  21. plima-0.1.1/src/plima/__init__.py +1 -0
  22. plima-0.1.1/src/plima/__pycache__/__init__.cpython-312.pyc +0 -0
  23. plima-0.1.1/src/plima/_version.py +24 -0
  24. plima-0.1.1/src/plima/backends/__init__.py +1 -0
  25. plima-0.1.1/src/plima/backends/__pycache__/__init__.cpython-312.pyc +0 -0
  26. plima-0.1.1/src/plima/backends/ccl/__init__.py +1 -0
  27. plima-0.1.1/src/plima/backends/ccl/__pycache__/__init__.cpython-312.pyc +0 -0
  28. plima-0.1.1/src/plima/backends/ccl/__pycache__/builder.cpython-312.pyc +0 -0
  29. plima-0.1.1/src/plima/backends/ccl/__pycache__/halo_model.cpython-312.pyc +0 -0
  30. plima-0.1.1/src/plima/backends/ccl/__pycache__/la.cpython-312.pyc +0 -0
  31. plima-0.1.1/src/plima/backends/ccl/__pycache__/nla.cpython-312.pyc +0 -0
  32. plima-0.1.1/src/plima/backends/ccl/__pycache__/tatt.cpython-312.pyc +0 -0
  33. plima-0.1.1/src/plima/backends/ccl/builder.py +294 -0
  34. plima-0.1.1/src/plima/backends/ccl/halo_model.py +471 -0
  35. plima-0.1.1/src/plima/backends/ccl/la.py +69 -0
  36. plima-0.1.1/src/plima/backends/ccl/nla.py +69 -0
  37. plima-0.1.1/src/plima/backends/ccl/tatt.py +314 -0
  38. plima-0.1.1/src/plima/models/__init__.py +19 -0
  39. plima-0.1.1/src/plima/models/__pycache__/__init__.cpython-312.pyc +0 -0
  40. plima-0.1.1/src/plima/models/__pycache__/_discovery.cpython-312.pyc +0 -0
  41. plima-0.1.1/src/plima/models/__pycache__/halo_model.cpython-312.pyc +0 -0
  42. plima-0.1.1/src/plima/models/__pycache__/la.cpython-312.pyc +0 -0
  43. plima-0.1.1/src/plima/models/__pycache__/model_registry.cpython-312.pyc +0 -0
  44. plima-0.1.1/src/plima/models/__pycache__/nla.cpython-312.pyc +0 -0
  45. plima-0.1.1/src/plima/models/__pycache__/tatt.cpython-312.pyc +0 -0
  46. plima-0.1.1/src/plima/models/_discovery.py +27 -0
  47. plima-0.1.1/src/plima/models/halo_model.py +91 -0
  48. plima-0.1.1/src/plima/models/la.py +408 -0
  49. plima-0.1.1/src/plima/models/model_registry.py +88 -0
  50. plima-0.1.1/src/plima/models/nla.py +399 -0
  51. plima-0.1.1/src/plima/models/tatt.py +283 -0
  52. plima-0.1.1/src/plima/utils/__init__.py +1 -0
  53. plima-0.1.1/src/plima/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  54. plima-0.1.1/src/plima/utils/__pycache__/constants.cpython-312.pyc +0 -0
  55. plima-0.1.1/src/plima/utils/__pycache__/converters.cpython-312.pyc +0 -0
  56. plima-0.1.1/src/plima/utils/__pycache__/types.cpython-312.pyc +0 -0
  57. plima-0.1.1/src/plima/utils/__pycache__/validators.cpython-312.pyc +0 -0
  58. plima-0.1.1/src/plima/utils/constants.py +24 -0
  59. plima-0.1.1/src/plima/utils/converters.py +65 -0
  60. plima-0.1.1/src/plima/utils/types.py +15 -0
  61. plima-0.1.1/src/plima/utils/validators.py +170 -0
  62. plima-0.1.1/src/plima.egg-info/PKG-INFO +91 -0
  63. plima-0.1.1/src/plima.egg-info/SOURCES.txt +96 -0
  64. plima-0.1.1/src/plima.egg-info/dependency_links.txt +1 -0
  65. plima-0.1.1/src/plima.egg-info/requires.txt +25 -0
  66. plima-0.1.1/src/plima.egg-info/top_level.txt +1 -0
  67. plima-0.1.1/tests/__pycache__/test_backends_ccl_builder.cpython-312-pytest-8.4.2.pyc +0 -0
  68. plima-0.1.1/tests/__pycache__/test_backends_ccl_halo_model.cpython-312-pytest-8.4.2.pyc +0 -0
  69. plima-0.1.1/tests/__pycache__/test_backends_ccl_la.cpython-312-pytest-8.4.2.pyc +0 -0
  70. plima-0.1.1/tests/__pycache__/test_backends_ccl_nla.cpython-312-pytest-8.4.2.pyc +0 -0
  71. plima-0.1.1/tests/__pycache__/test_backends_ccl_tatt.cpython-312-pytest-8.4.2.pyc +0 -0
  72. plima-0.1.1/tests/__pycache__/test_import.cpython-312-pytest-8.4.2.pyc +0 -0
  73. plima-0.1.1/tests/__pycache__/test_models_discovery.cpython-312-pytest-8.4.2.pyc +0 -0
  74. plima-0.1.1/tests/__pycache__/test_models_halo_model.cpython-312-pytest-8.4.2.pyc +0 -0
  75. plima-0.1.1/tests/__pycache__/test_models_hybrid.cpython-312-pytest-8.4.2.pyc +0 -0
  76. plima-0.1.1/tests/__pycache__/test_models_la.cpython-312-pytest-8.4.2.pyc +0 -0
  77. plima-0.1.1/tests/__pycache__/test_models_model_registry.cpython-312-pytest-8.4.2.pyc +0 -0
  78. plima-0.1.1/tests/__pycache__/test_models_nla.cpython-312-pytest-8.4.2.pyc +0 -0
  79. plima-0.1.1/tests/__pycache__/test_models_tatt.cpython-312-pytest-8.4.2.pyc +0 -0
  80. plima-0.1.1/tests/__pycache__/test_utils_constants.cpython-312-pytest-8.4.2.pyc +0 -0
  81. plima-0.1.1/tests/__pycache__/test_utils_converters.cpython-312-pytest-8.4.2.pyc +0 -0
  82. plima-0.1.1/tests/__pycache__/test_utils_types.cpython-312-pytest-8.4.2.pyc +0 -0
  83. plima-0.1.1/tests/__pycache__/test_utils_validators.cpython-312-pytest-8.4.2.pyc +0 -0
  84. plima-0.1.1/tests/test_backends_ccl_builder.py +637 -0
  85. plima-0.1.1/tests/test_backends_ccl_halo_model.py +438 -0
  86. plima-0.1.1/tests/test_backends_ccl_la.py +211 -0
  87. plima-0.1.1/tests/test_backends_ccl_nla.py +211 -0
  88. plima-0.1.1/tests/test_backends_ccl_tatt.py +386 -0
  89. plima-0.1.1/tests/test_models_discovery.py +169 -0
  90. plima-0.1.1/tests/test_models_halo_model.py +334 -0
  91. plima-0.1.1/tests/test_models_la.py +477 -0
  92. plima-0.1.1/tests/test_models_model_registry.py +251 -0
  93. plima-0.1.1/tests/test_models_nla.py +505 -0
  94. plima-0.1.1/tests/test_models_tatt.py +321 -0
  95. plima-0.1.1/tests/test_utils_constants.py +35 -0
  96. plima-0.1.1/tests/test_utils_converters.py +135 -0
  97. plima-0.1.1/tests/test_utils_types.py +36 -0
  98. plima-0.1.1/tests/test_utils_validators.py +198 -0
@@ -0,0 +1,60 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ branches:
7
+ - main
8
+ schedule:
9
+ - cron: "23 1 * * 0"
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ linting:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up uv with Python 3.12
20
+ uses: astral-sh/setup-uv@v7
21
+ with:
22
+ version: "0.8.22"
23
+ python-version: "3.12"
24
+
25
+ - name: Install dependencies
26
+ run: uv sync --extra dev
27
+
28
+ - name: Run Ruff
29
+ run: uv run tox -e lint -- --output-format github
30
+
31
+ testing:
32
+ needs: linting
33
+ runs-on: ${{ matrix.os }}
34
+ strategy:
35
+ matrix:
36
+ os: [ubuntu-latest]
37
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
38
+
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+
42
+ - name: Set up uv with Python ${{ matrix.python-version }}
43
+ uses: astral-sh/setup-uv@v7
44
+ with:
45
+ version: "0.8.22"
46
+ python-version: ${{ matrix.python-version }}
47
+
48
+ - name: Install dependencies
49
+ run: uv sync --extra dev
50
+
51
+ - name: Run tests
52
+ run: uv run tox -m test
53
+
54
+ finalise:
55
+ runs-on: ubuntu-latest
56
+ needs: [linting, testing]
57
+
58
+ steps:
59
+ - name: Finalise
60
+ run: echo "All done"
@@ -0,0 +1,45 @@
1
+ name: Deploy Sphinx Documentation
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows:
6
+ - CI
7
+ branches:
8
+ - main
9
+ types:
10
+ - completed
11
+
12
+ workflow_dispatch:
13
+
14
+ jobs:
15
+ publish_sphinx_docs:
16
+ if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
17
+ runs-on: ubuntu-latest
18
+
19
+ permissions:
20
+ contents: write
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Set up uv
28
+ uses: astral-sh/setup-uv@v7
29
+ with:
30
+ version: "0.8.22"
31
+ python-version: "3.12"
32
+
33
+ - name: Install docs dependencies
34
+ run: uv sync --extra docs --extra plot --extra dev
35
+
36
+ - name: Build release docs
37
+ run: uv run tox -e docs-releases
38
+
39
+ - name: Deploy
40
+ uses: peaceiris/actions-gh-pages@v4
41
+ with:
42
+ publish_branch: gh-pages
43
+ github_token: ${{ secrets.GITHUB_TOKEN }}
44
+ publish_dir: docs/_build/html
45
+ force_orphan: true
@@ -0,0 +1,32 @@
1
+ name: "Publish new versions of PLIMA to PyPI"
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ environment:
12
+ name: pypi
13
+ permissions:
14
+ id-token: write
15
+ contents: read
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v7
24
+
25
+ - name: Install Python 3.13
26
+ run: uv python install 3.13
27
+
28
+ - name: Build
29
+ run: uv build --no-sources
30
+
31
+ - name: Publish
32
+ run: uv publish
plima-0.1.1/.gitignore ADDED
@@ -0,0 +1,51 @@
1
+ # Bytecode and caches
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ .pytest_cache/
6
+ .ruff_cache/
7
+ .mypy_cache/
8
+ .cache/
9
+ .coverage
10
+ coverage.xml
11
+ htmlcov/
12
+
13
+ # Virtual environments
14
+ .venv/
15
+ venv/
16
+ env/
17
+ .tox/
18
+ .nox/
19
+
20
+ # Build artifacts
21
+ build/
22
+ dist/
23
+ *.egg-info/
24
+ .eggs/
25
+ *.egg
26
+ pip-wheel-metadata/
27
+
28
+ # Generated version file
29
+ src/plima/_version.py
30
+
31
+ # Sphinx docs builds
32
+ docs/_build/
33
+ docs/api/generated/
34
+
35
+ # Jupyter
36
+ .ipynb_checkpoints/
37
+
38
+ # OS files
39
+ .DS_Store
40
+ Thumbs.db
41
+
42
+ # IDE files
43
+ .vscode/
44
+ .idea/
45
+
46
+ # Local env files
47
+ .env
48
+ .env.*
49
+
50
+ # uv
51
+ uv.lock
@@ -0,0 +1,14 @@
1
+ cff-version: 0.1.0
2
+ message: "If you use PLIMA, please cite it as below."
3
+ title: "PLIMA: Python Library for Intrinsic alignment Models and Amplitudes"
4
+ type: software
5
+ version: "0.1.0"
6
+
7
+ authors:
8
+ - given-names: "Nikolina"
9
+ family-names: "Šarčević"
10
+ email: "nikolina.sarcevic@gmail.com"
11
+ orcid: "0000-0001-7301-6415"
12
+
13
+ license: "MIT"
14
+ repository-code: "https://github.com/cosmology-kit/plima"
plima-0.1.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nikolina Šarčević
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
plima-0.1.1/PKG-INFO ADDED
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: plima
3
+ Version: 0.1.1
4
+ Summary: Intrinsic alignment modeling tools for cosmology.
5
+ Author-email: Nikolina Šarčević <nikolina.sarcevic@gmail.com>
6
+ License-Expression: MIT
7
+ Classifier: Intended Audience :: Science/Research
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
11
+ Classifier: Topic :: Scientific/Engineering :: Physics
12
+ Requires-Python: >=3.10
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: numpy>=1.23
16
+ Requires-Dist: scipy
17
+ Requires-Dist: py-lfkit
18
+ Requires-Dist: pybinny
19
+ Requires-Dist: pyccl
20
+ Provides-Extra: plot
21
+ Requires-Dist: matplotlib; extra == "plot"
22
+ Requires-Dist: cmasher; extra == "plot"
23
+ Provides-Extra: docs
24
+ Requires-Dist: sphinx<9; extra == "docs"
25
+ Requires-Dist: sphinx-design; extra == "docs"
26
+ Requires-Dist: sphinx-copybutton; extra == "docs"
27
+ Requires-Dist: furo; extra == "docs"
28
+ Requires-Dist: sphinx-multiversion; extra == "docs"
29
+ Requires-Dist: matplotlib; extra == "docs"
30
+ Requires-Dist: cmasher; extra == "docs"
31
+ Requires-Dist: tox; extra == "docs"
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=7; extra == "dev"
34
+ Requires-Dist: pytest-cov>=4; extra == "dev"
35
+ Requires-Dist: ruff>=0.5; extra == "dev"
36
+ Requires-Dist: tox>=4.22; extra == "dev"
37
+ Dynamic: license-file
38
+
39
+ # plima
40
+
41
+ [![CI](https://img.shields.io/github/actions/workflow/status/cosmology-kit/plima/ci.yml?branch=main&label=CI&color=3b9ab2&style=flat-square)](https://github.com/cosmology-kit/plima/actions/workflows/ci.yml)
42
+ [![Docs](https://img.shields.io/badge/docs-main-3b9ab2?style=flat-square)](https://cosmology-kit.github.io/plima/main/)
43
+ [![License](https://img.shields.io/badge/license-MIT-3b9ab2?style=flat-square)](LICENSE)
44
+
45
+ **PLIMA** is the **Python Library for Intrinsic alignment Models and Amplitudes**.
46
+
47
+ PLIMA provides simple tools for working with intrinsic alignment models in cosmology.
48
+ It includes model level amplitude functions and [CCL](https://ccl.readthedocs.io/en/latest/index.html)
49
+ backend helpers for building intrinsic alignment inputs used in weak lensing analyses.
50
+
51
+ ## Models
52
+
53
+ PLIMA currently includes:
54
+
55
+ * LA
56
+ * NLA
57
+ * TATT
58
+ * halo model IA
59
+
60
+ ## Installation
61
+
62
+ For development, clone the repository and install it in editable mode:
63
+
64
+ ```bash
65
+ git clone https://github.com/cosmology-kit/plima.git
66
+ cd plima
67
+ pip install -e ".[dev]"
68
+ ```
69
+
70
+
71
+ The development documentation is available at:
72
+
73
+ https://cosmology-kit.github.io/plima/main/
74
+
75
+ ## Citation
76
+
77
+ If you use PLIMA in your research, please cite it.
78
+
79
+ ```bibtex
80
+ @software{sarcevic2026plima,
81
+ title = {PLIMA: Python Library for Intrinsic alignment Models and Amplitudes},
82
+ author = {Šarčević, Nikolina},
83
+ year = {2026},
84
+ version = {0.1.0},
85
+ url = {https://github.com/cosmology-kit/plima}
86
+ }
87
+ ```
88
+
89
+ ## License
90
+
91
+ MIT License © 2026 Nikolina Šarčević and contributors.
plima-0.1.1/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # plima
2
+
3
+ [![CI](https://img.shields.io/github/actions/workflow/status/cosmology-kit/plima/ci.yml?branch=main&label=CI&color=3b9ab2&style=flat-square)](https://github.com/cosmology-kit/plima/actions/workflows/ci.yml)
4
+ [![Docs](https://img.shields.io/badge/docs-main-3b9ab2?style=flat-square)](https://cosmology-kit.github.io/plima/main/)
5
+ [![License](https://img.shields.io/badge/license-MIT-3b9ab2?style=flat-square)](LICENSE)
6
+
7
+ **PLIMA** is the **Python Library for Intrinsic alignment Models and Amplitudes**.
8
+
9
+ PLIMA provides simple tools for working with intrinsic alignment models in cosmology.
10
+ It includes model level amplitude functions and [CCL](https://ccl.readthedocs.io/en/latest/index.html)
11
+ backend helpers for building intrinsic alignment inputs used in weak lensing analyses.
12
+
13
+ ## Models
14
+
15
+ PLIMA currently includes:
16
+
17
+ * LA
18
+ * NLA
19
+ * TATT
20
+ * halo model IA
21
+
22
+ ## Installation
23
+
24
+ For development, clone the repository and install it in editable mode:
25
+
26
+ ```bash
27
+ git clone https://github.com/cosmology-kit/plima.git
28
+ cd plima
29
+ pip install -e ".[dev]"
30
+ ```
31
+
32
+
33
+ The development documentation is available at:
34
+
35
+ https://cosmology-kit.github.io/plima/main/
36
+
37
+ ## Citation
38
+
39
+ If you use PLIMA in your research, please cite it.
40
+
41
+ ```bibtex
42
+ @software{sarcevic2026plima,
43
+ title = {PLIMA: Python Library for Intrinsic alignment Models and Amplitudes},
44
+ author = {Šarčević, Nikolina},
45
+ year = {2026},
46
+ version = {0.1.0},
47
+ url = {https://github.com/cosmology-kit/plima}
48
+ }
49
+ ```
50
+
51
+ ## License
52
+
53
+ MIT License © 2026 Nikolina Šarčević and contributors.
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="refresh" content="0; url=main/" />
5
+ <title>Redirecting...</title>
6
+ </head>
7
+ <body>
8
+ <p>Redirecting to <a href="main/">main</a>.</p>
9
+ </body>
10
+ </html>
File without changes
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="refresh" content="0; url=main/" />
5
+ <title>Redirecting...</title>
6
+ </head>
7
+ <body>
8
+ <p>Redirecting to <a href="main/">main</a>.</p>
9
+ </body>
10
+ </html>
File without changes
@@ -0,0 +1,8 @@
1
+ API Reference
2
+ =============
3
+
4
+ .. autosummary::
5
+ :toctree: generated
6
+ :recursive:
7
+
8
+ plima
@@ -0,0 +1,150 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import sys
7
+ import warnings
8
+
9
+ import matplotlib
10
+
11
+ matplotlib.use("Agg")
12
+
13
+ # -----------------------------------------------------------------------------
14
+ # Ensure src/ layout imports work
15
+ # -----------------------------------------------------------------------------
16
+ sys.path.insert(0, os.path.abspath("../src"))
17
+
18
+ warnings.filterwarnings(
19
+ "ignore",
20
+ category=SyntaxWarning,
21
+ module=r"colorspacious\.comparison",
22
+ )
23
+
24
+ # -----------------------------------------------------------------------------
25
+ # Project information
26
+ # -----------------------------------------------------------------------------
27
+ project = "PLIMA"
28
+ author = "Nikolina Šarčević"
29
+ copyright = "2026, Nikolina Šarčević"
30
+
31
+ # Remove default "documentation" suffix in browser title
32
+ html_title = "PLIMA Documentation"
33
+
34
+ # -----------------------------------------------------------------------------
35
+ # General configuration
36
+ # -----------------------------------------------------------------------------
37
+ extensions = [
38
+ "sphinx.ext.autodoc",
39
+ "sphinx.ext.autosummary",
40
+ "sphinx.ext.napoleon",
41
+ "sphinx.ext.viewcode",
42
+ "sphinx.ext.doctest",
43
+ "sphinx.ext.githubpages",
44
+ "matplotlib.sphinxext.plot_directive",
45
+ "sphinx_design",
46
+ "sphinx_multiversion",
47
+ "sphinx.ext.mathjax",
48
+ "sphinx_copybutton",
49
+ ]
50
+
51
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
52
+
53
+ # -----------------------------------------------------------------------------
54
+ # Autodoc / autosummary
55
+ # -----------------------------------------------------------------------------
56
+ autosummary_generate = True
57
+ autodoc_typehints = "description"
58
+
59
+ napoleon_google_docstring = True
60
+ napoleon_numpy_docstring = False
61
+
62
+ autoclass_content = "both"
63
+
64
+ autodoc_default_options = {
65
+ "members": True,
66
+ }
67
+
68
+ # -----------------------------------------------------------------------------
69
+ # Doctest configuration
70
+ # -----------------------------------------------------------------------------
71
+ doctest_global_setup = r"""
72
+ import numpy as np
73
+ np.set_printoptions(precision=12, suppress=True)
74
+ """
75
+
76
+ # -----------------------------------------------------------------------------
77
+ # HTML output
78
+ # -----------------------------------------------------------------------------
79
+ html_baseurl = "https://cosmology-kit.github.io/plima/"
80
+
81
+ html_theme = "furo"
82
+ html_permalinks_icon = "<span>#</span>"
83
+
84
+ html_static_path = ["_static"]
85
+
86
+ html_theme_options = {
87
+ "source_repository": "https://github.com/cosmology-kit/plima/",
88
+ "source_branch": "main",
89
+ "source_directory": "docs/",
90
+ "light_css_variables": {
91
+ "color-brand-primary": "#3B9AB2",
92
+ "color-brand-content": "#3B9AB2",
93
+ "color-link": "#3B9AB2",
94
+ "color-link--hover": "#F21A00",
95
+ "color-link--visited": "#3B9AB2",
96
+ },
97
+ "dark_css_variables": {
98
+ "color-brand-primary": "#3B9AB2",
99
+ "color-brand-content": "#3B9AB2",
100
+ "color-link": "#3B9AB2",
101
+ "color-link--hover": "#F21A00",
102
+ "color-link--visited": "#3B9AB2",
103
+ },
104
+ }
105
+
106
+ html_css_files = [
107
+ "custom.css",
108
+ ]
109
+
110
+ # -----------------------------------------------------------------------------
111
+ # Matplotlib plot directive
112
+ # -----------------------------------------------------------------------------
113
+ plot_html_show_source_link = False
114
+
115
+ plot_formats = [("png", 300)]
116
+
117
+ plot_rcparams = {
118
+ "figure.dpi": 150,
119
+ "savefig.dpi": 150,
120
+ "xtick.direction": "in",
121
+ "ytick.direction": "in",
122
+ "xtick.top": True,
123
+ "ytick.right": True,
124
+ "font.size": 15,
125
+ "axes.labelsize": 15,
126
+ "axes.titlesize": 17,
127
+ "legend.fontsize": 15,
128
+ "xtick.labelsize": 13,
129
+ "ytick.labelsize": 13,
130
+ "axes.linewidth": 2,
131
+ "xtick.major.width": 1.2,
132
+ "ytick.major.width": 1.2,
133
+ }
134
+
135
+ # -----------------------------------------------------------------------------
136
+ # Sphinx multiversion
137
+ # -----------------------------------------------------------------------------
138
+ smv_tag_whitelist = r"^v\d+\.\d+\.\d+$"
139
+ smv_branch_whitelist = r"^main$"
140
+ smv_remote_whitelist = r"^origin$"
141
+ smv_released_pattern = r"^refs/tags/v\d+\.\d+\.\d+$"
142
+ smv_outputdir_format = "{ref.name}"
143
+ smv_site_url = "https://cosmology-kit.github.io/plima/"
144
+
145
+ # -----------------------------------------------------------------------------
146
+ # Copybutton configuration
147
+ # -----------------------------------------------------------------------------
148
+ copybutton_prompt_text = r">>> |\.\.\. "
149
+ copybutton_prompt_is_regexp = True
150
+ copybutton_copy_empty_lines = False
@@ -0,0 +1,5 @@
1
+ .. toctree::
2
+ :maxdepth: 2
3
+ :caption: Contents:
4
+
5
+ api/index