-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shane Maloney
committed
Jun 18, 2024
0 parents
commit bee7840
Showing
32 changed files
with
1,165 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
comment: off | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
threshold: 0.2% | ||
|
||
codecov: | ||
require_ci_to_pass: false | ||
notify: | ||
wait_for_ci: true |
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,13 @@ | ||
[codespell] | ||
skip = *.asdf,*.fits,*.fts,*.header,*.json,*.xsh,*cache*,*egg*,*extern*,.git,.idea,.tox,_build,*truncated,*.svg,.asv_env,.history | ||
ignore-words-list = | ||
alog, | ||
nd, | ||
nin, | ||
observ, | ||
ot, | ||
te, | ||
upto, | ||
afile, | ||
precessed, | ||
precess |
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,30 @@ | ||
[run] | ||
omit = | ||
smart/conftest.py | ||
smart/*setup_package* | ||
smart/extern/* | ||
smart/version* | ||
*/smart/conftest.py | ||
*/smart/*setup_package* | ||
*/smart/extern/* | ||
*/smart/version* | ||
|
||
[report] | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
# Don't complain about packages we have installed | ||
except ImportError | ||
# Don't complain if tests don't hit assertions | ||
raise AssertionError | ||
raise NotImplementedError | ||
# Don't complain about script hooks | ||
def main(.*): | ||
# Ignore branches that don't pertain to this version of Python | ||
pragma: py{ignore_python_version} | ||
# Don't complain about IPython completion helper | ||
def _ipython_key_completions_ | ||
# typing.TYPE_CHECKING is False at runtime | ||
if TYPE_CHECKING: | ||
# Ignore typing overloads | ||
@overload |
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,31 @@ | ||
{ | ||
"template": "https://github.com/sunpy/package-template", | ||
"commit": "c79fc5bff74958e24c9a925a330b8d3aa138f4ce", | ||
"checkout": null, | ||
"context": { | ||
"cookiecutter": { | ||
"package_name": "smart", | ||
"module_name": "smart", | ||
"short_description": "SolarMonitor Active Regtion Tracking (SMART)", | ||
"author_name": "SolarMonitor Team", | ||
"author_email": "", | ||
"project_url": "", | ||
"license": "BSD 3-Clause", | ||
"minimum_python_version": "3.9", | ||
"use_compiled_extensions": "n", | ||
"enable_dynamic_dev_versions": "y", | ||
"include_example_code": "n", | ||
"include_cruft_update_github_workflow": "y", | ||
"_sphinx_theme": "alabaster", | ||
"_parent_project": "", | ||
"_install_requires": "", | ||
"_copy_without_render": [ | ||
"docs/_templates", | ||
"docs/_static", | ||
".github/workflows/sub_package_update.yml" | ||
], | ||
"_template": "https://github.com/sunpy/package-template" | ||
} | ||
}, | ||
"directory": null | ||
} |
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,27 @@ | ||
[flake8] | ||
ignore = | ||
# missing-whitespace-around-operator | ||
E225 | ||
# missing-whitespace-around-arithmetic-operator | ||
E226 | ||
# line-too-long | ||
E501 | ||
# unused-import | ||
F401 | ||
# undefined-local-with-import-star | ||
F403 | ||
# redefined-while-unused | ||
F811 | ||
# Line break occurred before a binary operator | ||
W503, | ||
# Line break occurred after a binary operator | ||
W504 | ||
max-line-length = 110 | ||
exclude = | ||
.git | ||
__pycache__ | ||
docs/conf.py | ||
build | ||
smart/__init__.py | ||
rst-directives = | ||
plot |
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,102 @@ | ||
|
||
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 | ||
envs: | | ||
- linux: py312 | ||
secrets: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
sdist_verify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- run: python -m pip install -U --user build | ||
- run: python -m build . --sdist | ||
- run: python -m pip install -U --user twine | ||
- run: python -m twine check dist/* | ||
|
||
test: | ||
needs: [core, sdist_verify] | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main | ||
with: | ||
submodules: false | ||
coverage: codecov | ||
toxdeps: tox-pypi-filter | ||
posargs: -n auto | ||
envs: | | ||
- windows: py311 | ||
- macos: py310 | ||
- linux: py310-oldestdeps | ||
secrets: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
docs: | ||
needs: [core] | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main | ||
with: | ||
default_python: '3.10' | ||
submodules: false | ||
pytest: false | ||
toxdeps: tox-pypi-filter | ||
libraries: | | ||
apt: | ||
- graphviz | ||
envs: | | ||
- linux: build_docs | ||
cron: | ||
if: | | ||
github.event_name == 'workflow_dispatch' || ( | ||
github.event_name == 'pull_request' && | ||
contains(github.event.pull_request.labels.*.name, 'Run cron CI') | ||
) | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main | ||
with: | ||
default_python: '3.10' | ||
submodules: false | ||
coverage: codecov | ||
toxdeps: tox-pypi-filter | ||
envs: | | ||
- linux: py311-devdeps | ||
secrets: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
publish_pure: | ||
needs: [test, docs] | ||
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main | ||
with: | ||
python-version: '3.10' | ||
test_extras: 'tests' | ||
test_command: 'pytest -p no:warnings --doctest-rst --pyargs smart' | ||
submodules: false | ||
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# This template is taken from the cruft example code, for further information please see: | ||
# https://cruft.github.io/cruft/#automating-updates-with-github-actions | ||
name: Automatic Update from package template | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
on: | ||
# Allow manual runs through the web UI | ||
workflow_dispatch: | ||
schedule: | ||
# ┌───────── minute (0 - 59) | ||
# │ ┌───────── hour (0 - 23) | ||
# │ │ ┌───────── day of the month (1 - 31) | ||
# │ │ │ ┌───────── month (1 - 12 or JAN-DEC) | ||
# │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) | ||
- cron: '0 7 * * 1' # Every Monday at 7am UTC | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
include: | ||
- add-paths: . | ||
body: apply the changes to this repo. | ||
branch: cruft/update | ||
commit-message: "Automatic package template update" | ||
title: Updates from the package template | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install Cruft | ||
run: python -m pip install git+https://github.com/Cadair/cruft@patch-p1 | ||
|
||
- name: Check if update is available | ||
continue-on-error: false | ||
id: check | ||
run: | | ||
CHANGES=0 | ||
if [ -f .cruft.json ]; then | ||
if ! cruft check; then | ||
CHANGES=1 | ||
fi | ||
else | ||
echo "No .cruft.json file" | ||
fi | ||
echo "has_changes=$CHANGES" >> "$GITHUB_OUTPUT" | ||
- name: Run update if available | ||
if: steps.check.outputs.has_changes == '1' | ||
run: | | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
git config --global user.name "${{ github.actor }}" | ||
cruft update --skip-apply-ask --refresh-private-variables | ||
git restore --staged . | ||
- name: Create pull request | ||
if: steps.check.outputs.has_changes == '1' | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
add-paths: ${{ matrix.add-paths }} | ||
commit-message: ${{ matrix.commit-message }} | ||
branch: ${{ matrix.branch }} | ||
delete-branch: true | ||
branch-suffix: timestamp | ||
title: ${{ matrix.title }} | ||
body: | | ||
This is an autogenerated PR, which will ${{ matrix.body }}. | ||
[Cruft](https://cruft.github.io/cruft/) has detected updates from the Package Template |
Oops, something went wrong.