Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 10 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should quote all the versions (that seems to be the "recommendation" from action authors: https://github.com/actions/setup-python#usage).

include:
- python-version: 3.9
- python-version: "3.10"
dev: true

steps:
Expand All @@ -31,20 +31,12 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Cache python wheels
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: |
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py', 'docs/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pip
python -m pip install -e .[coverage]

- name: Install pre-release dependencies
Expand Down Expand Up @@ -86,28 +78,20 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Set up Node/yarn
uses: actions/setup-node@v1
with:
node-version: "16.x"

- name: Cache python wheels
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: |
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py', 'docs/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-

- name: Cache node_modules
uses: actions/cache@v2
with:
path: "node_modules"
key: |
${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-node-modules-${{ hashFiles('package.json') }}

- name: Install dependencies
run: |
Expand Down Expand Up @@ -184,8 +168,8 @@ jobs:
python-version: 3.7
- name: Build package
run: |
python -m pip install -U pip setuptools wheel
python setup.py sdist bdist_wheel
python -m pip install -U pip build
python -m build
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are using stb now, we should be using stb package, right?
https://sphinx-theme-builder.readthedocs.io/en/latest/tutorial/#packaging-the-theme

I guess this is a more general question... do we want to use stb commands here or the underlying machinery?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more "correct" since it's portable across whatever build-backend is used here.

Plus, at the cost of sharing how the sausage is made, stb package is... uhm... a very dumb and thin wrapper around this command anyway. :)

https://github.com/pradyunsg/sphinx-theme-builder/blob/main/src/sphinx_theme_builder/_internal/cli/package.py

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is the answer I needed, thanks for the feedback @pradyunsg!

- name: Publish
uses: pypa/gh-action-pypi-publish@v1.1.0
with:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description = "Bootstrap-based Sphinx theme from the PyData community"
dynamic = ["version"]
readme = "README.md"

requires-python = ">=3.5"
requires-python = ">=3.7"
dependencies = [
"sphinx",
"beautifulsoup4",
Expand Down