Skip to content

Commit

Permalink
Merge pull request #58 from sunpy/changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis authored May 15, 2021
2 parents 30b530f + cff8f6b commit c4d1174
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 60 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,25 @@ repos:
# W605 - Fix invalid escape sequence 'x'.
# W690 - Fix various deprecated code (via lib2to3).
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
rev: 3.9.2
hooks:
- id: flake8
args: ['--count', '--select', 'E101,E11,E111,E112,E113,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,E401,E402,E502,E701,E711,E712,E713,E714,E722,E731,E901,E902,F822,F823,W191,W291,W292,W293,W391,W601,W602,W603,W604,W605,W690']
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md)$"
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|drms/__init__.py)$"
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|docs/conf.py)$"
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|docs/conf.py|drms/__init__.py)$"
- repo: https://github.com/timothycrosley/isort
rev: 5.7.0
rev: 5.8.0
hooks:
- id: isort
args: ['--sp','setup.cfg']
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|docs/conf.py)$"
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|docs/conf.py|drms/__init__.py)$"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.0.0
hooks:
- id: check-ast
- id: check-case-conflict
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2
sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: false
fail_on_warning: true

python:
install:
Expand Down
17 changes: 13 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
Drms v0.6.1 (2021-01-23)
========================
0.6.2 (2021-05-15)
==================

Trivial
-------

- Tidy up of internal code that has no user facing changes.


0.6.1 (2021-01-23)
==================

Bug Fixes
---------

- Fixed issue with downloads not having the primekeys substituted with their correct values in downloaded filenames. (`#52 <https://github.com/sunpy/drms/pull/52>`__)


drms v0.6.0 (2020-11-01)
========================
0.6.0 (2020-11-01)
==================

Improved Documentation
----------------------
Expand Down
13 changes: 8 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
# Exclude specific files
# All files which are tracked by git and not explicitly excluded here are included by setuptools_scm
exclude .codecov.yaml
exclude .mailmap
exclude .editorconfig
exclude .gitattributes
exclude .gitignore
exclude .pep8speaks.yml
exclude .pre-commit-config.yaml
exclude .test_package_pins.txt
exclude .zenodo.json
exclude azure-pipelines.yml
exclude readthedocs.yml
exclude rtd-environment.yml

# Prune folders
prune paper
prune changelog

# This subpckage is only used in development checkouts and should not be
# included in built tarballs
# This subpackage is only used in development checkouts and should not be included in built tarballs
prune drms/_dev
prune docs/_build
prune build
global-exclude *.pyc *.o
26 changes: 6 additions & 20 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ schedules:
displayName: At 00:00 on Sunday
branches:
include:
- master
- main
always: true

pr:
autoCancel: true

resources:
repositories:
- repository: OpenAstronomy
Expand All @@ -30,9 +33,6 @@ trigger:
- '*pre*'
- '*post*'

pr:
autoCancel: true

stages:
- stage: FirstPhaseTests
displayName: Core Tests
Expand All @@ -43,14 +43,11 @@ stages:
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n=1

envs:
- linux: codestyle
name: style_check
pytest: false
libraries: {}

- linux: py38

- stage: SecondPhaseTests
Expand All @@ -63,21 +60,12 @@ stages:
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n=1

libraries:
apt:
- graphviz

envs:
- macos: py37

- windows: py39

- linux: build_docs
posargs: " "
pytest: false

- linux: py38-online

- stage: ThirdPhaseTests
Expand All @@ -90,13 +78,11 @@ stages:
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n=1

envs:
- linux: py38-sunpy

