-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from pybamm-team/docs
Docs and testing
- Loading branch information
Showing
13 changed files
with
587 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ exclude= | |
./myokit/formats/python/template, | ||
./build, | ||
./venv, | ||
./venv2, | ||
./venv2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: PyBaMM-TEA tests | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install coverage flake8 | ||
pip install . | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 . --count --exit-zero --show-source --statistics | ||
- name: Test with unittest | ||
run: | | ||
coverage run -m unittest | ||
- name: Upload Coverage to Codecov | ||
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 | ||
uses: codecov/codecov-action@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = -j auto | ||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap"); | ||
|
||
.navbar-brand img { | ||
height: 50px; | ||
} | ||
|
||
.navbar-brand { | ||
height: 50px; | ||
} | ||
|
||
body { | ||
font-family: "Open Sans", sans-serif; | ||
} | ||
|
||
pre, | ||
code { | ||
font-size: 100%; | ||
line-height: 155%; | ||
} | ||
|
||
h1 { | ||
font-family: "Lato", sans-serif; | ||
color: #013243; | ||
/* warm black */ | ||
} | ||
|
||
h2 { | ||
color: #4d77cf; | ||
/* han blue */ | ||
letter-spacing: -0.03em; | ||
} | ||
|
||
h3 { | ||
color: #013243; | ||
/* warm black */ | ||
letter-spacing: -0.03em; | ||
} | ||
|
||
/* Style the active version button. | ||
- latest: orange | ||
- stable: green | ||
- old, PR: red | ||
Colors from: | ||
Wong, B. Points of view: Color blindness. | ||
Nat Methods 8, 441 (2011). https://doi.org/10.1038/nmeth.1618 | ||
*/ | ||
|
||
/* If the active version has the name "latest", style it orange */ | ||
.version-switcher__button[data-active-version-name*="latest"] { | ||
background-color: #e69f00; | ||
border-color: #e69f00; | ||
color: #000000; | ||
} | ||
|
||
/* green for `stable` */ | ||
.version-switcher__button[data-active-version-name*="stable"] { | ||
background-color: #009e73; | ||
border-color: #009e73; | ||
} | ||
|
||
/* red for `old` */ | ||
.version-switcher__button:not([data-active-version-name*="latest"], | ||
[data-active-version-name*="stable"]) { | ||
background-color: #980f0f; | ||
border-color: #980f0f; | ||
} | ||
|
||
/* Main page overview cards */ | ||
|
||
.sd-card { | ||
background: #fff; | ||
border-radius: 0; | ||
padding: 30px 10px 20px 10px; | ||
margin: 10px 0px; | ||
} | ||
|
||
.sd-card .sd-card-header { | ||
text-align: center; | ||
} | ||
|
||
.sd-card .sd-card-header .sd-card-text { | ||
margin: 0px; | ||
} | ||
|
||
.sd-card .sd-card-img-top { | ||
height: 52px; | ||
width: 52px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
.sd-card .sd-card-header { | ||
border: none; | ||
background-color: white; | ||
color: #150458 !important; | ||
font-size: var(--pst-font-size-h5); | ||
font-weight: bold; | ||
padding: 2.5rem 0rem 0.5rem 0rem; | ||
} | ||
|
||
.sd-card .sd-card-footer { | ||
border: none; | ||
background-color: white; | ||
} | ||
|
||
.sd-card .sd-card-footer .sd-card-text { | ||
max-width: 220px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
/* Dark theme tweaking */ | ||
html[data-theme="dark"] .sd-card img[src*=".svg"] { | ||
filter: invert(0.82) brightness(0.8) contrast(1.2); | ||
} | ||
|
||
/* Main index page overview cards */ | ||
html[data-theme="dark"] .sd-card { | ||
background-color: var(--pst-color-background); | ||
} | ||
|
||
html[data-theme="dark"] .sd-shadow-sm { | ||
box-shadow: 0 0.1rem 1rem rgba(250, 250, 250, 0.6) !important; | ||
} | ||
|
||
html[data-theme="dark"] .sd-card .sd-card-header { | ||
background-color: var(--pst-color-background); | ||
color: #150458 !important; | ||
} | ||
|
||
html[data-theme="dark"] .sd-card .sd-card-footer { | ||
background-color: var(--pst-color-background); | ||
} | ||
|
||
html[data-theme="dark"] h1 { | ||
color: var(--pst-color-primary); | ||
} | ||
|
||
html[data-theme="dark"] h3 { | ||
color: #0a6774; | ||
} |
File renamed without changes
Oops, something went wrong.