Skip to content

Commit

Permalink
JP-3768: Move outlier detection median computers to stcal (#292)
Browse files Browse the repository at this point in the history
* fix ruff style checks for median

* added type hints to median.py

* ported over unit tests

* added test for MedianComputer

* missed some ruff checks

* changelog, fix oldestdeps, fix mypy problem

* fixes after comments from @kmacdonald-stsci and @braingram

* changes per review from @braingram

* forgot to change private methods in test

* replace tmpdir with tmp_path

* upgrade cleanup warnings to errors in pyproject.toml

* put automodapi in docs, small doc style updates

* undo removal of comment about unraisableexception

* missed one docstring improvement

* Update src/stcal/outlier_detection/median.py

Co-authored-by: Brett Graham <[email protected]>

---------

Co-authored-by: Brett Graham <[email protected]>
  • Loading branch information
emolter and braingram authored Oct 1, 2024
1 parent 4ba7a62 commit e4dbc44
Show file tree
Hide file tree
Showing 5 changed files with 605 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/292.apichange.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `outlier_detection` median calculators from jwst.
1 change: 1 addition & 0 deletions docs/stcal/outlier_detection/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ Outlier Detection Utils

description.rst

.. automodapi:: stcal.outlier_detection.median
.. automodapi:: stcal.outlier_detection.utils
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ norecursedirs = [
]
filterwarnings = [
"error::ResourceWarning",
# Files left open by tests can trigger ResourceWarnings during test
# teardown which otherwise would be converted back into a warning
# by pytest. Turn these PytestUnraisableExceptionWarnings back
# into errors
"error::pytest.PytestUnraisableExceptionWarning",
]
markers = [
"soctests",
Expand Down Expand Up @@ -166,6 +171,8 @@ ignore = [
"PLR0913", # Too many arguments
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison
"ANN101", # Missing type annotation for self in method
"ANN102", # Missing type annotation for cls in classmethod

# Pydocstyle (to fix over time
"D100", # Undocumented public module
Expand Down
Loading

0 comments on commit e4dbc44

Please sign in to comment.