Skip to content

Commit

Permalink
📝 Docs: Build Sphinx (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zerohertz committed Jun 21, 2024
1 parent f4baa00 commit d44c4bc
Show file tree
Hide file tree
Showing 87 changed files with 513 additions and 306 deletions.
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 2e0636f7fc3e8adaa89570459f349074
config: 480ec18c991952c5848edd35dd1b33c1
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/_images/monitoring.storage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/plot.candle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/plot.hist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/plot.pie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/plot.plot.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/plot.plot.2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/plot.scatter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/quant.bollinger_bands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/quant.macd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/quant.momentum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/quant.moving_average.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/quant.rsi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/vision.grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/vision.mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_images/vision.poly2mask.png
Binary file not shown.
Binary file modified docs/_images/vision.vert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
154 changes: 110 additions & 44 deletions docs/_sources/cicd.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,10 @@
```{admonition} Used Stacks
:class: important

1. Jenkins (Black, flake8, Pylint, Setuptools, PyTest, Sphinx)
2. GitHub Actions
GitHub Actions (Black, flake8, Pylint, Setuptools, PyTest, Sphinx)
```

## Jenkins

<p align="center">
<img width="1844" alt="CI/CD" src="_static/cicd/cicd.png">
</p>

|Stage|Condition|
|:-:|-|
|1. `Setup`|⭕ [`*` Push]|
|2. `Merge From Docs`|⭕ [`*` Push] "Merge pull request\*/docs"</br>⭕ [`*` Push] "Merge pull request*[Docs] Build by Sphinx for GitHub Pages"|
|3. `1. Lint`|⭕ [`dev*` Push]<br>⭕ [`master` PR] (Except "Merge pull request\*/docs" && "Merge pull request\*[Docs] Build by Sphinx for GitHub Pages")|
|4. `2. Build`|⭕ [`master` Push] (Except "Merge pull request\*/chore\*")</br>⭕ [`dev*` Push]<br>⭕ [`master` PR] (Except "Merge pull request\*/docs" && "Merge pull request\*[Docs] Build by Sphinx for GitHub Pages")|
|5. `3. Test`|⭕ [`dev*` Push]<br>⭕ [`master` PR] (Except "Merge pull request\*/docs" && "Merge pull request\*[Docs] Build by Sphinx for GitHub Pages")|
|6. `4. Docs`|⭕ [`master` PR] (Except "Merge pull request\*/docs" && "Merge pull request\*[Docs] Build by Sphinx for GitHub Pages")|
|7. `Deploy`|⭕ [`master` Push] "Merge pull request\*from Zerohertz/dev\*" (Except "\*from Zerohertz/chore\*")|
## Branch Rules

### Dev Branch

Expand All @@ -32,25 +17,24 @@ The `dev` branch is used when there are functional changes resulting in differen
```

<p align="center">
<img width="872" alt="dev-branch" src="_static/cicd/dev-branch.png">
<img width="872" alt="dev-branch" src="_static/cicd/github-actions-dev-branch.png">
</p>

1. `dev-*` push
1. `Setup`: Commit message parsing
2. `1. Lint`: Check format of python codes
3. `2. Build`: Install dependencies & build package
4. `3. Test`: Do PyTest
1. `check-pr`: Check if a PR is open for the `dev-*` branch
2. `build`: Install dependencies & build package
3. `lint`: Check format of python codes
4. `test`: Do PyTest
2. `dev-*` → `master`
1. `Setup`: Commit message parsing
2. `1. Lint`: Check format of python codes
3. `2. Build`: Install dependencies & build package
4. `3. Test`: Do PyTest
5. `4. Docs`: Create PR (`docs` → `dev-*`) including the build results generated by Sphinx
6. `Merge From Docs`: If merge PR from `docs`, can merge `dev-*` → `master`
1. `check-commit`: Commit message parsing
2. `build`: Install dependencies & build package
3. `lint`: Check format of python codes
4. `test`: Do PyTest
5. `docs`: Create PR (`docs` → `dev-*`) including the build results generated by Sphinx
6. `merge-from-docs`: If merge PR from `docs`, can merge `dev-*` → `master`
3. `master` push
1. `Setup`: Commit message parsing
2. `2. Build`: Install dependencies & build package
3. `Deploy`
1. `build`: Install dependencies & build package
2. `deploy`
1. `GitHub`: Deploy to GitHub
2. `PyPI`: Deploy to PyPI

Expand All @@ -63,24 +47,20 @@ The `chore` branch is utilized when the build result is not different, but there
```

<p align="center">
<img width="872" alt="chore-branch" src="_static/cicd/chore-branch.png">
<img width="872" alt="chore-branch" src="_static/cicd/github-actions-chore-branch.png">
</p>

1. `chore-*` push
1. `Setup`: Commit message parsing
2. `chore-*` → `master`
1. `Setup`: Commit message parsing
2. `1. Lint`: Check format of python codes
3. `2. Build`: Install dependencies & build package
4. `3. Test`: Do PyTest
5. `4. Docs`: Create PR (`docs` → `chore-*`) including the build results generated by Sphinx
6. `Merge From Docs`: If merge PR from `docs`, can merge `chore-*` → `master`
1. `check-commit`: Commit message parsing
2. `build`: Install dependencies & build package
3. `lint`: Check format of python codes
4. `test`: Do PyTest
5. `docs`: Create PR (`docs` → `dev-*`) including the build results generated by Sphinx
6. `merge-from-docs`: If merge PR from `docs`, can merge `dev-*` → `master`
3. `master` push
1. `Setup`: Commit message parsing

## GitHub Actions

### Managing Labels for Issues and Pull Requests in GitHub
## Managing Labels for Issues and Pull Requests in GitHub

+ [Issue](https://github.com/Zerohertz/zerohertzLib/blob/master/.github/workflows/issue-controller.yaml)
+ `assignees: ['Zerohertz']`
Expand All @@ -104,7 +84,7 @@ The `chore` branch is utilized when the build result is not different, but there
+ `baseBranch.startsWith('dev') || baseBranch.startsWith('chore')) && headBranch === 'docs'`
+ `labelsToAdd.push('docs')`

### Sphinx Documentation Deployment
## Sphinx Documentation Deployment

```{admonition} Sphinx Documentation
:class: note
Expand All @@ -115,3 +95,89 @@ Documents created and built using Sphinx are deployed via GitHub Actions and Git
<p align="center">
<img width="872" alt="pages-build-and-deployment" src="_static/cicd/pages-build-and-deployment.png">
</p>

---

<details>
<summary>
Jenkins (Deprecated)
</summary>

```{admonition} Used Stacks
:class: important

Jenkins (Black, flake8, Pylint, Setuptools, PyTest, Sphinx)
```

<p align="center">
<img width="1844" alt="CI/CD" src="_static/cicd/jenkins-cicd.png">
</p>

<h2>Jenkins</h2>

|Stage|Condition|
|:-:|-|
|1. `Setup`|⭕ [`*` Push]|
|2. `Merge From Docs`|⭕ [`*` Push] "Merge pull request\*/docs"</br>⭕ [`*` Push] "Merge pull request*[Docs] Build by Sphinx for GitHub Pages"|
|3. `1. Lint`|⭕ [`dev*` Push]<br>⭕ [`master` PR] (Except "Merge pull request\*/docs" && "Merge pull request\*[Docs] Build by Sphinx for GitHub Pages")|
|4. `2. Build`|⭕ [`master` Push] (Except "Merge pull request\*/chore\*")</br>⭕ [`dev*` Push]<br>⭕ [`master` PR] (Except "Merge pull request\*/docs" && "Merge pull request\*[Docs] Build by Sphinx for GitHub Pages")|
|5. `3. Test`|⭕ [`dev*` Push]<br>⭕ [`master` PR] (Except "Merge pull request\*/docs" && "Merge pull request\*[Docs] Build by Sphinx for GitHub Pages")|
|6. `4. Docs`|⭕ [`master` PR] (Except "Merge pull request\*/docs" && "Merge pull request\*[Docs] Build by Sphinx for GitHub Pages")|
|7. `Deploy`|⭕ [`master` Push] "Merge pull request\*from Zerohertz/dev\*" (Except "\*from Zerohertz/chore\*")|

<h3>Dev Branch</h3>

```{admonition} Branch Rule
:class: note

The `dev` branch is used when there are functional changes resulting in different build outcomes.
```

<p align="center">
<img width="872" alt="dev-branch" src="_static/cicd/jenkins-dev-branch.png">
</p>

1. `dev-*` push
1. `Setup`: Commit message parsing
2. `1. Lint`: Check format of python codes
3. `2. Build`: Install dependencies & build package
4. `3. Test`: Do PyTest
2. `dev-*` → `master`
1. `Setup`: Commit message parsing
2. `1. Lint`: Check format of python codes
3. `2. Build`: Install dependencies & build package
4. `3. Test`: Do PyTest
5. `4. Docs`: Create PR (`docs` → `dev-*`) including the build results generated by Sphinx
6. `Merge From Docs`: If merge PR from `docs`, can merge `dev-*` → `master`
3. `master` push
1. `Setup`: Commit message parsing
2. `2. Build`: Install dependencies & build package
3. `Deploy`
1. `GitHub`: Deploy to GitHub
2. `PyPI`: Deploy to PyPI

<h3>Chore Branch</h3>

```{admonition} Branch Rule
:class: note

The `chore` branch is utilized when the build result is not different, but there are changes in the CI/CD pipeline or documentation.
```

<p align="center">
<img width="872" alt="chore-branch" src="_static/cicd/jenkins-chore-branch.png">
</p>

1. `chore-*` push
1. `Setup`: Commit message parsing
2. `chore-*` → `master`
1. `Setup`: Commit message parsing
2. `1. Lint`: Check format of python codes
3. `2. Build`: Install dependencies & build package
4. `3. Test`: Do PyTest
5. `4. Docs`: Create PR (`docs` → `chore-*`) including the build results generated by Sphinx
6. `Merge From Docs`: If merge PR from `docs`, can merge `chore-*` → `master`
3. `master` push
1. `Setup`: Commit message parsing

</details>
8 changes: 1 addition & 7 deletions docs/_sources/index.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@
<a href="https://github.com/Zerohertz/zerohertzLib">
<img src="https://img.shields.io/badge/GitHub-181717?style=for-the-badge&logo=GitHub&logoColor=white"/>
</a>
<a href="https://jenkins.zerohertz.xyz/blue/organizations/jenkins/zerohertzLib/activity">
<img src="https://img.shields.io/badge/Jenkins-D24939?style=for-the-badge&logo=Jenkins&logoColor=white"/>
</a>
<a href = "https://zerohertz.github.io/python-pkg-cicd/">
<img src="https://img.shields.io/badge/Zerohertz's%20Blog-800a0a?style=for-the-badge&logo=beatsbydre&logoColor=white"/>
</a>
<a href="https://zerohertz.github.io/zerohertzLib/">
<img src="https://img.shields.io/badge/Sphinx-000000?style=for-the-badge&logo=Sphinx&logoColor=white"/>
<img src="https://img.shields.io/badge/Sphinx-Docs-000000?style=for-the-badge&logo=Sphinx&logoColor=white"/>
</a>
</br>
<a href="https://github.com/Zerohertz/zerohertzLib/blob/master/LICENSE">
Expand Down
26 changes: 26 additions & 0 deletions docs/_sources/release/v1.1.md.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# v1.1

## v1.1.4

<h3>[v1.1.4] Release (<a href=https://github.com/Zerohertz/zerohertzLib/pull/309>#309</a>)</h3>

```{admonition} Release Date
:class: tip

2024/06/21
```

<p align="center">
<a href="https://github.com/Zerohertz/zerohertzLib/pulls?q=is:pr label:feat/vision"><img src="https://img.shields.io/badge/feat/vision-D1F9CB?style=flat-square&logo=github" alt="feat/vision"/></a>
<a href="https://github.com/Zerohertz/zerohertzLib/pulls?q=is:pr label:chore"><img src="https://img.shields.io/badge/chore-fef2c0?style=flat-square&logo=github" alt="chore"/></a>
<a href="https://github.com/Zerohertz/zerohertzLib/pulls?q=is:pr label:docs"><img src="https://img.shields.io/badge/docs-E1B40A?style=flat-square&logo=github" alt="docs"/></a>
<a href="https://github.com/Zerohertz/zerohertzLib/pulls?q=is:pr label:release"><img src="https://img.shields.io/badge/release-00FF00?style=flat-square&logo=github" alt="release"/></a>
</p>


<h4>Features</h4>

+ `vision`
+ `mask` 함수의 입력에 여러 다각형 허용

<h4>Chore</h4>

+ CI/CD pipeline을 Jenkins에서 GitHub Actions로 migration
## v1.1.3

<h3>[v1.1.3] Release (<a href=https://github.com/Zerohertz/zerohertzLib/pull/307>#307</a>)</h3>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/cicd/github-actions-dev-branch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: 'v1.1.3',
VERSION: 'v1.1.4',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
Binary file modified docs/_static/examples/dynamic/monitoring.storage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/examples/dynamic/plot.candle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/examples/dynamic/plot.hist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/examples/dynamic/plot.pie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/examples/dynamic/plot.plot.1.png
Binary file modified docs/_static/examples/dynamic/plot.plot.2.png
Binary file modified docs/_static/examples/dynamic/plot.scatter.png
Binary file modified docs/_static/examples/dynamic/quant.bollinger_bands.png
Binary file modified docs/_static/examples/dynamic/quant.macd.png
Binary file modified docs/_static/examples/dynamic/quant.momentum.png
Binary file modified docs/_static/examples/dynamic/quant.moving_average.png
Binary file modified docs/_static/examples/dynamic/quant.rsi.png
Binary file modified docs/_static/examples/dynamic/vision.grid.png
Binary file modified docs/_static/examples/dynamic/vision.mask.png
Binary file removed docs/_static/examples/dynamic/vision.poly2mask.png
Diff not rendered.
Binary file modified docs/_static/examples/dynamic/vision.vert.png
Loading

0 comments on commit d44c4bc

Please sign in to comment.