Skip to content

Commit

Permalink
Merge branch 'main' of github.com:sunpy/sunkit-instruments into regis…
Browse files Browse the repository at this point in the history
…ter_template
  • Loading branch information
CyclingNinja committed Sep 5, 2024
2 parents 97d090b + 542463f commit 8431450
Show file tree
Hide file tree
Showing 20 changed files with 150 additions and 138 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: CI

on:
Expand Down Expand Up @@ -64,7 +63,7 @@ jobs:
needs: [core]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.12'
default_python: '3.9'
submodules: false
pytest: false
toxdeps: tox-pypi-filter
Expand All @@ -74,6 +73,21 @@ jobs:
envs: |
- linux: build_docs
online:
if: "!startsWith(github.event.ref, 'refs/tags/v')"
needs: [test]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.12'
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n auto --dist loadgroup
envs: |
- linux: py311-devdeps
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

cron:
if: |
github.event_name == 'workflow_dispatch' || (
Expand Down
89 changes: 32 additions & 57 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ junit/
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
Expand All @@ -74,47 +73,18 @@ instance/

# Sphinx documentation
docs/_build/
# automodapi
docs/api
docs/sg_execution_times.rst

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
.python-version

# celery beat schedule file
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py
Expand All @@ -128,6 +98,10 @@ ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

Expand All @@ -137,29 +111,16 @@ venv.bak/
# mypy
.mypy_cache/

# Pyre type checker
.pyre/

# IDE
# PyCharm
.idea

# Spyder project settings
.spyderproject
.spyproject

### VScode: https://raw.githubusercontent.com/github/gitignore/master/Global/VisualStudioCode.gitignore
.vscode/*
.vs/*

### https://raw.github.com/github/gitignore/master/Global/OSX.gitignore

.DS_Store
.AppleDouble
.LSOverride

# Icon must ends with two \r.
Icon


# Thumbnails
._*

Expand All @@ -168,6 +129,7 @@ Icon
.Trashes

### Linux: https://raw.githubusercontent.com/github/gitignore/master/Global/Linux.gitignore

*~

# temporary files which can be created if a process still has a handle open of a deleted file
Expand All @@ -182,8 +144,7 @@ Icon
# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# pytype static type analyzer
.pytype/
### MacOS: https://raw.githubusercontent.com/github/gitignore/master/Global/macOS.gitignore

# General
.DS_Store
Expand Down Expand Up @@ -239,12 +200,30 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

### VScode: https://raw.githubusercontent.com/github/gitignore/master/Global/VisualStudioCode.gitignore
.vscode/*
.vs/*

### Extra Python Items and SunPy Specific
.hypothesis
.pytest_cache
sunpydata.sqlite
sunpydata.sqlite-journal
sunkit_instruments/_compiler.c
sunkit_instruments/cython_version.py
docs/_build
docs/generated
docs/api/
docs/whatsnew/latest_changelog.txt
examples/**/*.asdf
examples/**/*.csv
# This is incase you run the figure tests
figure_test_images*
tags
baseline
sunkit_instruments/_version.py

### Pycharm(?)
.idea

# Release script
.github_cache
Expand All @@ -253,10 +232,6 @@ baseline
.history
*.orig
.tmp
node_modules/
package-lock.json
package.json
.prettierrc

# Log files generated by 'vagrant up'
*.log
# Example files
dr_suvi-l2-thmap_g16_s20220101T000000Z_e20220101T000400Z_v1-0-2.fits
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ repos:
rev: 5.13.2
hooks:
- id: isort
args: ['--sp','setup.cfg']
exclude: ".*(.fits|.fts|.fit|.nc|.gz|.txt|tca.*|extern.*|.rst|.md|docs/conf.py)$"
exclude: ".*(.fits|.fts|.fit|.header|.txt|tca.*|extern.*|sunkit_instruments/extern)$""
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020-2021, The SunPy Developers
Copyright (c) 2020-2024, The SunPy Developers
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand All @@ -9,7 +9,7 @@ are permitted provided that the following conditions are met:
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the name of the Astropy Team nor the names of its contributors may be
* Neither the name of the SunPy Developers nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

Expand Down
1 change: 1 addition & 0 deletions changelog/125.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Increased minimum Python version to 3.10
1 change: 1 addition & 0 deletions changelog/126.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Increased the minimum version of ``sunpy`` to 6.0.0.
5 changes: 5 additions & 0 deletions changelog/128.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
In the ``fermi``, the function ``get_detector_sun_angles_for_time`` returns the angle with respect to the Sun of each Fermi/GBM detector.
However, these files contain gaps due to the South Atlantic Anomaly.
If the time requested falls in one of these gaps, the code will return the detector angles for the next available time.
This can be several minutes different from the time requested.
Now, a warning to the user will be raised if the time returned by the code is more than 1 minute different from the time requested (1 minute is the nominal cadence of the spacecraft weekly file), and explains that this is likely due to a South Atlantic Anomaly encounter.
1 change: 1 addition & 0 deletions changelog/130.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The function ``plot_detector_sun_angles`` was broken, due to the formatting of the time axis.
14 changes: 5 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

"""
Configuration file for the Sphinx documentation builder.
"""
# -- stdlib imports ------------------------------------------------------------
import os
import datetime
Expand All @@ -22,7 +19,6 @@

# The full version, including alpha/beta/rc tags
from sunkit_instruments import __version__ # NOQA
release = __version__

project = "sunkit-instruments"
author = "The SunPy Community"
Expand Down Expand Up @@ -50,8 +46,8 @@
"sphinx.ext.doctest",
"sphinx.ext.inheritance_diagram",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
]
Expand Down Expand Up @@ -138,4 +134,4 @@
"remove_config_comments": True,
"doc_module": ("sunpy"),
"only_warn_on_example_error": True,
]
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ authors = [
]
dependencies = [
"scipy",
"sunpy[net,timeseries]>=5.0.0"
"sunpy[map,net,timeseries,visualization]>=6.0.0"
]
dynamic = ["version"]

