Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BROKEN #286

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ version: 2
jobs:
twine-check:
docker:
- image: circleci/python:3.8
- image: cimg/python:3.12
steps:
- checkout
- run: python setup.py sdist
- run: python -m pip install -U --user --force-reinstall twine
- 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/*

workflows:
version: 2
twine-check:
Expand Down
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%
83 changes: 48 additions & 35 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,11 +36,11 @@ jobs:
- pandoc
- graphviz
envs: |
- linux: py312-sphinx7
- linux: py312-sphinx8
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test:
tests:
needs: [core]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
Expand All @@ -57,35 +57,48 @@ jobs:
- pandoc
- graphviz
envs: |
- linux: py311-sphinx6
- macos: py310-sphinx5
- windows: py39-sphinx5
- macos: py311-sphinx7
- windows: py310-sphinx7
- linux: py39-sphinx6
- linux: py312-devdeps
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

docs:
needs: [test]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.9'
submodules: false
pytest: false
envs: |
- linux: py312-docs

extras:
needs: [test]
needs: [tests]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.9'
submodules: false
coverage: codecov
pytest: false
libraries: |
apt:
- pandoc
- graphviz
envs: |
- linux: py312-sphinxdev
- linux: py312-conda
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- linux: py312-docs
- linux: pydata-sphinx-theme-dev
- linux: py312-linkcheck

conda:
needs: [tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: ablog-test
environment-file: ablog-conda-test-env.yml
python-version: "3.12"
- name: Install ablog
shell: bash -el {0}
run: |
pip install --no-deps --no-build-isolation .
- name: Run test
shell: bash -el {0}
run: |
conda list
pytest -vvv -r a --pyargs ablog
make tests
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/
76 changes: 39 additions & 37 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,49 @@
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.0
- 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.3.7'
hooks:
- id: ruff
args: ['--fix']
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: '0.0.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: stylelint
additional_dependencies: ['[email protected]', '[email protected]']
- repo: https://github.com/pre-commit/mirrors-prettier
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
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: prettier
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"
}
Loading