# On branches which aren't master, and not Pull Requests, build the wheels but only upload them on tags
- ${{ if and(ne(variables['Build.Reason'], 'PullRequest'), or(ne(variables['Build.SourceBranchName'], 'master'), eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual'))) }}:
# On branches which aren't main, and not Pull Requests, build the wheels but only upload them on tags
- ${{ if and(ne(variables['Build.Reason'], 'PullRequest'), or(ne(variables['Build.SourceBranchName'], 'main'), eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual'))) }}:
- stage: Release
dependsOn: SecondPhaseTests
jobs:
Expand Down
7 changes: 4 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sunpy.util.sphinx.changelog',
'sphinx_changelog',
]
numpydoc_show_class_members = False

Expand Down Expand Up @@ -112,7 +112,7 @@
]

# -- Sphinx Gallery ------------------------------------------------------------
from sphinx_gallery.sorting import ExampleTitleSortKey # NOQA
from sphinx_gallery.sorting import ExampleTitleSortKey

sphinx_gallery_conf = {
'backreferences_dir': os.path.join('generated', 'modules'),
Expand All @@ -123,7 +123,8 @@
# Comes from the theme.
'default_thumb_file': os.path.join(html_static_path[0], 'img', 'sunpy_icon_128x128.png'),
'abort_on_example_error': False,
'plot_gallery': 'True',
'only_warn_on_example_error': True,
'plot_gallery': True,
'remove_config_comments': True,
'doc_module': ('sunpy'),
}
5 changes: 4 additions & 1 deletion docs/whatsnew/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
Full Changelog
**************

.. include:: ../../CHANGELOG.rst
.. changelog::
:towncrier: ../../
:towncrier-skip-if-empty:
:changelog_file: ../../CHANGELOG.rst
35 changes: 27 additions & 8 deletions drms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,29 @@
drms
====
Access HMI, AIA and MDI data with Python
The drms library provides an easy-to-use interface for accessing HMI, AIA and MDI data with Python.
It uses the publicly accessible JSOC DRMS server by default, but can also be used with local NetDRMS sites.
More information, including a detailed tutorial, is available in the Documentation.
* Homepage: https://github.com/sunpy/drms
* Documentation: https://docs.sunpy.org/projects/drms/en/stable/
"""

import os
import sys

# Enforce Python version check during package import.
# Must be done before any drms imports
__minimum_python_version__ = "3.7"

class UnsupportedPythonError(Exception):
"""Running on an unsupported version of Python."""

from .client import * # NOQA
from .config import * # NOQA
from .exceptions import * # NOQA
from .json import * # NOQA
from .utils import * # NOQA
from .version import version as __version__ # NOQA

if sys.version_info < tuple(int(val) for val in __minimum_python_version__.split('.')):
# This has to be .format to keep backwards compatibly.
raise UnsupportedPythonError(
"sunpy does not support Python < {}".format(__minimum_python_version__))


def _get_bibtex():
Expand All @@ -31,5 +43,12 @@ def _get_bibtex():
ref = textwrap.dedent('\n'.join(lines))
return ref


__citation__ = __bibtex__ = _get_bibtex()

from .version import version as __version__
# DRMS imports to collapse the namespace
from .client import *
from .config import *
from .exceptions import *
from .json import *
from .utils import *
2 changes: 1 addition & 1 deletion paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Each data collection in JSOC (for example, AIA images of the solar corona in 171

![Left: Total unsigned flux and mean current helicity of HMI Active Region Patch (HARP) Number 4315 during its disk passage; the dashed orange line marks the central meridian crossing of the active region. Right: Continuum intensity map and magnetic field map at the time of the central meridian crossing.](sharp.pdf)

The left two panels of Figure 1 show a small selection of the available metadata which characterize a particular solar active region. From the steep gradient in the total unsigned magnetic flux and the increasing area of active pixels, it is directly evident, without inspecting any image data, that this is a strong emerging active region. The right two panels show a selection of image data corresponding to the time indicated by the dashed orange line in the left two panels. Figure 1 was created from metadata and image data obtained from the JSOC DRMS server using the `drms` package. A Python [script](https://github.com/sunpy/drms/blob/master/examples/create_joss_figure.py) that creates this figure is available in the [examples](https://github.com/sunpy/drms/tree/master/examples) directory of the `drms` source code.
The left two panels of Figure 1 show a small selection of the available metadata which characterize a particular solar active region. From the steep gradient in the total unsigned magnetic flux and the increasing area of active pixels, it is directly evident, without inspecting any image data, that this is a strong emerging active region. The right two panels show a selection of image data corresponding to the time indicated by the dashed orange line in the left two panels. Figure 1 was created from metadata and image data obtained from the JSOC DRMS server using the `drms` package. A Python [script](https://github.com/sunpy/drms/blob/main/examples/create_joss_figure.py) that creates this figure is available in the [examples](https://github.com/sunpy/drms/tree/main/examples) directory of the `drms` source code.


# Acknowledgements
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ build-backend = 'setuptools.build_meta'
enabled = true
verify_pr_number = true
changelog_skip_label = "No Changelog Entry Needed"
help_url = "https://github.com/sunpy/drms/blob/master/changelog/README.rst"
changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/sunpy/drms/blob/master/changelog/README.rst)."
type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/sunpy/drms/blob/master/changelog/README.rst)"
help_url = "https://github.com/sunpy/drms/blob/main/changelog/README.rst"
changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com/sunpy/drms/blob/main/changelog/README.rst)."
type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com/sunpy/drms/blob/main/changelog/README.rst)"
number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file."

[tool.towncrier]
package = "drms"
filename = "CHANGELOG.rst"
directory = "changelog/"
issue_format = "`#{issue} <https://github.com/sunpy/drms/pull/{issue}>`__"
title_format = "{version} ({project_date})"

[[tool.towncrier.type]]
directory = "breaking"
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = drms
provides = drms
description = "Access HMI, AIA and MDI data with Python"
description = "Access HMI, AIA and MDI data with Python from the public JSOC DRMS server"
long_description = file: README.rst
long_description_content_type = text/x-rst
author = The SunPy Community
Expand All @@ -23,6 +23,7 @@ classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: Scientific/Engineering :: Astronomy
Topic :: Scientific/Engineering :: Physics

Expand All @@ -47,9 +48,8 @@ docs =
sphinx
sphinx-automodapi
sphinx-gallery
sunpy # We need the changelog directive.
sphinx-changelog
sunpy-sphinx-theme
towncrier

[options.packages.find]
exclude = drms._dev
Expand Down
15 changes: 10 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ requires =
tox-pypi-filter >= 0.12

[testenv]
pypi_filter = https://raw.githubusercontent.com/sunpy/sunpy/master/.test_package_pins.txt
pypi_filter = https://raw.githubusercontent.com/sunpy/sunpy/main/.test_package_pins.txt
# Run the tests in a temporary directory to make sure that we don't import
# drms from the source tree
changedir = .tmp/{envname}
Expand All @@ -25,6 +25,7 @@ changedir = .tmp/{envname}
description =
run tests
online: that require remote data
sunpy: run the sunpy jsoc tests to ensure we dont break them
setenv =
MPLBACKEND = agg
COLUMNS = 180
Expand All @@ -39,10 +40,14 @@ deps =
# These are specific online extras we use to run the online tests.
online: pytest-rerunfailures
online: pytest-timeout
# We want to run the sunpy jsoc tests
sunpy: sunpy[all]
# All our tests run in parallel which this plugin allows us to.
pytest-xdist
sunpy: git+https://github.com/sunpy/sunpy
# These are specific extras we use to run the sunpy tests.
sunpy: beautifulsoup4
sunpy: pytest-mock
sunpy: python-dateutil
sunpy: scipy
sunpy: tqdm
sunpy: zeep
# The following indicates which extras_require from setup.cfg will be installed
# dev is special in that it installs everything
extras =
Expand Down

0 comments on commit c4d1174

Please sign in to comment.