Skip to content

Commit de37cf0

Browse files
authored
Update to actions (#272)
* Update to actions * Fix all warnings found by new CI
1 parent b9b0911 commit de37cf0

File tree

6 files changed

+101
-105
lines changed

6 files changed

+101
-105
lines changed

.github/workflows/ci.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- '*.*'
8+
- '!*backport*'
9+
tags:
10+
- 'v*'
11+
- '!*dev*'
12+
- '!*pre*'
13+
- '!*post*'
14+
pull_request:
15+
workflow_dispatch:
16+
schedule:
17+
# ┌───────── minute (0 - 59)
18+
# │ ┌───────── hour (0 - 23)
19+
# │ │ ┌───────── day of the month (1 - 31)
20+
# │ │ │ ┌───────── month (1 - 12 or JAN-DEC)
21+
# │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT)
22+
- cron: '0 7 * * *' # Every day at 07:00 UTC
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: true
27+
28+
jobs:
29+
core:
30+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
31+
with:
32+
submodules: false
33+
coverage: codecov
34+
libraries: |
35+
apt:
36+
- pandoc
37+
- graphviz
38+
envs: |
39+
- linux: py312-sphinx7
40+
secrets:
41+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
42+
43+
test:
44+
needs: [core]
45+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
46+
with:
47+
submodules: false
48+
coverage: codecov
49+
libraries: |
50+
brew:
51+
- pandoc
52+
- graphviz
53+
choco:
54+
- pandoc
55+
- graphviz
56+
apt:
57+
- pandoc
58+
- graphviz
59+
envs: |
60+
- linux: py311-sphinx6
61+
- macos: py310-sphinx5
62+
- windows: py39-sphinx5
63+
secrets:
64+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
65+
66+
docs:
67+
needs: [test]
68+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
69+
with:
70+
default_python: '3.9'
71+
submodules: false
72+
pytest: false
73+
envs: |
74+
- linux: py312-docs
75+
76+
extras:
77+
needs: [test]
78+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
79+
with:
80+
default_python: '3.9'
81+
submodules: false
82+
coverage: codecov
83+
libraries: |
84+
apt:
85+
- pandoc
86+
- graphviz
87+
envs: |
88+
- linux: py312-sphinxdev
89+
- linux: py312-conda
90+
secrets:
91+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

azure-pipelines.yml

Lines changed: 0 additions & 89 deletions
This file was deleted.

conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
from pathlib import Path
2+
13
import docutils
24
import pytest
35
import sphinx
4-
from sphinx.testing.path import path
56

67
# Load app, status and warning fixtures.
78
pytest_plugins = ["sphinx.testing.fixtures"]
@@ -18,7 +19,7 @@ def pytest_report_header(config):
1819

1920
@pytest.fixture(scope="session")
2021
def rootdir():
21-
return path(__file__).parent.abspath() / "roots"
22+
return Path(__file__).parent.absolute() / "roots"
2223

2324

2425
@pytest.fixture(scope="function", autouse=True)

docs/conf.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import re
22
from pathlib import Path
33

4-
from pkg_resources import get_distribution
4+
from packaging.version import parse as _parse
55
from sphinx import addnodes
66

77
import ablog
@@ -22,11 +22,7 @@
2222
"myst_parser",
2323
]
2424

25-
versionmod = get_distribution("ablog")
26-
version = ".".join(versionmod.version.split(".")[:3])
27-
release = versionmod.version.split("+")[0]
28-
is_development = ".dev" in release
29-
25+
version = str(_parse(ablog.__version__))
3026
project = "ABlog"
3127
copyright = "2014-2022, ABlog Team"
3228
master_doc = "index"
@@ -35,13 +31,11 @@
3531
".md": "markdown",
3632
}
3733
exclude_patterns = ["_build", "docs/manual/.ipynb_checkpoints"]
38-
3934
html_title = "ABlog"
4035
html_use_index = True
4136
html_domain_indices = False
4237
html_show_sourcelink = True
4338
html_favicon = "_static/ablog.ico"
44-
4539
blog_title = "ABlog"
4640
blog_baseurl = "https://ablog.readthedocs.io/"
4741
blog_locations = {
@@ -74,7 +68,6 @@
7468
disqus_shortname = "https-ablog-readthedocs-io"
7569
disqus_pages = True
7670
fontawesome_link_cdn = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"
77-
7871
html_style = "alabaster.css"
7972
html_theme = "alabaster"
8073
html_sidebars = {
@@ -98,7 +91,6 @@
9891
"description": "ABlog for blogging with Sphinx",
9992
"logo": "ablog.png",
10093
}
101-
10294
intersphinx_mapping = {
10395
"python": ("https://docs.python.org/", None),
10496
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ filterwarnings =
5858
always::pytest.PytestConfigWarning
5959
# Sphinx and other packages raise these
6060
ignore:'imghdr' is deprecated and slated for removal in Python 3.13:DeprecationWarning
61+
# python-datetuil
62+
ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning
6163

6264
[pycodestyle]
6365
max_line_length = 120

tox.ini

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[tox]
22
envlist =
3-
py{39,310,311}{-sphinx5,-sphinx6,-sphinx7,-sphinxdev,-docs,-linkcheck}
4-
isolated_build = true
3+
py{39,310,311,312}{-sphinx5,-sphinx6,-sphinx7,-sphinx8,-sphinxdev,-docs,-linkcheck}
54

65
[testenv]
76
allowlist_externals =
@@ -17,8 +16,8 @@ commands =
1716
sphinx5: pip install -U "sphinx>=5.0,<6.0"
1817
sphinx6: pip install -U "sphinx>=6.0,<7.0"
1918
sphinx7: pip install -U "sphinx>=7.0,<8.0"
20-
# TODO: Figure this out on azure
21-
# sphinxdev: pip install -U "git+https://repo.or.cz/docutils.git#egg=docutils&subdirectory=docutils"
19+
sphinx8: pip install -U "sphinx>=8.0,<9.0"
20+
sphinxdev: pip install -U "git+https://repo.or.cz/docutils.git#egg=docutils&subdirectory=docutils"
2221
sphinxdev: pip install -U "git+https://github.com/sphinx-doc/sphinx"
2322
pip freeze --all --no-input
2423
pytest -vvv -r a --pyargs ablog

0 commit comments

Comments
 (0)