Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/fips-hashlib-md5
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell authored May 21, 2024
2 parents 4651d30 + 074f21f commit ed807c2
Show file tree
Hide file tree
Showing 49 changed files with 17,977 additions and 990 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,36 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: pre-commit/[email protected].0
python-version: 3.9
- uses: pre-commit/[email protected].1

tests:

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
sphinx-version: ["~=7.0"]
include:
- os: ubuntu-latest
python-version: 3.8
python-version: 3.9
sphinx-version: "~=5.0"
- os: ubuntu-latest
python-version: 3.8
python-version: 3.9
sphinx-version: "~=6.0"
- os: windows-latest
python-version: 3.8
python-version: 3.9
sphinx-version: "~=7.0"

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

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -57,9 +57,10 @@ jobs:
run: |
pytest --cov=sphinx_design --cov-report=xml --cov-report=term-missing
- name: Upload to Codecov
if: matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest'
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: pytests
flags: pytests
file: ./coverage.xml
Expand All @@ -73,7 +74,7 @@ jobs:
format: [html, latex, man]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -112,11 +113,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: install flit
run: |
pip install flit~=3.4
Expand Down
23 changes: 7 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,22 @@ exclude: >
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/pycqa/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear~=22.7]
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies: []
Expand Down
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.9"

python:
version: "3.8"
install:
- method: pip
path: .
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ horizontal card (grid row inside card, picture on left)

subtitle for card (see <https://material.io/components/cards#anatomy>)

rtd PRs not working


[github-ci]: https://github.com/executablebooks/sphinx-design/workflows/continuous-integration/badge.svg?branch=main
[github-link]: https://github.com/executablebooks/sphinx-design
Expand Down
5 changes: 5 additions & 0 deletions docs/_static/furo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
body {
--sd-fontsize-dropdown: var(--admonition-font-size);
--sd-fontsize-dropdown-title: var(--admonition-title-font-size);
--sd-fontweight-dropdown-title: 500;
}
30 changes: 30 additions & 0 deletions docs/_static/sphinx_immaterial.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
body {
--sd-fontsize-dropdown: .64rem;
--sd-fontsize-dropdown-title: .64rem;
--sd-fontweight-dropdown-title: 700;
}

details.sd-dropdown {
padding-left: 0;
padding-right: 0;
}

summary.sd-summary-title::after {
display: none;
right: 0 !important;
}

summary.sd-summary-title::before {
display: none;
left: 0 !important;
}

summary.sd-summary-title {
width: 100% !important;
margin-left: 0;
padding: .5em 1em !important;
}

summary.sd-summary-title svg.sd-octicon {
max-width: none !important;
}
2 changes: 1 addition & 1 deletion docs/additional.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ normally positioned just below the title of the article (shown below with non-st

`````{dropdown} Syntax
:icon: code
:color: light
:color: primary
````{tab-set-code}
```{literalinclude} ./snippets/myst/article-info.txt
Expand Down
6 changes: 3 additions & 3 deletions docs/badges_buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Badges are available in each semantic color, with filled and outline variants:

`````{dropdown} Syntax
:icon: code
:color: light
:color: primary
````{tab-set-code}
```{literalinclude} ./snippets/myst/badge-basic.txt
Expand All @@ -42,7 +42,7 @@ The syntax is the same as for the `ref` role.

`````{dropdown} Syntax
:icon: code
:color: light
:color: primary
````{tab-set-code}
```{literalinclude} ./snippets/myst/badge-link.txt
Expand Down Expand Up @@ -96,7 +96,7 @@ Reference Button text

`````{dropdown} Syntax
:icon: code
:color: light
:color: primary
````{tab-set-code}
```{literalinclude} ./snippets/myst/button-link.txt
Expand Down
10 changes: 5 additions & 5 deletions docs/cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ See the [Material Design](https://material.io/components/cards) and [Bootstrap c

`````{dropdown} Syntax
:icon: code
:color: light
:color: primary
````{tab-set-code}
```{literalinclude} ./snippets/myst/card-basic.txt
Expand All @@ -40,7 +40,7 @@ Footer

`````{dropdown} Syntax
:icon: code
:color: light
:color: primary
````{tab-set-code}
```{literalinclude} ./snippets/myst/card-head-foot.txt
Expand Down Expand Up @@ -117,7 +117,7 @@ Footer

`````{dropdown} Syntax
:icon: code
:color: light
:color: primary
````{tab-set-code}
```{literalinclude} ./snippets/myst/card-images.txt
Expand Down Expand Up @@ -153,7 +153,7 @@ The entire card can be clicked to navigate to the `cards-clickable` reference ta

`````{dropdown} Syntax
:icon: code
:color: light
:color: primary
````{tab-set-code}
```{literalinclude} ./snippets/myst/card-link.txt
Expand Down Expand Up @@ -225,7 +225,7 @@ content

`````{dropdown} Syntax
:icon: code
:color: light
:color: primary
````{tab-set-code}
```{literalinclude} ./snippets/myst/card-carousel.txt
Expand Down
37 changes: 36 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Configuration file for the Sphinx documentation builder."""

import os

project = "Sphinx Design"
Expand Down Expand Up @@ -45,7 +46,8 @@
}
if html_theme == "furo":
html_css_files = [
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css"
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css",
"furo.css",
]
html_theme_options = {
"sidebar_hide_name": True,
Expand All @@ -54,6 +56,39 @@
html_theme_options = {
"logo_only": True,
}
if html_theme == "sphinx_immaterial":
extensions.append("sphinx_immaterial")
html_css_files = ["sphinx_immaterial.css"]
html_theme_options = {
"icon": {
"repo": "fontawesome/brands/github",
},
"site_url": "https://sphinx-design.readthedocs.io/",
"repo_url": "https://github.com/executablebooks/sphinx-design",
"repo_name": "Sphinx-Design",
"palette": [
{
"media": "(prefers-color-scheme: light)",
"scheme": "default",
"primary": "blue",
"accent": "light-blue",
"toggle": {
"icon": "material/weather-night",
"name": "Switch to dark mode",
},
},
{
"media": "(prefers-color-scheme: dark)",
"scheme": "slate",
"primary": "blue",
"accent": "yellow",
"toggle": {
"icon": "material/weather-sunny",
"name": "Switch to light mode",
},
},
],
}

exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
myst_enable_extensions = ["colon_fence", "deflist", "substitution", "html_image"]
Expand Down
2 changes: 1 addition & 1 deletion docs/css_classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Some CSS styled text

`````{dropdown} Syntax
:icon: code
:color: light
:color: primary
````{tab-set-code}
```{literalinclude} ./snippets/myst/div-basic.txt
Expand Down
4 changes: 3 additions & 1 deletion docs/css_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ The defaults are:
--sd-color-tabs-underline-inactive: transparent;
--sd-color-tabs-overline: rgb(222, 222, 222);
--sd-color-tabs-underline: rgb(222, 222, 222);
--sd-fontsize-tabs-label: 1rem
--sd-fontsize-tabs-label: 1rem;
--sd-fontsize-dropdown-title: 1rem;
--sd-fontweight-dropdown-title: 700;
}
```
Loading

0 comments on commit ed807c2

Please sign in to comment.