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

Add function for fitting EM slope in multiple pixels and do a lot of retemplating #93

Merged
merged 7 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
112 changes: 66 additions & 46 deletions .github/workflows/run-tests.yml
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 }}
54 changes: 26 additions & 28 deletions .pre-commit-config.yaml
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
20 changes: 13 additions & 7 deletions .readthedocs.yml
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: .
7 changes: 7 additions & 0 deletions .rtd-environment.yml
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.*
12 changes: 0 additions & 12 deletions .sunpy-template.yml

This file was deleted.

Empty file removed CHANGELOG.rst
Empty file.
33 changes: 0 additions & 33 deletions changelog/README.rst

This file was deleted.

6 changes: 3 additions & 3 deletions docs/code_ref/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=============
API Reference
=============
===
API
===

.. toctree::
:maxdepth: 1
Expand Down
1 change: 0 additions & 1 deletion docs/code_ref/synthesizar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ synthesizAR
.. automodapi:: synthesizAR
:no-heading:
:no-inheritance-diagram:
:skip: test
Loading
Loading