This repository has been archived by the owner on Jan 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: note more way to use (with uv, just)
Adjust minor website appearance
- Loading branch information
1 parent
877d934
commit c789ae4
Showing
8 changed files
with
142 additions
and
89 deletions.
There are no files selected for viewing
File renamed without changes.
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 @@ | ||
# From source | ||
|
||
Có thể sử dụng: | ||
|
||
- pip (Chỉ cần cài python) | ||
- uv (Cài uv) | ||
- uv và just (Cài uv và just) | ||
|
||
## Clone repo | ||
|
||
```sh | ||
git clone https://github.com/NTGNguyen/check-phat-nguoi.git | ||
``` |
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,61 @@ | ||
# Pip | ||
|
||
## Yêu cầu | ||
|
||
- [Python](https://www.python.org/downloads/) (>=3.13) | ||
|
||
--- | ||
|
||
## Cài đặt dependencies | ||
|
||
### Thiết lập môi trường ảo | ||
|
||
#### Tạo môi trường ảo | ||
|
||
```sh | ||
python -m venv .venv | ||
``` | ||
|
||
#### Kích hoạt môi trường ảo | ||
|
||
=== "Windows" | ||
|
||
```powershell | ||
.venv\Scripts\activate | ||
``` | ||
|
||
=== "Unix / MacOS" | ||
|
||
```sh | ||
source .venv/bin/activate | ||
``` | ||
|
||
#### Cài đặt dependencies | ||
|
||
```sh | ||
pip install -r requirements/requirements.txt | ||
``` | ||
|
||
???- info "Tắt môi trường ảo" | ||
|
||
Để tắt môi trường khi không sử dụng chạy `deactivate` | ||
|
||
--- | ||
|
||
## Chạy chương trình | ||
|
||
!!! important "" | ||
|
||
Yêu cầu kích hoạt venv | ||
|
||
=== "Trực tiếp" | ||
|
||
```sh | ||
check-phat-nguoi | ||
``` | ||
|
||
=== "Python module" | ||
|
||
```sh | ||
python -m check-phat-nguoi | ||
``` |
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 @@ | ||
# uv & just | ||
|
||
## Yêu cầu | ||
|
||
!!! info "" | ||
|
||
Giống uv | ||
|
||
- [just](https://github.com/casey/just) | ||
|
||
## Chạy chương trình | ||
|
||
```sh | ||
just | ||
``` | ||
|
||
???+ info | ||
|
||
Just sẽ tự thiết lập môi trường và restore dependencies trước khi chạy. | ||
|
||
???+ danger | ||
|
||
Just restore tất cả các dependencies khiến môi trường nặng |
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,19 @@ | ||
# uv | ||
|
||
## Yêu cầu | ||
|
||
- [uv](https://github.com/astral-sh/uv) | ||
|
||
## Thiết lập môi trường và dependencies | ||
|
||
```sh | ||
uv sync --no-dev | ||
``` | ||
|
||
## Chạy chương trình | ||
|
||
```sh | ||
uv run check-phat-nguoi # (1) | ||
``` | ||
|
||
1. Có thể thêm arg `--frozen` để không mutate lock file |
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,18 @@ | ||
# Thiết lập file config | ||
|
||
Thiết lập file `config.json` (1) | ||
{ .annotate } | ||
|
||
1. Hoặc | ||
- `check-phat-nguoi.config.json` tại nơi đang đứng | ||
- `~/check-phat-nguoi.config.json` | ||
|
||
!!! info | ||
|
||
Xem [Config Schema](https://ntgnguyen.github.io/check-phat-nguoi/schemas/config.html) để biết chi tiết config | ||
|
||
???+ example "Config mẫu" | ||
|
||
```json title="config.json" | ||
--8<-- "config.sample.json" | ||
``` |
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