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
28 changes: 28 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Development Container

The development container config ([.devcontainer.json](./devcontainer.json)) enables starting a
pre-configured [GitHub Codespaces](https://github.com/features/codespaces) environment ready to
build and preview the docs in this repository.

## Building a preview

The current version of the docs will be automatically built the when a new codespace is created. To
re-build the docs after making changes, simply run this command from the terminal:

```shell
rm -rf _build/ && make html
```

Note: you may need go to the main menu, click `View`, then `Terminal` if the terminal isn't visible.

## Viewing the preview

To preview the docs, run the following command in the terminal:

```shell
python -m http.server 8080 -d _build/html
```

This will start a simple Python web server on port 8080 in the codespace and open a preview of the
site in VSCode's built-in simple browser. To preview in your actual browser, click the `PORTS` tab,
right-click on `Doc Preview (8080)`, and select `Open in Browser`.
51 changes: 51 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/python:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "./.devcontainer/postCreateCommands.sh",

// Configure tool-specific properties.
"customizations": {
"codespaces": {
"openFiles": [
".devcontainer/README.md",
"README.md"
]
},
"vscode": {
"extensions": [
"lextudio.restructuredtext",
"trond-snekvik.simple-rst",
"DavidAnson.vscode-markdownlint",
"ZainChen.json",
"stkb.rewrap"
]
}
},
"portsAttributes": {
"8080": {
"label": "Doc Preview",
"onAutoForward": "openPreview"
}
}

// // Configure command(s) to run after starting
// "postStartCommand": {
// "serve-doc-preview": "python -m http.server 8080 -d _build/html/"
// }

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
10 changes: 10 additions & 0 deletions .devcontainer/postCreateCommands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#/!bin/sh

# Command to run during postCreateCommand
# Done in script because when done via object the commands are run in parallel
# (which isn't always desirable)
# https://containers.dev/implementors/spec/#parallel-exec
# https://containers.dev/implementors/json_reference/#formatting-string-vs-array-properties

pip install -r requirements.txt
make html
23 changes: 23 additions & 0 deletions .github/workflows/preview-url.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Add preview URL to PR description
on:
pull_request_target:
types: [opened]
paths:
- '**.md'
- '**.png'
- '**.rst'
- '**.svg'

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: edit-pull-request-description
uses: Jerome1337/comment-pull-request@v1.0.4

env:
GITHUB_TOKEN: ${{ github.token }}
with:
description-message: |

Preview build: https://dash-docs-platform--${{github.event.pull_request.number}}.org.readthedocs.build/en/${{github.event.pull_request.number}}/
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.db
*.exe
_build
**/.DS_Store
.vscode
10 changes: 10 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"default": true,
"MD004": { "style": "asterisk"},
"MD013": false,
"MD033": false,
"MD036": false,
"MD040": true,
"MD041": false,
"MD049": true
}
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
11 changes: 11 additions & 0 deletions _static/css/footer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* Make each footer item in-line so they stack horizontally instead of vertically */
.footer-item {
display: inline-block;
}

/* Add a separating border line for all but the last item */
.footer-item:not(:last-child) {
border-right: 1px solid var(--pst-color-text-base);
margin-right: .5em;
padding-right: .5em;
}
151 changes: 151 additions & 0 deletions _static/css/pydata-overrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
/* Update theme variables based on https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/styling.html#css-theme-variables */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,600;0,900;1,900&family=Open+Sans:ital,wght@0,400;0,500;1,400&display=swap');

:root {
--dash-blue: #008de4;
--dash-deep-blue: #012060;
--dash-midnight-blue: #0b0f3b;
}

html[data-theme="light"] {
--pst-color-primary:var(--dash-blue);
--pst-color-link:var(--pst-color-primary);
--pst-color-link-hover:var(--dash-deep-blue);
}

html[data-theme="dark"] {
--pst-color-primary:var(--dash-blue);
--pst-color-link:var(--pst-color-primary);
}

html {
/* Headers */
--pst-font-size-h1: 28px;
--pst-font-size-h2: 24px;
--pst-font-size-h3: 20px;

/* Sidebar styles */
--pst-sidebar-font-size: 0.95em;
--pst-sidebar-header-font-size: 1.2em;
}

html[data-theme=dark] .bd-content img:not(.only-dark):not(.dark-light) {
background: none;
border-radius: none;
}

h1,h2,h3,h4,h5,h6{
font-family: 'Montserrat', sans-serif;
font-weight: 600;
}

p, a, li, ol {
font-family: 'Open Sans', sans-serif;
}

p {
font-size: 0.95em;
line-height: 1.5;
}

.sidebar-end-items__item {
position: relative;
}

select {
width: 100%;
padding: 10px;
appearance: none;
background: transparent;
border-radius: 0.25rem;
}

html[data-theme=dark] select {
color: #fff;
}

html[data-theme="light"] select{
color: #000;
}

html[data-theme="light"] {
--table-bg-color-odd: #eeeeee;
--table-bg-color-even: #ffffff;
}

tbody tr:nth-child(odd) { background-color: var(--table-bg-color-odd); }
tbody tr:nth-child(even) { background-color: var(--table-bg-color-even); }

.table thead th.head {
vertical-align: middle;
}

/* These are hacks to hide the pydata-theme search popup behind the readthedocs
sphinx search extension interface.
*/
.search-button__wrapper.show .search-button__search-container,
.search-button__wrapper.show .search-button__overlay {
z-index: 1;
}

.search-button__wrapper.show .search-button__overlay {
display: none;
}

/* Make sure it doesn't stick out on the sides of the RtD search screen */
.search-button__wrapper.show .search-button__search-container {
width: 15%;
}

/* Handle actual styling of the RtD search extension's screen */
.search__outer {
background-color: var(--pst-color-on-background);
border: var(--pst-color-border);
border-radius: 0.25em;
}

.search__outer__input {
background-color: var(--pst-color-on-background);
color: var(--pst-color-text-base);
font-size: var(--pst-font-size-icon);
}

.rtd__search__credits {
background-color: var(--pst-color-background);
color: var(--pst-color-text-muted);
}

.rtd__search__credits a {
color: var(--pst-color-link);
}

.search__result__content, .search__result__subheading, .search__error__box {
color: var(--pst-color-text-base);
}

.search__result__subheading span {
border-bottom-color: var(--pst-color-text-base);
}

[data-theme="dark"] .search__outer .search__result__content span,
[data-theme="dark"] .search__outer .search__result__title span {
background-color: var(--pst-color-muted-highlight); /* Dark mode background color */
}

.search__outer .search__result__content span,
.search__outer .search__result__title span {
border-bottom-color: var(--pst-color-text-base);
}

/* Make sure "X" remains visible */
.search__cross__img {
fill: var(--pst-color-text-base);
}

/* Prevent hover from actually changing the color by setting it to what it
already is */
.outer_div_page_results:hover, .search__result__box .active {
background-color: var(--pst-color-on-background);
}

/* End of styling of the RtD search extension's screen */
Binary file added _static/img/favicon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading