calins 1.0.0b2__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.
- calins-1.0.0b2/.github/workflows/ci.yml +46 -0
- calins-1.0.0b2/.github/workflows/deploy-docs.yml +56 -0
- calins-1.0.0b2/.github/workflows/publish-pypi.yml +85 -0
- calins-1.0.0b2/.gitignore +26 -0
- calins-1.0.0b2/.nojekyll +0 -0
- calins-1.0.0b2/.pre-commit-config.yaml +23 -0
- calins-1.0.0b2/LICENSE +29 -0
- calins-1.0.0b2/PKG-INFO +586 -0
- calins-1.0.0b2/README.md +540 -0
- calins-1.0.0b2/USER_EXAMPLES.ipynb +733 -0
- calins-1.0.0b2/docs/citation.md +16 -0
- calins-1.0.0b2/docs/contributing.md +25 -0
- calins-1.0.0b2/docs/developer-manual/class_plot_helpers.md +44 -0
- calins-1.0.0b2/docs/developer-manual/classes.md +178 -0
- calins-1.0.0b2/docs/developer-manual/errors.md +8 -0
- calins-1.0.0b2/docs/developer-manual/logs.md +20 -0
- calins-1.0.0b2/docs/developer-manual/methods.md +123 -0
- calins-1.0.0b2/docs/developer-manual/plots.md +11 -0
- calins-1.0.0b2/docs/images/Assim.PNG +0 -0
- calins-1.0.0b2/docs/images/Bench_list.PNG +0 -0
- calins-1.0.0b2/docs/images/Case_sensi.PNG +0 -0
- calins-1.0.0b2/docs/images/Contributions.PNG +0 -0
- calins-1.0.0b2/docs/images/Image_maker/Diapositive1.PNG +0 -0
- calins-1.0.0b2/docs/images/Image_maker/Diapositive2.PNG +0 -0
- calins-1.0.0b2/docs/images/Image_maker/Diapositive3.PNG +0 -0
- calins-1.0.0b2/docs/images/Image_maker/Diapositive4.PNG +0 -0
- calins-1.0.0b2/docs/images/Image_maker/Diapositive5.PNG +0 -0
- calins-1.0.0b2/docs/images/Image_maker/Diapositive6.PNG +0 -0
- calins-1.0.0b2/docs/images/Image_maker/Diapositive7.PNG +0 -0
- calins-1.0.0b2/docs/images/Image_maker.pptx +0 -0
- calins-1.0.0b2/docs/images/Iso_reac_list.PNG +0 -0
- calins-1.0.0b2/docs/images/Logo.PNG +0 -0
- calins-1.0.0b2/docs/images/Sensi_heatmap.PNG +0 -0
- calins-1.0.0b2/docs/index.md +39 -0
- calins-1.0.0b2/docs/installation.md +57 -0
- calins-1.0.0b2/docs/javascripts/mathjax.js +21 -0
- calins-1.0.0b2/docs/license.md +45 -0
- calins-1.0.0b2/docs/points-of-attention.md +37 -0
- calins-1.0.0b2/docs/stylesheets/extra.css +183 -0
- calins-1.0.0b2/docs/theory/alignment-rule.md +4 -0
- calins-1.0.0b2/docs/theory/assimilation-gllsm.md +136 -0
- calins-1.0.0b2/docs/theory/covariance-matrix.md +10 -0
- calins-1.0.0b2/docs/theory/experimental-correlations.md +6 -0
- calins-1.0.0b2/docs/theory/introduction.md +12 -0
- calins-1.0.0b2/docs/theory/sensitivity-vector.md +8 -0
- calins-1.0.0b2/docs/theory/uncertainty-calculation.md +9 -0
- calins-1.0.0b2/docs/theory/validation-methods.md +344 -0
- calins-1.0.0b2/docs/troubleshooting.md +63 -0
- calins-1.0.0b2/docs/usage-examples/calculating-uncertainty.md +33 -0
- calins-1.0.0b2/docs/usage-examples/computing-similarity-indices.md +54 -0
- calins-1.0.0b2/docs/usage-examples/creating-case-object.md +32 -0
- calins-1.0.0b2/docs/usage-examples/loading-covariance-data.md +153 -0
- calins-1.0.0b2/docs/usage-examples/performing-data-assimilation.md +125 -0
- calins-1.0.0b2/docs/usage-examples/sensitivity-analysis-case-screening.md +81 -0
- calins-1.0.0b2/mkdocs.yml +78 -0
- calins-1.0.0b2/pyproject.toml +110 -0
- calins-1.0.0b2/requirements.txt +6 -0
- calins-1.0.0b2/setup.cfg +4 -0
- calins-1.0.0b2/src/calins/__init__.py +190 -0
- calins-1.0.0b2/src/calins/_logging.py +232 -0
- calins-1.0.0b2/src/calins/_version.py +24 -0
- calins-1.0.0b2/src/calins/analysis/__init__.py +1 -0
- calins-1.0.0b2/src/calins/analysis/bias.py +322 -0
- calins-1.0.0b2/src/calins/analysis/comparison.py +210 -0
- calins-1.0.0b2/src/calins/analysis/screening.py +784 -0
- calins-1.0.0b2/src/calins/analysis/similarity.py +700 -0
- calins-1.0.0b2/src/calins/analysis/uncertainty.py +512 -0
- calins-1.0.0b2/src/calins/assimilation/__init__.py +5 -0
- calins-1.0.0b2/src/calins/assimilation/gllsm.py +1077 -0
- calins-1.0.0b2/src/calins/assimilation/usl.py +841 -0
- calins-1.0.0b2/src/calins/case.py +801 -0
- calins-1.0.0b2/src/calins/config.py +56 -0
- calins-1.0.0b2/src/calins/constants.py +16 -0
- calins-1.0.0b2/src/calins/core/__init__.py +1 -0
- calins-1.0.0b2/src/calins/core/alignment.py +437 -0
- calins-1.0.0b2/src/calins/core/linalg.py +41 -0
- calins-1.0.0b2/src/calins/core/nuclides.py +112 -0
- calins-1.0.0b2/src/calins/covariances.py +353 -0
- calins-1.0.0b2/src/calins/data/Logo.PNG +0 -0
- calins-1.0.0b2/src/calins/data/html.model +95 -0
- calins-1.0.0b2/src/calins/data/iso_id.json +1 -0
- calins-1.0.0b2/src/calins/data/reac_id.json +1 -0
- calins-1.0.0b2/src/calins/datatypes.py +96 -0
- calins-1.0.0b2/src/calins/exceptions.py +40 -0
- calins-1.0.0b2/src/calins/io/__init__.py +1 -0
- calins-1.0.0b2/src/calins/io/covariances/__init__.py +85 -0
- calins-1.0.0b2/src/calins/io/covariances/comac.py +130 -0
- calins-1.0.0b2/src/calins/io/covariances/coverx.py +286 -0
- calins-1.0.0b2/src/calins/io/covariances/gendf.py +234 -0
- calins-1.0.0b2/src/calins/io/covariances/xlsx.py +86 -0
- calins-1.0.0b2/src/calins/io/sdf.py +687 -0
- calins-1.0.0b2/src/calins/plotting/__init__.py +1 -0
- calins-1.0.0b2/src/calins/plotting/figures.py +511 -0
- calins-1.0.0b2/src/calins/plotting/helpers.py +398 -0
- calins-1.0.0b2/src/calins/reporting/__init__.py +1 -0
- calins-1.0.0b2/src/calins/reporting/assimilation_report.py +1652 -0
- calins-1.0.0b2/src/calins/reporting/case_report.py +129 -0
- calins-1.0.0b2/src/calins/reporting/html.py +158 -0
- calins-1.0.0b2/src/calins/reporting/uncertainty_report.py +336 -0
- calins-1.0.0b2/src/calins/src/__init__.py +51 -0
- calins-1.0.0b2/src/calins/src/class_plot_helpers.py +7 -0
- calins-1.0.0b2/src/calins/src/classes.py +24 -0
- calins-1.0.0b2/src/calins/src/errors.py +14 -0
- calins-1.0.0b2/src/calins/src/logs.py +13 -0
- calins-1.0.0b2/src/calins/src/methods.py +58 -0
- calins-1.0.0b2/src/calins/src/plots.py +26 -0
- calins-1.0.0b2/src/calins/src/version.py +7 -0
- calins-1.0.0b2/src/calins/version.py +18 -0
- calins-1.0.0b2/src/calins.egg-info/PKG-INFO +586 -0
- calins-1.0.0b2/src/calins.egg-info/SOURCES.txt +129 -0
- calins-1.0.0b2/src/calins.egg-info/dependency_links.txt +1 -0
- calins-1.0.0b2/src/calins.egg-info/requires.txt +26 -0
- calins-1.0.0b2/src/calins.egg-info/scm_file_list.json +125 -0
- calins-1.0.0b2/src/calins.egg-info/scm_version.json +8 -0
- calins-1.0.0b2/src/calins.egg-info/top_level.txt +1 -0
- calins-1.0.0b2/tests/__init__.py +1 -0
- calins-1.0.0b2/tests/conftest.py +79 -0
- calins-1.0.0b2/tests/test_data_model.py +313 -0
- calins-1.0.0b2/tests/test_inputs/cov_corrupted_2_comac/cov_Am241 +10 -0
- calins-1.0.0b2/tests/test_inputs/cov_corrupted_2_comac/cov_Fe56 +5 -0
- calins-1.0.0b2/tests/test_inputs/cov_proper_1.txt +15 -0
- calins-1.0.0b2/tests/test_inputs/cov_proper_2_comac/cov_Am241 +10 -0
- calins-1.0.0b2/tests/test_inputs/cov_proper_2_comac/cov_Fe56 +5 -0
- calins-1.0.0b2/tests/test_inputs/empty_file.txt +0 -0
- calins-1.0.0b2/tests/test_inputs/sensi_corrupted_1.sdf +18 -0
- calins-1.0.0b2/tests/test_inputs/sensi_proper_1.sdf +33 -0
- calins-1.0.0b2/tests/test_inputs/sensi_proper_2.sdf +18 -0
- calins-1.0.0b2/tests/test_inputs/sensi_proper_3.sdf +37 -0
- calins-1.0.0b2/tests/test_inputs/sensi_proper_4.sdf +37 -0
- calins-1.0.0b2/tests/test_regressions.py +316 -0
- calins-1.0.0b2/tests/test_unit.py +774 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Unit Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-24.04
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
- name: Ruff
|
|
18
|
+
run: |
|
|
19
|
+
pip install "ruff>=0.5"
|
|
20
|
+
ruff check src tests
|
|
21
|
+
|
|
22
|
+
unit-test-job:
|
|
23
|
+
runs-on: ubuntu-24.04
|
|
24
|
+
strategy:
|
|
25
|
+
fail-fast: false
|
|
26
|
+
matrix:
|
|
27
|
+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout repository
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
|
+
with:
|
|
32
|
+
fetch-depth: 0 # git tags are needed by setuptools-scm for the version
|
|
33
|
+
|
|
34
|
+
- name: Setup Python
|
|
35
|
+
uses: actions/setup-python@v5
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python-version }}
|
|
38
|
+
cache: pip
|
|
39
|
+
|
|
40
|
+
- name: Install package
|
|
41
|
+
run: |
|
|
42
|
+
python -m pip install --upgrade pip
|
|
43
|
+
pip install -e .[dev]
|
|
44
|
+
|
|
45
|
+
- name: Run unit tests
|
|
46
|
+
run: pytest tests --cov=calins --cov-report=term-missing
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: Deploy MkDocs to GitHub Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
pages: write
|
|
12
|
+
id-token: write
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: "pages"
|
|
16
|
+
cancel-in-progress: false
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
runs-on: ubuntu-24.04
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Setup Python
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: '3.9'
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: |
|
|
32
|
+
pip install mkdocs-material
|
|
33
|
+
pip install pymdown-extensions
|
|
34
|
+
|
|
35
|
+
- name: Build MkDocs
|
|
36
|
+
run: mkdocs build
|
|
37
|
+
|
|
38
|
+
- name: Setup Pages
|
|
39
|
+
uses: actions/configure-pages@v4
|
|
40
|
+
|
|
41
|
+
- name: Upload artifact
|
|
42
|
+
uses: actions/upload-pages-artifact@v3
|
|
43
|
+
with:
|
|
44
|
+
path: './site'
|
|
45
|
+
|
|
46
|
+
deploy:
|
|
47
|
+
environment:
|
|
48
|
+
name: github-pages
|
|
49
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
needs: build
|
|
52
|
+
if: github.ref == 'refs/heads/main'
|
|
53
|
+
steps:
|
|
54
|
+
- name: Deploy to GitHub Pages
|
|
55
|
+
id: deployment
|
|
56
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: Publish package to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
name: Build and check distributions
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout tagged commit
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.13"
|
|
26
|
+
|
|
27
|
+
- name: Install build tools
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
python -m pip install build twine
|
|
31
|
+
|
|
32
|
+
- name: Build wheel and source distribution
|
|
33
|
+
run: python -m build
|
|
34
|
+
|
|
35
|
+
- name: Check distributions
|
|
36
|
+
run: python -m twine check dist/*
|
|
37
|
+
|
|
38
|
+
- name: Verify generated version
|
|
39
|
+
shell: bash
|
|
40
|
+
run: |
|
|
41
|
+
python -m pip install --force-reinstall --no-deps dist/*.whl
|
|
42
|
+
python - <<'PY'
|
|
43
|
+
import os
|
|
44
|
+
from importlib.metadata import version
|
|
45
|
+
|
|
46
|
+
tag = os.environ["GITHUB_REF_NAME"]
|
|
47
|
+
expected = tag.removeprefix("v")
|
|
48
|
+
actual = version("calins")
|
|
49
|
+
print(f"Tag: {tag}")
|
|
50
|
+
print(f"Expected package version: {expected}")
|
|
51
|
+
print(f"Built package version: {actual}")
|
|
52
|
+
if actual != expected:
|
|
53
|
+
raise SystemExit(f"Version mismatch: tag={tag}, package={actual}")
|
|
54
|
+
PY
|
|
55
|
+
|
|
56
|
+
- name: Upload distributions
|
|
57
|
+
uses: actions/upload-artifact@v4
|
|
58
|
+
with:
|
|
59
|
+
name: calins-distributions
|
|
60
|
+
path: dist/
|
|
61
|
+
if-no-files-found: error
|
|
62
|
+
|
|
63
|
+
publish:
|
|
64
|
+
name: Publish to PyPI
|
|
65
|
+
needs: build
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
|
|
68
|
+
environment:
|
|
69
|
+
name: pypi
|
|
70
|
+
url: https://pypi.org/p/calins
|
|
71
|
+
|
|
72
|
+
permissions:
|
|
73
|
+
id-token: write
|
|
74
|
+
|
|
75
|
+
steps:
|
|
76
|
+
- name: Download distributions
|
|
77
|
+
uses: actions/download-artifact@v4
|
|
78
|
+
with:
|
|
79
|
+
name: calins-distributions
|
|
80
|
+
path: dist/
|
|
81
|
+
|
|
82
|
+
- name: Publish package
|
|
83
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
84
|
+
with:
|
|
85
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
|
|
8
|
+
# Version file generated by setuptools-scm
|
|
9
|
+
src/calins/_version.py
|
|
10
|
+
|
|
11
|
+
# Tests / coverage
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.coverage
|
|
14
|
+
coverage.xml
|
|
15
|
+
htmlcov/
|
|
16
|
+
|
|
17
|
+
# Tools
|
|
18
|
+
.ruff_cache/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
|
|
21
|
+
# Documentation build
|
|
22
|
+
site/
|
|
23
|
+
|
|
24
|
+
# Environments
|
|
25
|
+
.venv/
|
|
26
|
+
venv/
|
calins-1.0.0b2/.nojekyll
ADDED
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Installation: pip install -e .[dev] && pre-commit install
|
|
2
|
+
repos:
|
|
3
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
4
|
+
rev: v4.6.0
|
|
5
|
+
hooks:
|
|
6
|
+
- id: trailing-whitespace
|
|
7
|
+
exclude: ^tests/test_inputs/
|
|
8
|
+
- id: end-of-file-fixer
|
|
9
|
+
exclude: ^tests/test_inputs/
|
|
10
|
+
- id: check-yaml
|
|
11
|
+
- id: check-toml
|
|
12
|
+
- id: check-added-large-files
|
|
13
|
+
|
|
14
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
15
|
+
rev: v0.5.7
|
|
16
|
+
hooks:
|
|
17
|
+
- id: ruff
|
|
18
|
+
args: [--fix]
|
|
19
|
+
|
|
20
|
+
- repo: https://github.com/psf/black
|
|
21
|
+
rev: 24.8.0
|
|
22
|
+
hooks:
|
|
23
|
+
- id: black
|
calins-1.0.0b2/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, French Authority for Nuclear Safety and Radiation Protection (ASNR)
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|