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

Clean up CI and drop py3.7 #236

Merged
merged 8 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 0 additions & 32 deletions .circleci/config.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/artifacts.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/pre-commit.yml

This file was deleted.

40 changes: 33 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
name: continuous-integration
name: tests

on: [push, pull_request]

jobs:

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: 3.8
- uses: pre-commit/action@v2.0.0

tests:

strategy:
matrix:
python-version: [3.7, 3.8]
python-version: ["3.8", "3.9", "3.10", "3.11", " 3.12"]
os: [ubuntu-latest]
include:
- os: windows-latest
python-version: 3.7
python-version: "3.12"
- os: macos-latest
python-version: "3.12"

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -33,6 +44,21 @@ jobs:
- name: Run tests
run: pytest

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .
- name: Build docs
run: |
cd doc
make html-strict

publish:

name: Publish to PyPi
Expand All @@ -42,10 +68,10 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.8
- name: Build package
run: |
pip install wheel
Expand Down
10 changes: 10 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.8"
sphinx:
configuration: doc/source/conf.py
python:
install:
- requirements: requirements.txt
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ LaTeX output:
.. jupyter-execute::

from IPython.display import Latex
Latex('\int_{-\infty}^\infty e^{-x²}dx = \sqrt{\pi}')
Latex('\\int_{-\\infty}^\\infty e^{-x²}dx = \\sqrt{\\pi}')

or even full-blown javascript widgets:

Expand Down
4 changes: 0 additions & 4 deletions readthedocs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx>=2.4.4
sphinx>=7.0
ipykernel>=4.5.1
ipywidgets>=7.0.0
IPython
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
license="BSD",
packages=["jupyter_sphinx"],
install_requires=[
"Sphinx>=2",
"Sphinx>=7",
"ipykernel>=4.5.1",
"ipywidgets>=7.0.0",
"IPython",
"nbconvert>=5.5",
"nbformat",
],
python_requires=">= 3.7",
python_requires=">= 3.8",
package_data={"jupyter_sphinx": ["thebelab/*", "css/*"]},
)
12 changes: 10 additions & 2 deletions tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
from nbformat import from_dict
from sphinx.addnodes import download_reference
from sphinx.errors import ExtensionError
from sphinx.testing.util import SphinxTestApp, assert_node, path
from sphinx.testing.util import SphinxTestApp, assert_node

try:
from sphinx.testing.util import path
except ImportError:
path = None


from jupyter_sphinx.ast import (
JupyterCellNode,
Expand Down Expand Up @@ -47,8 +53,10 @@ def doctree(
(src_dir / "index.rst").write_text(source, encoding="utf8")

warnings = StringIO()
if path is not None:
src_dir = path(src_dir.as_posix())
app = SphinxTestApp(
srcdir=path(src_dir.as_posix()),
srcdir=src_dir,
status=StringIO(),
warning=warnings,
buildername=buildername,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37
envlist = py38,py39,py310,py311,py312

[testenv]
deps =
Expand Down