Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.0.25 #441

Merged
merged 32 commits into from
Dec 16, 2024
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6dce78e
Bump dawidd6/action-download-artifact from 2 to 6 in /.github/workflows
dependabot[bot] Dec 4, 2024
06c6597
Upgrade `upload-artifact` to v4
mhostetter Dec 11, 2024
754acba
Allow fork artifacts in CI
mhostetter Dec 11, 2024
1cfff10
Upgrade `actions/download-artifact` to v4
mhostetter Dec 11, 2024
71a5217
Change `\ldots` to `\dots`
mhostetter Dec 16, 2024
614c469
Add `sdr.max_distribution()`
mhostetter Dec 16, 2024
5197dc3
Add unit tests for #435
mhostetter Dec 16, 2024
7790d40
Update the docstring
mhostetter Dec 16, 2024
33b69b1
Clean up `sum_distribution()`
mhostetter Dec 16, 2024
891228b
Clean up `sum_distributions()`
mhostetter Dec 16, 2024
874e58a
Clean up `multiply_distributions()`
mhostetter Dec 16, 2024
9b8aa2c
Minor tweaks
mhostetter Dec 16, 2024
25e5690
Add `sdr.min_distribution()`
mhostetter Dec 16, 2024
e824ead
Add unit test for #438
mhostetter Dec 16, 2024
5fef507
Rename `sum_distribution(s)` to `add_distribution(s)`
mhostetter Dec 16, 2024
b4065be
Rename files
mhostetter Dec 16, 2024
6da59fb
Compute exact `add_distribution()` when possible
mhostetter Dec 16, 2024
54a3a38
Add unit tests for #439
mhostetter Dec 16, 2024
9640305
Fix LaTeX
mhostetter Dec 16, 2024
919ddde
Rename `add_distribution()` to `add_iid_rvs()`
mhostetter Dec 16, 2024
05f8368
Rename `add_distributions()` to `add_rvs()`
mhostetter Dec 16, 2024
10b9af3
Rename `multiply_distributions()` to `multiply_rvs()`
mhostetter Dec 16, 2024
a970860
Rename `min_distribution()` to `min_iid_rvs()`
mhostetter Dec 16, 2024
0cbab19
Rename `max_distribution()` to `max_iid_rvs()`
mhostetter Dec 16, 2024
40df69f
Rename doc images
mhostetter Dec 16, 2024
9d0a1d8
Add `sdr.subtract_rvs()`
mhostetter Dec 16, 2024
e2bed3e
Add unit test for #436
mhostetter Dec 16, 2024
17475d9
Fix capitalization
mhostetter Dec 16, 2024
eef8e86
Reword
mhostetter Dec 16, 2024
5dd6cd6
Bump `galois` version to 0.4.3
mhostetter Dec 16, 2024
3b884b8
Add correction about NumPy 2.1 support
mhostetter Dec 16, 2024
803ac9d
Add release notes for v0.0.25
mhostetter Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ jobs:
run: python3 -m twine check dist/*

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
4 changes: 2 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ jobs:
run: tar -czvf docs.tar.gz -C docs/build/ .

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: docs.tar.gz
@@ -69,7 +69,7 @@ jobs:
ref: gh-pages

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docs

9 changes: 6 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -44,12 +44,13 @@ jobs:
run: python3 -m pip install --upgrade pip

- name: Download wheel artifact
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
workflow: build.yaml
workflow_conclusion: success
commit: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
# NOTE: Fake ternary operator, see https://github.com/actions/runner/issues/409
allow_forks: true

# This is needed because Windows terminal cannot expand `pip install sdr-*.whl`
- name: Get wheel file name
@@ -98,11 +99,12 @@ jobs:
# run: python3 -m pip install --upgrade pip

# - name: Download wheel artifact
# uses: dawidd6/action-download-artifact@v2
# uses: dawidd6/action-download-artifact@v6
# with:
# workflow: build.yaml
# workflow_conclusion: success
# commit: ${{github.event.pull_request.head.sha}}
# allow_forks: true

# # This is needed because Windows terminal cannot expand `pip install sdr-*.whl`
# - name: Get wheel file name
@@ -152,11 +154,12 @@ jobs:
run: python3 -m pip install --upgrade pip

- name: Download wheel artifact
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v6
with:
workflow: build.yaml
workflow_conclusion: success
commit: ${{github.event.pull_request.head.sha}}
allow_forks: true

# This is needed because Windows terminal cannot expand `pip install sdr-*.whl`
- name: Get wheel file name
19 changes: 19 additions & 0 deletions docs/release-notes/v0.0.md
Original file line number Diff line number Diff line change
@@ -4,13 +4,32 @@ tocdepth: 2

# v0.0

## v0.0.25

*Released December 16, 2024*

### Changes

- Added calculation of difference of two random variables in `sdr.subtract_rvs()`.
- Added calculation of minimum of i.i.d. random variables in `sdr.min_iid_rvs()`.
- Added calculation of maximum of i.i.d. random variables in `sdr.max_iid_rvs()`.
- Renamed `sdr.sum_distribution()` to `sdr.add_iid_rvs()`.
- Renamed `sdr.sum_distributions()` to `sdr.add_rvs()`.
- Renamed `sdr.multiply_distributions()` to `sdr.multiply_rvs()`.
- Increased required `galois` version to `v0.4.3`.

### Contributors

- Matt Hostetter ([@mhostetter](https://github.com/mhostetter))

## v0.0.24

*Released September 5, 2024*

### Changes

- Added support for NumPy 2.1.
- *Correction:* NumPy 2.1 is still unsupported because Numba 0.60 doesn't include support.

### Contributors

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ dependencies = [
"numba", # Use galois's version limitation
"scipy",
"matplotlib",
"galois == 0.4.2", # Exact match required because of use of internals
"galois == 0.4.3", # Exact match required because of use of internals
"typing_extensions >= 4.0.0", # v4.0.0 is needed for use of Self (Python 3.11+) and Literal (Python 3.8+)
]
dynamic = ["version"]
6 changes: 3 additions & 3 deletions src/sdr/_detection/_theory.py
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
verify_not_specified,
verify_scalar,
)
from .._probability import sum_distribution
from .._probability import add_iid_rvs


@export
@@ -244,7 +244,7 @@ def _h0(
h0 = scipy.stats.norm(0, np.sqrt(sigma2_per))
elif detector == "linear":
h0 = scipy.stats.chi(nu, scale=np.sqrt(sigma2_per))
h0 = sum_distribution(h0, n_nc)
h0 = add_iid_rvs(h0, n_nc)
elif detector == "square-law":
h0 = scipy.stats.chi2(nu * n_nc, scale=sigma2_per)

@@ -490,7 +490,7 @@ def _h1(
else:
# Folded normal distribution has 1 degree of freedom
h1 = scipy.stats.foldnorm(np.sqrt(lambda_), scale=np.sqrt(sigma2_per))
h1 = sum_distribution(h1, n_nc)
h1 = add_iid_rvs(h1, n_nc)
elif detector == "square-law":
h1 = scipy.stats.ncx2(nu * n_nc, lambda_ * n_nc, scale=sigma2_per)

Loading
Loading