Skip to content

Commit

Permalink
Merge pull request #284 from sunpy/par
Browse files Browse the repository at this point in the history
metadata for parallel_read_safe
  • Loading branch information
nabobalis authored Aug 8, 2024
2 parents c6bca84 + 183f6ff commit 0cf1430
Show file tree
Hide file tree
Showing 54 changed files with 697 additions and 910 deletions.
8 changes: 8 additions & 0 deletions .codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
codecov:
token: a0dfd87f-8eb9-4a41-9e4e-a06919f216cd
comment: off
coverage:
status:
project:
default:
threshold: 0.2%
61 changes: 24 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ name: CI
on:
push:
branches:
- 'main'
- '*.*'
- '!*backport*'
- "main"
- "*.*"
- "!*backport*"
tags:
- 'v*'
- '!*dev*'
- '!*pre*'
- '!*post*'
- "v*"
- "!*dev*"
- "!*pre*"
- "!*post*"
pull_request:
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 * * *' # Every day at 07:00 UTC
# ┌───────── 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 * * *" # Every day at 07:00 UTC

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -36,7 +36,7 @@ jobs:
- pandoc
- graphviz
envs: |
- linux: py312-sphinx7
- linux: py312-sphinx8
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -57,17 +57,18 @@ jobs:
- pandoc
- graphviz
envs: |
- linux: py311-sphinx6
- macos: py310-sphinx5
- windows: py39-sphinx5
- macos: py311-sphinx7
- windows: py310-sphinx7
- linux: py310-sphinx6
- linux: py312-pydata-sphinx-theme
- linux: py312-devdeps
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

docs:
needs: [core]
extras:
needs: [tests]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.9'
submodules: false
pytest: false
libraries: |
Expand All @@ -76,9 +77,11 @@ jobs:
- graphviz
envs: |
- linux: py312-docs
- linux: pydata-sphinx-theme-dev
- linux: py312-linkcheck
conda:
needs: [core]
needs: [tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -100,19 +103,3 @@ jobs:
conda list
pytest -vvv -r a --pyargs ablog
make tests
extras:
needs: [tests]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.9'
submodules: false
coverage: codecov
libraries: |
apt:
- pandoc
- graphviz
envs: |
- linux: py312-sphinxdev
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
32 changes: 16 additions & 16 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U --user --force-reinstall pep517 setuptools_scm twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m pep517.build --binary --source --out-dir wheelhouse .
python -m twine upload --skip-existing wheelhouse/*
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U --user --force-reinstall pep517 setuptools_scm twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m pep517.build --binary --source --out-dir wheelhouse .
python -m twine upload --skip-existing wheelhouse/*
39 changes: 3 additions & 36 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ instance/
# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

Expand Down Expand Up @@ -138,24 +135,10 @@ Icon

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

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

Expand Down Expand Up @@ -195,29 +178,14 @@ $RECYCLE.BIN/
### VScode: https://raw.githubusercontent.com/github/gitignore/master/Global/VisualStudioCode.gitignore
.vscode/*

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

### Pycharm(?)
.idea

# Release script
# Ablog
.github_cache

src/ablog/version.py
docs/_build/
docs/api/
docs/.doctrees/
docs/_website/
docs/_latex/
Expand All @@ -226,5 +194,4 @@ test/
.history/
pydata-sphinx-theme/
_build
_version.py
demo/
81 changes: 44 additions & 37 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,54 @@
ci:
autofix_prs: false
autoupdate_schedule: "quarterly"
autofix_prs: false
autoupdate_schedule: "quarterly"
repos:
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
- id: docformatter
args: ["--in-place", "--pre-summary-newline", "--make-summary-multi"]
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.4.2
- id: autoflake
args:
[
"--in-place",
"--remove-all-unused-imports",
"--remove-unused-variable",
]
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|docs/conf.py)$"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.0"
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
- id: ruff
args: ["--fix", "--unsafe-fixes"]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.4.2'
- id: check-ast
- id: check-case-conflict
- id: trailing-whitespace
exclude: ".*(.fits|.fts|.fit|.txt|.csv)$"
- id: mixed-line-ending
exclude: ".*(.fits|.fts|.fit|.txt|.csv)$"
- id: end-of-file-fixer
exclude: ".*(.fits|.fts|.fit|.txt|.csv)$"
- id: check-yaml
- id: debug-statements
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: ruff
args: ['--fix']
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: '0.0.2'
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.3.3
hooks:
- id: stylelint
additional_dependencies: ['stylelint@14.9.1', 'stylelint-config-standard@26.0.0']
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
- id: prettier
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.34.1
hooks:
- id: prettier
types_or: [css, scss, javascript]
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.34.1
hooks:
- id: djlint-jinja
types_or: ["html"]
- id: djlint-jinja
types_or: ["html"]
12 changes: 6 additions & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2
build:
os: ubuntu-22.04
os: ubuntu-lts-latest
tools:
python: "mambaforge-4.10"
python: "mambaforge-latest"
jobs:
pre_install:
- git update-index --assume-unchanged .rtd-environment.yml docs/conf.py
Expand All @@ -13,9 +13,9 @@ sphinx:
configuration: docs/conf.py
fail_on_warning: false
python:
install:
- method: pip
extra_requirements:
install:
- method: pip
extra_requirements:
- all
- docs
path: .
path: .
2 changes: 1 addition & 1 deletion .rtd-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: rtd_ablog
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.12
- pip
- graphviz
- make
Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "stylelint-config-standard"
"extends": "stylelint-config-standard"
}
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ rebuild:
cd docs; watchmedo shell-command --patterns='*.rst' --command='ablog build' --recursive

test:
set -e; cd docs; ablog build -T -W; git clean -xfd; cd ..
set -e; cd docs; git clean -xfd; ablog build -T -W; git clean -xfd; cd ..

test1:
set -e; cd docs; ablog build -T -W -b json; git clean -xfd; cd ..
set -e; cd docs; git clean -xfd; ablog build -T -W -b json; git clean -xfd; cd ..

test2:
set -e; cd docs; ablog build -T -W -b pickle; git clean -xfd; cd ..
set -e; cd docs; git clean -xfd; ablog build -T -W -b pickle; git clean -xfd; cd ..

test3:
set -e; mkdir -p test; cd test; printf "\nABlog\nABlog Team\nhttps://ablog.readthedocs.io/" | ablog start; ablog build -W; cd ..; rm -rf test
set -e; mkdir -p test; cd test; git clean -xfd; printf "\nABlog\nABlog Team\nhttps://ablog.readthedocs.io/" | ablog start; ablog build -W; cd ..; rm -rf test

test4:
set -e; mkdir -p testablog; cd testablog; printf "\nABlog\nABlog Team\nhttps://ablog.readthedocs.io/" | ablog start; ablog build -W; cd ..; rm -rf testablog
set -e; mkdir -p testablog; cd testablog; git clean -xfd; printf "\nABlog\nABlog Team\nhttps://ablog.readthedocs.io/" | ablog start; ablog build -W; cd ..; rm -rf testablog

test5:
set -e; cd docs; ablog build -W -b latex -T -d .doctrees -w _latex; git clean -xfd; cd ..
set -e; cd docs; git clean -xfd; ablog build -W -b latex -T -d .doctrees -w _latex; git clean -xfd; cd ..

tests: test test1 test2 test3 test4 test5
Loading

0 comments on commit 0cf1430

Please sign in to comment.