-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from a5chin/feature/docs
Create docs
- Loading branch information
Showing
33 changed files
with
1,321 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Configure Git Credentials | ||
description: | | ||
This GitHub Action sets the Git user name and user email. | ||
inputs: | ||
name: | ||
description: Git user name | ||
required: true | ||
email: | ||
description: Git user email | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Sets the Git user name and user email | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Deploy Docs | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Configure Git Credentials | ||
uses: ./.github/actions/setup-git-config | ||
with: | ||
name: github-actions[bot] | ||
email: 41898282+github-actions[bot]@users.noreply.github.com | ||
|
||
- name: Setup Python 3.13 with uv | ||
uses: ./.github/actions/setup-python-with-uv | ||
with: | ||
python-version: 3.13 | ||
|
||
- name: Generate cache id | ||
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
|
||
- name: Save cache | ||
uses: actions/cache@v4 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: mkdocs-material- | ||
|
||
- run: uv run mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# About | ||
- [LICENSE](license.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
``` | ||
MIT License | ||
Copyright (c) 2024 a5chin | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Configurations | ||
|
||
!!! TIPS | ||
Looking for a getting started guide? Check out the [Gettting Started](../getting-started/index.md) guide first. | ||
|
||
Configurations for using Python with uv on Dev Container. | ||
Learn more about using this repository: | ||
|
||
- [Understanding uv Configure](uv.md) | ||
- [Understanding Ruff Configure](ruff.md) | ||
- [Understanding pre-commit Configure](pre-commit.md) | ||
- [Understanding Pyright Configure](pyright.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
!!! TIP | ||
If you do not want to use the pre-commit hook, run this command: | ||
```sh | ||
pre-commit uninstall | ||
``` | ||
|
||
## Hook List | ||
- [https://github.com/astral-sh/ruff-pre-commit](https://github.com/astral-sh/ruff-pre-commit) | ||
- Ruff Lint | ||
- Ruff Format | ||
- [https://github.com/hadolint/hadolint](https://github.com/hadolint/hadolint) | ||
- Hadolint | ||
|
||
## Overview | ||
```{.yaml hl_lines=42-57 title=".pre-commit-config.yaml"} | ||
default_stages: [pre-commit] | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.8.3 | ||
hooks: | ||
- id: ruff | ||
name: Ruff check | ||
description: "Run 'ruff check' for extremely fast Python linting" | ||
args: [--fix] | ||
- id: ruff-format | ||
name: Ruff format | ||
description: "Run 'ruff format' for extremely fast Python formatting" | ||
- repo: https://github.com/hadolint/hadolint | ||
rev: v2.12.0 | ||
hooks: | ||
- id: hadolint | ||
name: Lint Dockerfiles | ||
description: Runs hadolint to lint Dockerfiles | ||
language: system | ||
types: ["dockerfile"] | ||
entry: hadolint | ||
ci: | ||
autoupdate_schedule: weekly | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
!!! TIP | ||
Official documentation for Pyright is available at [https://microsoft.github.io/pyright](https://microsoft.github.io/pyright) | ||
|
||
!!! DANGER | ||
If you want to create new directories in the root directory, you must add them to the `include` list in the `pyrightconfig.json` file. | ||
|
||
```{.json title="pyrightconfig.json"} | ||
{ | ||
"pythonVersion": "3.12", | ||
"pythonPlatform": "All", | ||
"venv": ".venv", | ||
"typeCheckingMode": "standard", | ||
"include": [ | ||
"tools" | ||
], | ||
"exclude": [ | ||
"**/__pycache__", | ||
".pytest_cache", | ||
".ruff_cache", | ||
".venv" | ||
], | ||
} | ||
``` |
Oops, something went wrong.