Expand Down
10 changes: 4 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Scientific/Engineering :: Physics

[options]
zip_safe = False
python_requires = >=3.9
python_requires = >=3.10
packages = find:
include_package_data = True
setup_requires =
setuptools_scm
install_requires =
scipy
sunpy[net,timeseries]>=5.0.0
sunpy[map,net,timeseries,visualization]>=6.0.0

[options.extras_require]
tests =
Expand All @@ -45,8 +45,6 @@ docs =
sphinx-changelog
sphinx-gallery
sunpy-sphinx-theme
# Remove next line when fixed in towncrier; see https://github.com/twisted/towncrier/issues/528
importlib-resources<6

[options.packages.find]
exclude = sunkit_instruments._dev
Expand Down Expand Up @@ -82,7 +80,7 @@ filterwarnings =
ignore:distutils Version classes are deprecated. Use packaging.version instead:DeprecationWarning
ignore:Unknown units for CHANNEL:sunpy.util.exceptions.SunpyUserWarning
ignore:.*is deprecated and slated for removal in Python 3:DeprecationWarning

ignore:.*Something went wrong.*

[isort]
line_length = 110
Expand Down
1 change: 1 addition & 0 deletions sunkit_instruments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Documentation: https://docs.sunpy.org/projects/sunkit-instruments/en/latest/
* Source code: https://github.com/sunpy/sunkit-instruments
"""

import sys

from .version import version as __version__ # NOQA
Expand Down
1 change: 1 addition & 0 deletions sunkit_instruments/data/test/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This package contains all of sunkit-instruments's test data.
"""

import fnmatch
import glob
import os
Expand Down
Loading

0 comments on commit 8431450

Please sign in to comment.