Skip to content

Commit

Permalink
Package overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Nov 1, 2023
1 parent 2adf498 commit 2ae7ce8
Show file tree
Hide file tree
Showing 41 changed files with 389 additions and 473 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
106 changes: 106 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: CI

on:
push:
branches:
- 'main'
- '*.*'
- '!*backport*'
tags:
- 'v*'
- '!*dev*'
- '!*pre*'
- '!*post*'
pull_request:
# Allow manual runs through the web UI
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
core:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n auto
envs: |
- linux: py311
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test:
needs: [core]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n auto
envs: |
- windows: py310
- macos: py39
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

docs:
needs: [core]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.9'
submodules: false
pytest: false
toxdeps: tox-pypi-filter
cache-path: |
docs/_build/
docs/generated/
.tox/sample_data/
libraries: |
apt:
- graphviz
envs: |
- linux: build_docs
online:
if: "!startsWith(github.event.ref, 'refs/tags/v')"
needs: [docs]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.9'
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
posargs: -n auto --dist loadgroup
libraries: |
apt:
- libopenjp2-7
envs: |
- linux: py39-online
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

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: [test]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main
with:
python-version: "3.10"
test_extras: 'all,tests'
test_command: 'pytest -p no:warnings --doctest-rst -m "not mpl_image_compare" --pyargs sunpy'
submodules: false
secrets:
pypi_token: ${{ secrets.pypi_token }}
71 changes: 0 additions & 71 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .rtd-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name: rtd_aiapy
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.11
- pip
- graphviz!=2.42.*,!=2.43.*
13 changes: 0 additions & 13 deletions .sunpy-template.yml

This file was deleted.

88 changes: 72 additions & 16 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Contributor Covenant Code of Conduct
# Contributor Covenant Code of Conduct #

## Our Pledge
## Our Pledge ##

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards
## Our Standards ##

Examples of behavior that contributes to a positive environment for our
community include:
Expand All @@ -22,21 +22,21 @@ community include:
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
## Enforcement Responsibilities ##

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
Expand All @@ -48,15 +48,71 @@ comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope
## Scope ##

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Attribution
## Enforcement ##

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines ##

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction ##

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning ##

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban ##

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban ##

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution ##

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
Expand All @@ -66,8 +122,8 @@ Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020-2021, AIA Instrument Team
Copyright (c) 2020-2023, AIA Instrument Team
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
4 changes: 2 additions & 2 deletions aiapy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from pathlib import Path
from .version import version as __version__

from itertools import compress

from .version import version as __version__

_SSW_MIRROR = "https://sohoftp.nascom.nasa.gov/solarsoft/"


Expand Down
3 changes: 1 addition & 2 deletions aiapy/calibrate/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
import copy
import warnings

import numpy as np

import astropy.time
import astropy.units as u
import numpy as np
from astropy.coordinates import CartesianRepresentation, HeliocentricMeanEcliptic, SkyCoord
from sunpy.map import contains_full_disk

Expand Down
3 changes: 1 addition & 2 deletions aiapy/calibrate/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"""
import warnings

import numpy as np

import astropy.units as u
import numpy as np
from sunpy.map import contains_full_disk
from sunpy.map.sources.sdo import AIAMap, HMIMap
from sunpy.util.decorators import add_common_docstring
Expand Down
Loading

0 comments on commit 2ae7ce8

Please sign in to comment.