Skip to content

Commit

Permalink
Merge pull request #119 from RTIInternational/112-add-documentation
Browse files Browse the repository at this point in the history
112 add documentation
  • Loading branch information
samlamont authored Feb 16, 2024
2 parents 41a3f53 + d6a9e47 commit 3d96e9a
Show file tree
Hide file tree
Showing 133 changed files with 5,396 additions and 1,745 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/documentation-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: documentation

on:
push:
tags: [ 'v*.*.*' ]
# branches: [112-add-documentation]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx pydata-sphinx-theme myst-nb sphinx-design sphinx-autoapi numpydoc ghp-import -e .
- name: Sphinx build
run: |
cd docs/sphinx
make clean html
- name: Run ghp-import
run: |
ghp-import -n -p -f docs/sphinx/_build/html
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ instance/
.scrapy

# Sphinx documentation
docs/_build/
docs/sphinx/_build/
docs/sphinx/_autosummary/
docs/sphinx/_static/*.html
docs/sphinx/generated/
docs/sphinx/savefig/
docs/sphinx/getting_started/test_data/temp_test.db

# PyBuilder
target/
Expand Down
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-added-large-files
args: ['--maxkb=13000', '--enforce-all']
- repo: https://github.com/numpy/numpydoc
rev: v1.6.0
hooks:
- id: numpydoc-validation
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"PYTHONPATH": "${workspaceFolder}/src"
},
"files.trimTrailingWhitespace": true,
}
}
70 changes: 0 additions & 70 deletions CONTRIBUTE.md

This file was deleted.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ assess their skill and performance.

NOTE: THIS PROJECT IS UNDER DEVELOPMENT - EXPECT TO FIND BROKEN AND INCOMPLETE CODE.

## Documentation
[TEEHR Documentation](https://rtiinternational.github.io/teehr/)

## How to Install TEEHR
Install poetry
```bash
$ pipx install poetry
```

Install from source
```bash
# Create and activate python environment, requires python >= 3.10
Expand All @@ -38,8 +42,8 @@ $ poetry add git+https://github.com/RTIInternational/teehr.git#[BRANCH TAG]

Use Docker
```bash
$ docker build -t teehr:v0.3.8 .
$ docker run -it --rm --volume $HOME:$HOME -p 8888:8888 teehr:v0.3.8 jupyter lab --ip 0.0.0.0 $HOME
$ docker build -t teehr:v0.3.9 .
$ docker run -it --rm --volume $HOME:$HOME -p 8888:8888 teehr:v0.3.9 jupyter lab --ip 0.0.0.0 $HOME
```

## Examples
Expand Down
22 changes: 0 additions & 22 deletions docs/release_process.md

This file was deleted.

20 changes: 20 additions & 0 deletions docs/sphinx/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)
70 changes: 70 additions & 0 deletions docs/sphinx/_static/css/teehr.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/* Override some aspects of the pydata-sphinx-theme */

:root {
/* Use softer blue from bootstrap's default info color */
--pst-color-info: 23, 162, 184;
}

table {
width: auto; /* Override fit-content which breaks Styler user guide ipynb */
}

/* Main index page overview cards */

.intro-card {
padding: 30px 10px 20px 10px;
}

.intro-card .sd-card-img-top {
margin: 10px;
height: 52px;
background: none !important;
}

.intro-card .sd-card-title {
color: var(--pst-color-primary);
font-size: var(--pst-font-size-h5);
padding: 1rem 0rem 0.5rem 0rem;
}

.intro-card .sd-card-footer {
border: none !important;
}

.intro-card .sd-card-footer p.sd-card-text {
max-width: 220px;
margin-left: auto;
margin-right: auto;
}

.intro-card .sd-btn-secondary {
background-color: #6c757d !important;
border-color: #6c757d !important;
}

.intro-card .sd-btn-secondary:hover {
background-color: #5a6268 !important;
border-color: #545b62 !important;
}

.card, .card img {
background-color: var(--pst-color-background);
}

.ciroh-card {
margin: 10px;
height: 140px;
background: none !important;
}

html[data-theme="dark"] {
h1 {
color: rgb(138, 189, 216);
}
h2 {
color: rgb(138, 189, 216);
}
h3 {
color: rgb(138, 189, 216);
}
}
Binary file added docs/sphinx/_static/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
97 changes: 97 additions & 0 deletions docs/sphinx/_static/index_api.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3d96e9a

Please sign in to comment.