Skip to content

Commit

Permalink
refactor to sphinx& and plotly
Browse files Browse the repository at this point in the history
  • Loading branch information
luweizheng committed Jan 11, 2024
1 parent b012d2a commit 85d09b2
Show file tree
Hide file tree
Showing 252 changed files with 204 additions and 64,994 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python envs
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-web.txt
- name: Build website
run: sphinx-build -b html ./ ./_build/html
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: unnecessary
- name: Adding Known Hosts
run: ssh-keyscan -p ${{ secrets.REMOTE_PORT }} -H ${{ secrets.REMOTE_HOST }} >> ~/.ssh/known_hosts

- name: Deploy with rsync
run: rsync -avz _build/html/* ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/var/www/python-data-science/
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ _build/*
test*.md
run.sh
.idea
env

.github/workflows/deploy.yml
env
41 changes: 0 additions & 41 deletions _config.yml

This file was deleted.

65 changes: 29 additions & 36 deletions _toc.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,30 @@
# Table of contents
# Learn more at https://jupyterbook.org/customize/toc.html

format: jb-book
root: index
parts:
- caption: 数据处理与计算
numbered: true
chapters:
- file: ch-numpy/index
sections:
- file: ch-numpy/numpy-intro
- file: ch-numpy/ndarray
- file: ch-numpy/ndarray-slicing-index
- file: ch-numpy/random

- file: ch-pandas/index
sections:
- file: ch-pandas/pandas-intro
- file: ch-pandas/series-dataframe
- file: ch-pandas/dataframe-slicing
- file: ch-pandas/data-preprocessing
- file: ch-pandas/dataframe-groupby
- file: ch-pandas/dataframe-merge-concat
- file: ch-pandas/dataframe-pivot-melt

- caption: 数据可视化
numbered: true
chapters:
- file: ch-matplotlib/index
sections:
- file: ch-matplotlib/matplotlib-intro
- file: ch-matplotlib/matplotlib-figure-axes
- file: ch-matplotlib/matplotlib-data
- file: ch-matplotlib/matplotlib-other-parameters
- file: ch-matplotlib/matplotlib-coding-styles
- file: ch-matplotlib/matplotlib-plot-types
subtrees:
- numbered: 2
entries:
- file: ch-numpy/index
entries:
- file: ch-numpy/numpy-intro
- file: ch-numpy/ndarray
- file: ch-numpy/ndarray-slicing-index
- file: ch-numpy/random
- file: ch-pandas/index
entries:
- file: ch-pandas/pandas-intro
- file: ch-pandas/series-dataframe
- file: ch-pandas/dataframe-slicing
- file: ch-pandas/data-preprocessing
- file: ch-pandas/dataframe-groupby
- file: ch-pandas/dataframe-merge-concat
- file: ch-pandas/dataframe-pivot-melt
- file: ch-matplotlib/index
entries:
- file: ch-matplotlib/intro
- file: ch-matplotlib/figure-axes
- file: ch-matplotlib/data
- file: ch-matplotlib/other-parameters
- file: ch-matplotlib/coding-styles
- file: ch-matplotlib/plot-types
- file: ch-plotly/index
entries:
- file: ch-plotly/intro
8 changes: 1 addition & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@

set -e

jupyter-book build ./

rm -rf docs
mkdir docs
touch docs/.nojekyll
cp -r datasets ./docs/
rsync -a _build/html/* ./docs/
sphinx-build -b html ./ ./_build/html
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"(matplotlib-figure-axes)=\n",
"# `Figure` 和 `Axes`"
]
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions ch-plotly/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Plotly

本节主要讲解如何使用 Plotly 进行数据可视化。

```{tableofcontents}
```
Loading

0 comments on commit 85d09b2

Please sign in to comment.