Skip to content

Commit a188297

Browse files
committed
Refactor and reorganize documentation and CI workflows
Replaces and splits GitHub Actions workflows for Docker, PyPI, and documentation publishing; removes legacy workflows and scripts; adds MANIFEST.in to prune docs from package; updates Docker and installation documentation; introduces docs/LICENSE.md and docs/README.md; refactors API generation script; and reorganizes documentation structure for improved clarity and maintainability.
1 parent f285e1f commit a188297

21 files changed

+2405
-333
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build & Push Docker Image
1+
name: Docker
22

33
on:
44
release:
@@ -18,13 +18,11 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
include:
21-
# Base image: no extras
2221
- variant: base
2322
vbt_extras: ""
2423
tag_suffix: ""
2524
latest_tag: latest
2625

27-
# Full image: extras=full
2826
- variant: full
2927
vbt_extras: "full"
3028
tag_suffix: "-full"
@@ -34,8 +32,10 @@ jobs:
3432
- name: Checkout release tag
3533
uses: actions/checkout@v4
3634
with:
37-
ref: ${{ github.event.release.tag_name }}
38-
fetch-depth: 0
35+
ref: ${{ github.event.release.tag_name || github.ref }}
36+
fetch-depth: 1
37+
fetch-tags: true
38+
filter: blob:none
3939

4040
- name: Set up QEMU
4141
uses: docker/setup-qemu-action@v3

.github/workflows/docs.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Docs
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: docs-pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout release tag
23+
uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.event.release.tag_name || github.ref }}
26+
fetch-depth: 1
27+
fetch-tags: true
28+
filter: blob:none
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: "3.11"
34+
35+
- name: Install docs dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install -e ".[full,docs]"
39+
40+
- name: Generate API markdown
41+
run: |
42+
python docs/generate_api.py
43+
44+
- name: Update mkdocs navigation for API
45+
run: |
46+
python docs/update_api_nav.py
47+
48+
- name: Build MkDocs site
49+
run: |
50+
mkdocs build --strict
51+
52+
- name: Configure Pages
53+
uses: actions/configure-pages@v5
54+
55+
- name: Upload Pages artifact
56+
uses: actions/upload-pages-artifact@v3
57+
with:
58+
path: site
59+
60+
deploy:
61+
needs: build
62+
runs-on: ubuntu-latest
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
67+
steps:
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v4

.github/workflows/pypi.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: PyPi
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release-build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout release tag
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.release.tag_name || github.ref }}
20+
fetch-depth: 1
21+
fetch-tags: true
22+
filter: blob:none
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.11"
28+
29+
- name: Build release distributions
30+
run: |
31+
# NOTE: put your own distribution build steps here.
32+
python -m pip install build
33+
python -m build
34+
35+
- name: Upload distributions
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: release-dists
39+
path: dist/
40+
41+
pypi-publish:
42+
runs-on: ubuntu-latest
43+
needs:
44+
- release-build
45+
permissions:
46+
id-token: write
47+
48+
environment:
49+
name: pypi
50+
51+
steps:
52+
- name: Retrieve release distributions
53+
uses: actions/download-artifact@v4
54+
with:
55+
name: release-dists
56+
path: dist/
57+
58+
- name: Publish release distributions to PyPI
59+
uses: pypa/gh-action-pypi-publish@release/v1
60+
with:
61+
packages-dir: dist/

.github/workflows/python-publish.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/scorecard.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
prune docs

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ This is just the tip of the iceberg. Visit the [website](https://vectorbt.dev/)
223223
## :link: Links
224224

225225
* [Website](https://vectorbt.dev/)
226-
* [Colab Notebook](https://colab.research.google.com/drive/1ibqyrf6LPFlzRb6mkPpl3hxqL6ryNBXI?usp=sharing)
226+
* [Docker images](https://hub.docker.com/r/polakowo/vectorbt)
227+
* [Colab notebook](https://colab.research.google.com/drive/1ibqyrf6LPFlzRb6mkPpl3hxqL6ryNBXI?usp=sharing)
227228

228229
## :balance_scale: License
229230

0 commit comments

Comments
 (0)