Skip to content

Commit d7586bc

Browse files
john-halloranJohn Halloranpre-commit-ci[bot]sbillinge
authored
refactor: merge john-development to main (#187)
* Initial commit of John refactor of SNMF (#140) * added my files * [pre-commit.ci] auto fixes from pre-commit hooks * Updated X and Y optimizers, now produces formatted but partially incorrect output * removed duplicate class * Working build (no normalization) --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * fix stop condition and add Y/A normalization (#141) Co-authored-by: John Halloran <jhalloran@oxy.edu> * Added x normalization (#143) Co-authored-by: John Halloran <jhalloran@oxy.edu> Co-authored-by: Simon Billinge <sbillinge@users.noreply.github.com> * Loop cleanup and scikit-learn style parameters (#146) * Cleaned up looping behavior and aligned some params with scikit-learn. * Combined quadratic solvers --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * feat: Add random state feature. (#150) * feat: Add random state feature. * Add class docstring * components->n_components * Updated docstring * Shorten and reformat docstring * docstring typo * Flag self.rng as private * Make logic for n_components and Y0 more rigid * added class attributes to docstring * fix: cleaner import of SNMFOptimizer * fix: correct class instantiation after change in import --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> Co-authored-by: Simon Billinge <sbillinge@users.noreply.github.com> * refactor: Remove old tests and source files (#160) Co-authored-by: John Halloran <jhalloran@oxy.edu> * style: convert variables to lowercase (#159) * style: Convert variables to lowercase * chore: Add news item * style: lowercase remaining variables * style: fix indentation on docstrings * style: rename and make public certain attributes * style: update docstring defaults --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * Fixes to class attributes and style (#163) * fix: use symmetric initial phase fractions * style: don't store objective function in a class attribute, just use history --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * Restored functionality to working state (#165) * docs: update docstring and imports * style: remove non-class function from class * fix: using working quadratic solver for weights * fix: restore working MATLAB-like loop functionality --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * feat: add live plotting of updates (#166) * feat: add live plotting of updates * style: make plotting vars lowercase --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * test: add initial test of optimizer (#167) * test: add initial test of optimizer * style: switch to local imports and plural folders * style: add README to sNMF test --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * Replace 1D apply_interpolation with np.interp (#168) * refactor: get residual matrix without a helper * perf: remove unused derivatives from apply_interpolation * chore: remove old residual matrix and reference to derivatives * refactor: replace remaining apply_interpolation with np.interp * style: remove references to old variable names --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * refactor: reconstruct separate from residuals (#169) * refactor: reconstruct separate from residuals * fix: inputs to reconstruct_matrix should not be optional * docs: updated default documentation for init_weights --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * refactor: move optimization out of init and into fit (#170) * style: per sklearn, attributes learned from data end with underscore * refactor: move optimization out of init and into fit * fix: use new fit() for test * style: end fit() with return self * docs: update docstring to reflect new functionality * refactor: use rho and eta in fit * feat: use reset for sequential refinements * fix: use copies for safety --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * refactor: apply_interpolation_matrix() is now compute_stretched_components() (#171) * fix: guard against zero/NaN stretches in apply_interpolation_matrix * refactor: use broadcasting instead of np.tile in apply_interpolation_matrix * refactor: flatten from a single buffer in apply_interpolation_matrix() * refactor: drastically simplify indexing in apply_interpolation_matrix() and remove legacy MATLAB terminology * style: rename apply_interpolation_matrix() to compute_stretched_components() --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * refactor: change get_objective_function into a static method and getter (#174) * refactor: compute objective function in a static method and retrieve via getter * refactor: change get_objective_function into a static method and getter * fix: update location for _tests-on-pr.yml * fix: use expected name for requirements/tests.txt * fix: add cvxpy to requirements/conda.txt * fix: add matplotlib to requirements/conda.txt --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * skpkg: apply black to all files in the project directory (#176) Co-authored-by: John Halloran <jhalloran@oxy.edu> * chore: update package to latest scikit-package version (#178) * chore: update to latest version of scikit-package * chore: restore citation information * fix: restore missing requirements * [pre-commit.ci] auto fixes from pre-commit hooks * fix: restore historical changelog --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: skip updating stretch if stretching factor is zero (#181) * style: make line length <80 throughout * feat: skip updating stretch() if stretching factor is zero * chore: fix codespell complaint * fix: use correct version of rho * style: clean up several lines and remove noqa --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * docs: revamp documentation (#182) * refactor: move doc to docs and update requirements * docs: remove old tables and recreate getting started page * docs: load documentation from snmf_class.py --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> * refactor: change references of snmf to stretched-nmf (#185) * chore: use new name in scikit-package space * refactor: rename references throughout program snmf -> stretched-nmf * refactor: rename project references * chore: add news item for package-name-update * chore: CI toml issue --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> --------- Co-authored-by: John Halloran <jhalloran@oxy.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Simon Billinge <sbillinge@users.noreply.github.com>
1 parent 1231d71 commit d7586bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3909
-2418
lines changed

.codespell/ignore_words.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ mater
66

77
;; Frobenius norm used in np.linalg.norm
88
fro
9+
10+
;; alternative spelling of socioeconomic used in code of conduct
11+
socio-economic

.flake8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ exclude =
66
__pycache__,
77
build,
88
dist,
9-
doc/source/conf.py
10-
max-line-length = 115
9+
docs/source/conf.py
10+
max-line-length = 79
1111
# Ignore some style 'errors' produced while formatting by 'black'
1212
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
1313
extend-ignore = E203

.github/ISSUE_TEMPLATE/release_checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Please let the maintainer know that all checks are done and the package is ready
3434
<!-- After the maintainer releases the PyPI package, please check the following when creating a PR for conda-forge release.-->
3535

3636
- [ ] Ensure that the full release has appeared on PyPI successfully.
37-
- [ ] New package dependencies listed in `conda.txt` and `test.txt` are added to `meta.yaml` in the feedstock.
37+
- [ ] New package dependencies listed in `conda.txt` and `tests.txt` are added to `meta.yaml` in the feedstock.
3838
- [ ] Close any open issues on the feedstock. Reach out to the maintainer if you have questions.
3939
- [ ] Tag the maintainer for conda-forge release.
4040

.github/workflows/build-wheel-release-upload.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ on:
77
- "*" # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml
88

99
jobs:
10-
release:
10+
build-release:
1111
uses: scikit-package/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
1212
with:
13-
project: diffpy.snmf
13+
project: diffpy.stretched-nmf
1414
c_extension: false
1515
maintainer_GITHUB_username: sbillinge
1616
secrets:

.github/workflows/check-news-item.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ jobs:
99
check-news-item:
1010
uses: scikit-package/release-scripts/.github/workflows/_check-news-item.yml@v0
1111
with:
12-
project: diffpy.snmf
12+
project: diffpy.stretched-nmf

.github/workflows/matrix-and-codecov-on-merge-to-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
matrix-coverage:
1515
uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
1616
with:
17-
project: diffpy.snmf
17+
project: diffpy.stretched-nmf
1818
c_extension: false
1919
headless: false
2020
secrets:

.github/workflows/publish-docs-on-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ jobs:
77
docs:
88
uses: scikit-package/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
99
with:
10-
project: diffpy.snmf
10+
project: diffpy.stretched-nmf
1111
c_extension: false
1212
headless: false

.github/workflows/tests-on-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
tests-on-pr:
99
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
1010
with:
11-
project: diffpy.snmf
11+
project: diffpy.stretched-nmf
1212
c_extension: false
1313
headless: false
1414
secrets:

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ python:
1010
- requirements: requirements/docs.txt
1111

1212
sphinx:
13-
configuration: doc/source/conf.py
13+
configuration: docs/source/conf.py

AUTHORS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Authors
22
=======
33

4-
Billinge Group and community contributors.
4+
Simon Billinge, John Halloran, Billinge Group members
55

66
Contributors
77
------------

0 commit comments

Comments
 (0)