-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add function for fitting EM slope in multiple pixels and do a lot of …
…retemplating (#93) * first iteration of EM slope calculation in analysis subpackage * change units from ct to DN * improvements to slope fitting * more fixes * update integration routine * do the retemplate dance * no unpacking while indexing below 3.11
- Loading branch information
Showing
37 changed files
with
714 additions
and
605 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,74 @@ | ||
name: Run tests | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: | ||
- 'main' | ||
- '*.*' | ||
- '!*backport*' | ||
tags: | ||
- 'v*' | ||
- '!*dev*' | ||
- '!*pre*' | ||
- '!*post*' | ||
pull_request: | ||
branches: [ main ] | ||
# Allow manual runs through the web UI | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
core: | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | ||
with: | ||
toxdeps: tox-pypi-filter | ||
envs: | | ||
- linux: py312 | ||
coverage: 'codecov' | ||
secrets: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# Test the oldest and newest configuration on Mac and Windows | ||
- os: macos-latest | ||
python-version: 3.9 | ||
toxenv: py39 | ||
- os: macos-latest | ||
python-version: "3.11" | ||
toxenv: py311 | ||
# Test all configurations on Linux | ||
- os: ubuntu-latest | ||
python-version: 3.9 | ||
toxenv: py39 | ||
- os: ubuntu-latest | ||
python-version: "3.10" | ||
toxenv: py310 | ||
- os: ubuntu-latest | ||
python-version: "3.11" | ||
toxenv: py311 | ||
# Docs | ||
- os: ubuntu-latest | ||
python-version: "3.11" | ||
toxenv: build_docs | ||
# Code style checks | ||
- os: ubuntu-latest | ||
python-version: "3.11" | ||
toxenv: codestyle | ||
tests: | ||
needs: [core] | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | ||
with: | ||
toxdeps: tox-pypi-filter | ||
envs: | | ||
- macos: py311 | ||
- windows: py310 | ||
coverage: 'codecov' | ||
secrets: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: python -m pip install --upgrade tox codecov | ||
- name: Run tox | ||
run: python -m tox -e ${{ matrix.toxenv }} | ||
- name: Report coverage | ||
run: codecov | ||
docs: | ||
needs: [tests] | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | ||
with: | ||
toxdeps: tox-pypi-filter | ||
envs: | | ||
- linux: build_docs-gallery | ||
python-version: '3.12' | ||
libraries: | | ||
apt: | ||
- graphviz | ||
publish: | ||
# Build wheels when pushing to any branch except main | ||
# publish.yml will only publish if tagged ^v.* | ||
if: | | ||
( | ||
github.event_name != 'pull_request' && ( | ||
github.ref_name != 'main' || | ||
github.event_name == 'workflow_dispatch' | ||
) | ||
) || ( | ||
github.event_name == 'pull_request' && | ||
contains(github.event.pull_request.labels.*.name, 'Run publish') | ||
) | ||
needs: [tests] | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main | ||
with: | ||
test_extras: 'dev' | ||
test_command: 'pytest -p no:warnings --doctest-rst --pyargs synthesizAR' | ||
submodules: false | ||
python-version: '3.12' | ||
secrets: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,39 @@ | ||
repos: | ||
# The warnings/errors we check for here are: | ||
# E101 - mix of tabs and spaces | ||
# W191 - use of tabs | ||
# W291 - trailing whitespace | ||
# W292 - no newline at end of file | ||
# W293 - trailing whitespace | ||
# W391 - blank line at end of file | ||
# E111 - 4 spaces per indentation level | ||
# E112 - 4 spaces per indentation level | ||
# E113 - 4 spaces per indentation level | ||
# E303 - too many blank lines (3) | ||
# E304 - blank lines found after function decorator | ||
# E305 - expected 2 blank lines after class or function definition | ||
# E306 - expected 1 blank line before a nested definition | ||
# E502 - the backslash is redundant between brackets | ||
# E722 - do not use bare except | ||
# E901 - SyntaxError or IndentationError | ||
# E902 - IOError | ||
# F822: undefined name in __all__ | ||
# F823: local variable name referenced before assignment | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 3.7.9 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: "v0.4.4" | ||
hooks: | ||
- id: flake8 | ||
args: ['--count', '--select', 'E101,W191,W291,W292,W293,W391,E111,E112,E113,E303,E304,E306,E502,E722,E901,E902,F822,F823'] | ||
- id: ruff | ||
args: ["--fix"] | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
name: isort | ||
entry: isort | ||
require_serial: true | ||
language: python | ||
types: | ||
- python | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.4.0 | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: trailing-whitespace | ||
exclude: ".*(.fits|.fts|.fit|.txt|.asdf|.json)$" | ||
exclude: ".*(.fits|.fts|.fit|.txt|.pro|.asdf|.json)$" | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: check-added-large-files | ||
- id: end-of-file-fixer | ||
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|.asdf|.json)$" | ||
exclude: ".*(.fits|.fts|.fit|.txt|.pro|.asdf|.json|.bib|tca.*)$" | ||
- id: mixed-line-ending | ||
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|.asdf|.json)$" | ||
exclude: ".*(.fits|.fts|.fit|.txt|.bib|.pro|.asdf|.json|tca.*)$" | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: | ||
- tomli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
os: ubuntu-lts-latest | ||
tools: | ||
python: "3.11" | ||
python: "mambaforge-latest" | ||
jobs: | ||
post_checkout: | ||
- git fetch --unshallow || true | ||
pre_install: | ||
- git update-index --assume-unchanged docs/conf.py | ||
- git update-index --assume-unchanged .rtd-environment.yml docs/conf.py | ||
|
||
conda: | ||
environment: .rtd-environment.yml | ||
|
||
sphinx: | ||
builder: html | ||
configuration: docs/conf.py | ||
fail_on_warning: false | ||
|
||
formats: | ||
- htmlzip | ||
|
||
python: | ||
install: | ||
- method: pip | ||
extra_requirements: | ||
install: | ||
- method: pip | ||
extra_requirements: | ||
- all | ||
- docs | ||
path: . | ||
path: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: rtd_synthesizAR | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.12 | ||
- pip | ||
- graphviz!=2.42.*,!=2.43.* |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
============= | ||
API Reference | ||
============= | ||
=== | ||
API | ||
=== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ synthesizAR | |
.. automodapi:: synthesizAR | ||
:no-heading: | ||
:no-inheritance-diagram: | ||
:skip: test |
Oops, something went wrong.