Skip to content

Commit

Permalink
Add Docusaurus website (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaditgupta21 authored Aug 13, 2021
1 parent 5b11451 commit 3766daa
Show file tree
Hide file tree
Showing 36 changed files with 21,990 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ on:
- 'docs/**'
- 'torchts/**'
- 'poetry.lock'
- 'website/**'
pull_request:
branches:
- main
paths:
- 'docs/**'
- 'torchts/**'
- 'poetry.lock'
- 'website/**'

jobs:
build:
Expand All @@ -21,6 +30,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2.2.2

- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: "14"

- name: Get Python version
id: python-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
Expand All @@ -45,22 +59,29 @@ jobs:
- name: Build documentation
run: poetry run make -C docs html

- name: Build Docusaurus website
run: |
cd website
npm install
npm run build
- name: Generate token
if: success() && github.event_name == 'push'
id: generate-token
uses: tibdex/github-app-token@v1.3.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Deploy documentation
if: success()
if: success() && github.event_name == 'push'
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
token: ${{ steps.generate-token.outputs.token }}
git-config-name: torchts-bot[bot]
git-config-email: 88511308+torchts-bot[bot]@users.noreply.github.com
branch: gh-pages
folder: docs/build/html
folder: website/build
clean: true
clean-exclude: |
README.md
20 changes: 20 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
33 changes: 33 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

## Installation

```console
yarn install
```

## Local Development

```console
yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

## Build

```console
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

```console
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions website/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
}
4 changes: 4 additions & 0 deletions website/docs/classic-time-series-models/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Classic Time Series Models",
"position": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Autoregressive Model (AR)
slug: /autoregressive
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Vector Autoregressive Model (VAR)
slug: /vector
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Seq2Seq with GRU
slug: /seq2seq-GRU
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Seq2Seq with LSTM
slug: /seq2seq-lstm
---
4 changes: 4 additions & 0 deletions website/docs/deep-sequence-to-sequence-models/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Deep Sequence to Sequence Models",
"position": 3
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Convolutional LSTM
slug: /convolutional-lstm
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Diffusion Convolutional LSTM
slug: /diffusion-convolutional-lstm
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Deep Spatiotemporal Sequence Models",
"position": 4
}
7 changes: 7 additions & 0 deletions website/docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
title: Introduction
slug: /
---

# Introduction
4 changes: 4 additions & 0 deletions website/docs/physics-guided-deep-sequence-models/AutoODE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: AutoODE
slug: /autoode
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Hybrid AutoODE
slug: /hybrid-autoode
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Physics-Guided Deep Sequence Models",
"position": 5
}
134 changes: 134 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");

/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: "TorchTS",
tagline: "Time series forecasting with PyTorch",
url: "https://rose-stl-lab.github.io",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/logo2.png",
scripts: [
"https://buttons.github.io/buttons.js",
"https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",
],
stylesheets: [
"https://fonts.googleapis.com/css?family=IBM+Plex+Mono:500,700|Source+Code+Pro:500,700|Source+Sans+Pro:400,400i,700",
],

organizationName: "Rose-STL-Lab", // Usually your GitHub org/user name.
projectName: "torchTS", // Usually your repo name.
themeConfig: {
// colorMode: {
// defaultMode: "light",
// disableSwitch: true,
// },
navbar: {
title: "TorchTS",
logo: {
alt: "My Site Logo",
src: "img/logo2.png",
},
items: [
{
type: "doc",
docId: "intro",
position: "left",
label: "Docs",
},
{
href: "https://github.com/Rose-STL-Lab/torchts",
label: "GitHub",
position: "right",
},
],
},
footer: {
links: [
{
title: "Docs",
items: [
{
label: "Getting Started",
to: "docs",
},
// {
// label: 'Tutorials',
// to: '/tutorials',
// },
// {
// label: 'API',
// to: '/api',
// },
],
},
{
title: "Community",
items: [
{
label: "Slack",
href: "https://github.com/Rose-Stl-Lab/torchTS",
},
{
label: "Discord",
href: "https://github.com/Rose-Stl-Lab/torchTS",
},
],
},
{
title: "More",
items: [
{
html: `
<a target="_blank" rel="noreferrer noopener" class="github-button"
href="https://github.com/Rose-stl-lab/torchts"
data-icon="octicon-star"
data-count-href="/Rose-stl-lab/torchts/stargazers"
data-show-count="true"
data-count-aria-label="# stargazers on GitHub"
aria-label="Star this project on GitHub">Star</a>
`,
},
{
label: "GitHub",
href: "https://github.com/Rose-stl-lab/torchts",
},
{
label: "Edit Docs on GitHub",
href: "https://github.com/Rose-stl-lab/torchts/",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} TorchTS Team`,
logo: {
src: "img/octopus-128x128.png",
},
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
fonts: {
fontMain: ["Source Sans Pro", "sans-serif"],
fontCode: ["IBM Plex Mono", "monospace"],
},
},
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: "https://github.com/Rose-STL-Lab/torchTS/edit/main/website/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
};
Loading

0 comments on commit 3766daa

Please sign in to comment.