Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docusaurus website #65

Merged
merged 28 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0b44f0d
docusaurus website added
aaditgupta21 Jul 28, 2021
82fba18
try to fix linting
aaditgupta21 Jul 31, 2021
f0df0a5
remove svgs
aaditgupta21 Jul 31, 2021
3799b6c
pre-commit
aaditgupta21 Aug 1, 2021
832742b
fix crlf files
aaditgupta21 Aug 1, 2021
0634ecc
fix pre-commit
aaditgupta21 Aug 2, 2021
e0dc3a1
Merge branch 'main' into main
aaditgupta21 Aug 4, 2021
88ea88b
fix logo and homepage content
aaditgupta21 Aug 9, 2021
0c8ab42
Merge branch 'Rose-STL-Lab:main' into main
aaditgupta21 Aug 9, 2021
24ff54a
change docs workflow
aaditgupta21 Aug 9, 2021
2303e25
fix: pre-commit error
aaditgupta21 Aug 9, 2021
a983cd4
fix: pre-commit error 2
aaditgupta21 Aug 10, 2021
57324dd
add docs markdown files
aaditgupta21 Aug 11, 2021
7419d0f
Merge branch 'Rose-STL-Lab:main' into main
aaditgupta21 Aug 11, 2021
226f1fe
Fix README
klane Aug 12, 2021
fc48656
Run documentation workflow on pull requests
klane Aug 12, 2021
cfa2792
Fix event name check
klane Aug 12, 2021
c8bb8ab
Fix line endings and end of files
klane Aug 12, 2021
34d8879
Revert "Fix event name check"
klane Aug 12, 2021
25f37f4
Fix event name check
klane Aug 12, 2021
ef628bb
Only generate torchTS-bot tokens on pushes
klane Aug 12, 2021
cc054c7
Do not fail builds due to Semgrep findings
klane Aug 12, 2021
10a099a
Specify Semgrep audits on pushes and pull requests
klane Aug 12, 2021
92d4cf2
remove blog
aaditgupta21 Aug 13, 2021
a776e33
tagline pic
aaditgupta21 Aug 13, 2021
1b35ab3
Merge branch 'main' into main
klane Aug 13, 2021
3b2b3e1
Delete example Markdown page
klane Aug 13, 2021
d85fe94
Fix linting issue
klane Aug 13, 2021
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
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/[email protected]

- 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/[email protected]
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/[email protected]
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