Skip to content

Commit

Permalink
Merge branch 'main' into shower_flagging_enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
hbushouse authored Mar 20, 2024
2 parents 2397e3e + 92be82d commit b346ffa
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 134 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: py39-oldestdeps-cov-xdist
- linux: py39-xdist
- linux: py310-oldestdeps-cov-xdist
- linux: py310-xdist
- linux: py311-cov-xdist
- linux: py311-xdist
- linux: py312-cov-xdist
coverage: codecov
- macos: py311-xdist
test_downstream:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- macos: py39-xdist
- macos: py310-xdist
- macos: py311-xdist
2 changes: 1 addition & 1 deletion .github/workflows/tests_devdeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: py39-devdeps-xdist
- linux: py310-devdeps-xdist
- linux: py311-devdeps-xdist
- linux: py312-devdeps-xdist
- linux: py3-devdeps-xdist
test_downstream:
if: (github.repository == 'spacetelescope/stcal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run devdeps tests')))
Expand Down
10 changes: 10 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
Changes to API
--------------

jump
~~~~

- Switch multiprocessing method to ``fork_server``. [#249]

ramp_fitting
~~~~~~~~~~~~

- Switch multiprocessing method to ``fork_server``. [#249]

Bug Fixes
---------

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ STScI Calibration algorithms and tools.

![STScI Logo](docs/_static/stsci_logo.png)

**STCAL requires Python 3.9 or above and a C compiler for dependencies.**
> [!IMPORTANT]
> STCAL requires Python 3.10 or above and a C compiler for dependencies.
**Linux and MacOS platforms are tested and supported. Windows is not currently supported.**
> [!IMPORTANT]
> Linux and MacOS platforms are tested and supported. Windows is not currently supported.**
**If installing on MacOS Mojave 10.14, you must install
into an environment with python 3.9. Installation will fail on python 3.10 due
to lack of a stable build for dependency `opencv-python`.**
> [!WARNING]
> Installation on MacOS Mojave 10.14 will fail due to lack of a stable build for dependency ``opencv-python``.
`STCAL` is intended to be used as a support package for calibration pipeline
software, such as the `JWST` and `Roman` calibration pipelines. `STCAL` is a
Expand Down
250 changes: 131 additions & 119 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,92 +1,100 @@
[project]
name = 'stcal'
description = 'STScI tools and algorithms used in calibration pipelines'
readme = 'README.md'
requires-python = '>=3.9'
license = { file = 'LICENSE' }
authors = [{ name = 'STScI', email = '[email protected]' }]
name = "stcal"
description = "STScI tools and algorithms used in calibration pipelines"
readme = "README.md"
requires-python = ">=3.10"
authors = [
{ name = "STScI", email = "[email protected]" },
]
classifiers = [
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Astronomy',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Astronomy",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
]
dependencies = [
'astropy >=5.0.4',
'scipy >=1.6.0',
'numpy >=1.20',
'opencv-python-headless >=4.6.0.66',
'asdf >=2.15.0',
'gwcs >= 0.18.1',
"astropy >=5.0.4",
"scipy >=1.7.2",
"numpy >=1.21.2",
"opencv-python-headless >=4.6.0.66",
"asdf >=2.15.0",
"gwcs >= 0.18.1",
]
dynamic = [
"version",
]
dynamic = ['version']

[project.license]
file = "LICENSE"

[project.optional-dependencies]
docs = [
'numpydoc',
'packaging >=17',
'sphinx<7.0.0',
'sphinx-asdf',
'sphinx-astropy',
'sphinx-rtd-theme',
'stsci-rtd-theme',
'tomli; python_version <="3.11"',
"numpydoc",
"packaging >=17",
"sphinx<7.0.0",
"sphinx-asdf",
"sphinx-astropy",
"sphinx-rtd-theme",
"stsci-rtd-theme",
"tomli; python_version <=\"3.11\"",
]
test = [
'psutil',
'pytest >=6',
'pytest-cov',
'pytest-doctestplus',
"psutil",
"pytest >=6",
"pytest-cov",
"pytest-doctestplus",
]

[project.urls]
'repository' = 'https://github.com/spacetelescope/stcal'
'tracker' = 'https://github.com/spacetelescope/stcal/issues'
repository = "https://github.com/spacetelescope/stcal"
tracker = "https://github.com/spacetelescope/stcal/issues"

[build-system]
requires = [
'setuptools >=61',
'setuptools_scm[toml] >=3.4',
'Cython >=0.29.21',
'numpy >=1.18',
"setuptools >=61",
"setuptools_scm[toml] >=3.4",
"Cython >=0.29.21",
"numpy >=1.18",
]
build-backend = 'setuptools.build_meta'
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = 'src/stcal/_version.py'
write_to = "src/stcal/_version.py"

[tool.setuptools]
zip-safe = true

[tool.setuptools.packages.find]
where = ['src']
where = [
"src",
]

[tool.pytest.ini_options]
minversion = 6
log_cli_level = "INFO"
xfail_strict = true
doctest_plus = true
doctest_rst = true
text_file_format = 'rst'
text_file_format = "rst"
addopts = [
'--color=yes',
'--doctest-rst',
'-ra',
'--strict-config',
'--strict-markers',
"--color=yes",
"--doctest-rst",
"-ra",
"--strict-config",
"--strict-markers",
]
testpaths = [
"tests",
"src/stcal",
"docs",
]
norecursedirs = [
'benchmarks',
'.asv',
'.eggs',
'.tox',
'build',
'venv',
"benchmarks",
".asv",
".eggs",
".tox",
"build",
"venv",
]
filterwarnings = [
"error::ResourceWarning",
Expand All @@ -98,80 +106,80 @@ markers = [
[tool.ruff]
line-length = 110
src = [
'src',
'tests',
'docs',
"src",
"tests",
"docs",
]

[tool.ruff.lint]
extend-select = [
'F', # Pyflakes (part of default flake8)
'W', 'E', # pycodestyle (part of default flake8)
'I', # isort (import sorting)
# 'N', # pep8-naming
'D', # pydocstyle (docstring style guide)
'UP', # pyupgrade (upgrade code to modern python)
'YTT', # flake8-2020 (system version info)
'ANN', # flake8-annotations (best practices for type annotations)
'S', # flake8-bandit (security checks)
'BLE', # flake8-blind-except (prevent blind except statements)
'B', # flake8-bugbear (prevent common gotcha bugs)
'A', # flake8-builtins (prevent shadowing of builtins)
'C4', # flake8-comprehensions (best practices for comprehensions)
'T10', # flake8-debugger (prevent debugger statements in code)
'EM', # flake8-errormessages (best practices for error messages)
'FA', # flake8-future-annotations (correct usage future annotations)
'ISC', # flake8-implicit-str-concat (prevent implicit string concat)
'ICN', # flake8-import-conventions (enforce import conventions)
'G', # flake8-logging-format (best practices for logging)
'INP', # flake8-no-pep420 (prevent use of PEP420, i.e. implicit name spaces)
'PIE', # flake8-pie (misc suggested improvement linting)
# 'T20', # flake8-print (prevent print statements in code)
'PT', # flake8-pytest-style (best practices for pytest)
'Q', # flake8-quotes (best practices for quotes)
'RSE', # flake8-raise (best practices for raising exceptions)
'RET', # flake8-return (best practices for return statements)
'SLF', # flake8-self (prevent private member access)
'SLOT', # flake8-slots (require __slots__ for immutable classes)
'SIM', # flake8-simplify (suggest simplifications to code where possible)
'TID', # flake8-tidy-imports (prevent banned api and best import practices)
'TCH', # flake8-type-checking (move type checking imports into type checking blocks)
'INT', # flake8-gettext (when to use printf style strings)
# 'ARG', # flake8-unused-arguments (prevent unused arguments)
'PTH', # flake8-use-pathlib (prefer pathlib over os.path)
# 'ERA', # eradicate (remove commented out code)
'PGH', # pygrep (simple grep checks)
'PL', # pylint (general linting, flake8 alternative)
'TRY', # tryceratops (linting for try/except blocks)
'FLY', # flynt (f-string conversion where possible)
'NPY', # NumPy-specific checks (recommendations from NumPy)
'PERF', # Perflint (performance linting)
'LOG',
'RUF', # ruff specific checks
"F", # Pyflakes (part of default flake8)
"W", "E", # pycodestyle (part of default flake8)
"I", # isort (import sorting)
# "N", # pep8-naming
"D", # pydocstyle (docstring style guide)
"UP", # pyupgrade (upgrade code to modern python)
"YTT", # flake8-2020 (system version info)
"ANN", # flake8-annotations (best practices for type annotations)
"S", # flake8-bandit (security checks)
"BLE", # flake8-blind-except (prevent blind except statements)
"B", # flake8-bugbear (prevent common gotcha bugs)
"A", # flake8-builtins (prevent shadowing of builtins)
"C4", # flake8-comprehensions (best practices for comprehensions)
"T10", # flake8-debugger (prevent debugger statements in code)
"EM", # flake8-errormessages (best practices for error messages)
"FA", # flake8-future-annotations (correct usage future annotations)
"ISC", # flake8-implicit-str-concat (prevent implicit string concat)
"ICN", # flake8-import-conventions (enforce import conventions)
"G", # flake8-logging-format (best practices for logging)
"INP", # flake8-no-pep420 (prevent use of PEP420, i.e. implicit name spaces)
"PIE", # flake8-pie (misc suggested improvement linting)
# "T20", # flake8-print (prevent print statements in code)
"PT", # flake8-pytest-style (best practices for pytest)
"Q", # flake8-quotes (best practices for quotes)
"RSE", # flake8-raise (best practices for raising exceptions)
"RET", # flake8-return (best practices for return statements)
"SLF", # flake8-self (prevent private member access)
"SLOT", # flake8-slots (require __slots__ for immutable classes)
"SIM", # flake8-simplify (suggest simplifications to code where possible)
"TID", # flake8-tidy-imports (prevent banned api and best import practices)
"TCH", # flake8-type-checking (move type checking imports into type checking blocks)
"INT", # flake8-gettext (when to use printf style strings)
# "ARG", # flake8-unused-arguments (prevent unused arguments)
"PTH", # flake8-use-pathlib (prefer pathlib over os.path)
# "ERA", # eradicate (remove commented out code)
"PGH", # pygrep (simple grep checks)
"PL", # pylint (general linting, flake8 alternative)
"TRY", # tryceratops (linting for try/except blocks)
"FLY", # flynt (f-string conversion where possible)
"NPY", # NumPy-specific checks (recommendations from NumPy)
"PERF", # Perflint (performance linting)
"LOG",
"RUF", # ruff specific checks
]
ignore = [
'ISC001', # interferes with formatter
'PLR0912', # Too many branches
'PLR0913', # Too many arguments
'PLR0915', # Too many statements
'PLR2004', # Magic value used in comparison
"ISC001", # interferes with formatter
"PLR0912", # Too many branches
"PLR0913", # Too many arguments
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison

# Pydocstyle (to fix over time
'D100', # Undocumented public module
'D101', # Undocumented public class
'D102', # Undocumented public method
'D103', # Undocumented public function
'D104', # Undocumented public package
'D205', # 1 blank line required between summary line and description
'D401', # First line of docstring should be in imperative mood
'D404', # First word of docstring should not be This
"D100", # Undocumented public module
"D101", # Undocumented public class
"D102", # Undocumented public method
"D103", # Undocumented public function
"D104", # Undocumented public package
"D205", # 1 blank line required between summary line and description
"D401", # First line of docstring should be in imperative mood
"D404", # First word of docstring should not be This
]
exclude = [
'docs',
'build',
'dist',
'.tox',
'.eggs',
"docs",
"build",
"dist",
".tox",
".eggs",
]

[tool.ruff.lint.extend-per-file-ignores]
Expand All @@ -195,9 +203,7 @@ filter_files = true
line_length = 110

[tool.codespell]
skip="*.pdf,*.fits,*.asdf,.tox,build,./tags,.git,docs/_build"
# ignore-words-list="""
# """
skip = "*.pdf,*.fits,*.asdf,.tox,build,./tags,.git,docs/_build"

[tool.repo-review]
ignore = [
Expand All @@ -208,7 +214,13 @@ ignore = [
]

[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
archs = [
"x86_64",
"arm64",
]

[tool.cibuildwheel.linux]
archs = ["auto", "aarch64"]
archs = [
"auto",
"aarch64",
]
Loading

0 comments on commit b346ffa

Please sign in to comment.