Skip to content

Commit

Permalink
Merge branch 'master' of github.com:readthedocs/sphinx_rtd_theme into…
Browse files Browse the repository at this point in the history
… responsive-tables
  • Loading branch information
benjaoming committed Aug 27, 2022
2 parents 82b1e5e + aeae4c1 commit 42bf98c
Show file tree
Hide file tree
Showing 132 changed files with 13,801 additions and 1,170 deletions.
104 changes: 104 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
version: 2.1

orbs:
node: circleci/[email protected]

commands:
run-tox:
description: "Run tox"
parameters:
version:
type: string
sphinx-version:
type: string
default: "16,17,18,20,21,22,23,24,30,31,32,33,34,35,40,41,latest"
steps:
- checkout
- run: pip install --user tox
- run: tox -e "<<parameters.version>>-sphinx{<<parameters.sphinx-version>>}"
run-build:
description: "Ensure built assets are up to date"
steps:
- checkout
- node/install:
node-version: '14.20'
- run: npm ci
- run: npm run build
- run:
name: Ensure built assets are up to date
command: |
if [[ `git status sphinx_rtd_theme/ --porcelain` ]]
then
echo "ERROR: assets are out of date. Make sure to run 'npm run build' on your branch."
git status sphinx_rtd_theme/ --porcelain
exit 1
fi
jobs:
build:
docker:
- image: 'cimg/python:3.9-node'
steps:
- run-build: {}
py27:
docker:
- image: 'cimg/python:2.7'
steps:
- run-tox:
version: py27
sphinx-version: "16,17,18"
py36:
docker:
- image: 'cimg/python:3.6'
steps:
- run-tox:
version: py36
py37:
docker:
- image: 'cimg/python:3.7'
steps:
- run-tox:
version: py37
py38:
docker:
- image: 'cimg/python:3.8'
steps:
- run-tox:
version: py38
py39:
docker:
- image: 'cimg/python:3.9'
steps:
- run-tox:
version: py39
py310:
docker:
- image: 'cimg/python:3.10'
steps:
- run-tox:
version: py310
sphinx-version: "42,43,44,45,50,51,latest"

workflows:
version: 2
tests:
jobs:
- build
- py310:
requires:
- build
- py39:
requires:
- build
- py38:
requires:
- build
- py37:
requires:
- build
- py36:
requires:
- build
- py27:
requires:
- build
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Document global line endings settings
# https://help.github.com/articles/dealing-with-line-endings/
* text eol=lf
*.bat text eol=crlf


# Denote all files that are truly binary and should not be modified.
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @readthedocs/theme
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'Bug, Needed: replication'
assignees: ''

---

### Problem

Expand Down
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,21 @@
.ruby-version
dist/
bower_components/
include/
lib/
local/
node_modules
npm-debug.log
package-lock.json
pip-selfcheck.json
sphinx_rtd_theme/static/fonts/Lato/
sphinx_rtd_theme/static/fonts/RobotoSlab/
.python-version
.node-version
.tool-versions
.nvmrc
sphinx_rtd_theme/static/js/html5shiv.min.js
sphinx_rtd_theme/static/js/html5shiv-printshiv.min.js
.direnv/
.envrc
# Used for dockerized builds
.container_id
14 changes: 10 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
build:
image: latest
version: 2

python:
version: 3.6
requirements_file: docs/requirements.txt
version: 3.8
install:
- requirements: docs/requirements.txt
- method: pip
path: .

sphinx:
configuration: docs/conf.py
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[sphinx-rtd-theme.sphinx-rtd-theme]
file_filter = sphinx_rtd_theme/locale/<lang>/LC_MESSAGES/sphinx.po
source_file = sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po
source_lang = en
minimum_perc = 60

[main]
host = https://www.transifex.com
type = PO
58 changes: 58 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This implicitely includes Python 3.10
FROM node:14-alpine

# Do not use --update since that will also fetch the
# latest node-current package
# 'make' is needed for building documentation
RUN apk add npm make py3-pip py3-wheel

# Add an extra verification that we have the right node
# because the above caused issues
RUN node -v && node -v | grep -q v14 &&\
python3 --version && python3 --version | grep -q "3.10"

RUN pip install pip --upgrade

RUN mkdir -p /project/src/ &&\
mkdir -p /project/docs/build/ &&\
mkdir -p /project-minimal-copy/sphinx_rtd_theme &&\
touch /project-minimal-copy/sphinx_rtd_theme/__init__.py

# This is the main working directory where node_modules
# gets built. During runtime, it's mixed with directories
# from an external environment through a bind mount
WORKDIR /project

# Copy files necessary to run "npm install" and save
# installed packages in the docker image (makes the runtime
# so much faster)
COPY package.json /project/
COPY bin/preinstall.js /project/bin/preinstall.js

RUN cd /project

# It matters that the node environment is installed into the same
# folder, i.e. /project where we will run the environment from
RUN npm install --package-lock-only &&\
npm audit fix &&\
npm install

# This is strictly speaking not necessary, just makes
# running the container faster...
# Install dependencies, then uninstall project itself
COPY setup.py README.rst /project-minimal-copy/
RUN cd /project-minimal-copy &&\
pip install ".[dev]" &&\
/usr/bin/yes | pip uninstall sphinx_rtd_theme


# Copy in files that we need to run the project. These files
# will not be mounted into the runtime from external environment
# so we copy them during build.
COPY webpack.common.js webpack.dev.js webpack.prod.js /project/

# Copy in the entrypoint and we're done
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
Loading

0 comments on commit 42bf98c

Please sign in to comment.