aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md131
-rw-r--r--arg_picker_macros/Cargo.toml2
-rw-r--r--mingling_cli/Cargo.toml2
3 files changed, 64 insertions, 71 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6e34e93..4f1b4bf 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,35 +1,45 @@
# Contribution Guide
-First of all, thank you for your interest in Mingling! 🎉 Whether it's fixing bugs, improving documentation, adding new features, or making suggestions, we welcome all contributions.
+First of all, thank you for your interest in Mingling! 🎉
+Whether it's fixing bugs, improving documentation, adding new features, or making suggestions,
+we welcome all contributions.
Before contributing, we recommend reading [README](README.md) to get an overview of the project.
## 1. Project Structure 📦
-| Category | Path/Name | Description |
-| --------------------------- | -------------------- | ----------------------------------------------------------------------- |
-| **Entry crate** | `mingling/` | Project entry point |
-| **Core library** | `mingling_core/` | Imported as an external dependency |
-| **Macro library** | `mingling_macros/` | Imported as an external dependency |
-| **Mingling Pathfinder** | `mingling_pathf/` | Build-time module path resolution for types |
-| **Mingling Picker2** | `arg_picker/` | Mingling Arguments Parser |
-| **Mingling Picker2 Macros** | `arg_picker_macros/` | Mingling Arguments Parser Macros |
-| **Scaffolding tool** | `mling/` | Scaffolding tool `mingling-cli` |
-| **Examples** | `examples/` | To add expected output tests, add a `test.toml` in the example's dir |
-| **Documents** | `docs/` | All documents |
-| **Dev Documents** | `docs/dev/` | Internal documents |
-| **Resources** | `docs/res/` | All resources |
-| **CI system** | `mingling_ci/` | CI crate built on the Mingling framework, invoked via `cargo ci` |
-| **CI orchestration** | `.run/src/bin/ci.py` | Full pipeline script (lock → checks → refresh → unlock) |
-| **Development tools** | `.run/src/bin` | Contains scripts and Rust tools (`deploy-api-docs`, `install-mling`, …) |
-| **CI configs** | `.config/` | `ci-ignored-dirs.txt`, `verified-docs.toml`, `docs-lang.txt` |
-| **Temporary files** | `.temp/` | Ignored by `.gitignore` |
+| Category | Path/Name | Description |
+| ----------------------- | -------------------- | ----------------------------------------------------------------------- |
+| Main | | |
+| **Entry crate** | `mingling/` | Project entry point |
+| **Mingling CLI** | `mingling_cli/` | Mingling's toolchains |
+| **Core library** | `mingling_core/` | Imported as an external dependency |
+| **Macro library** | `mingling_macros/` | Imported as an external dependency |
+| **Mingling Pathfinder** | `mingling_pathf/` | Build-time module path resolution for types |
+| **Arg Picker** | `arg_picker/` | Mingling Arguments Parser |
+| **Arg Picker Macros** | `arg_picker_macros/` | Mingling Arguments Parser Macros |
+| Documents | | |
+| **Examples** | `examples/` | To add expected output tests, add a `test.toml` in the example's dir |
+| **Help Documents** | `docs/pages/` | User-facing help documents (raw) |
+| **Help Documents** | `docs/[LANG]/pages` | User-facing help documents (translations) |
+| **Dev Documents** | `docs/dev/` | Internal documents |
+| **Resources** | `docs/res/` | All resources |
+| Dev Tools | | |
+| **CI system** | `mingling_ci/` | CI crate built on the Mingling framework, invoked via `cargo ci` |
+| **CI configs** | `.config/` | `ci-ignored-dirs.txt`, `verified-docs.toml`, `docs-lang.txt` |
+| **CI orchestration** | `.run/src/bin/ci.py` | Full pipeline script (lock → checks → refresh → unlock) |
+| **Development tools** | `.run/src/bin` | Contains scripts and Rust tools (`deploy-api-docs`, `install-mling`, …) |
+| Misc | | |
+| **Temporary files** | `.temp/` | Ignored by `.gitignore` |
## 2. How to Contribute
+To ensure your contribution goes smoothly, please choose the guide that best fits your contribution area.
+
### Code Contribution
-If you'd like to contribute to `mingling`, `mingling_core`, `mingling_macros`, or `mingling_pathf`, first share your idea on the [Github Issue](https://github.com/mingling-rs/mingling/issues) page to confirm before starting work.
+If you'd like to contribute to `mingling`, `mingling_core`, `mingling_macros`, or `mingling_pathf`,
+first share your idea on the [Github Issue](https://github.com/mingling-rs/mingling/issues) page to confirm before starting work.
- **Before making changes**, make sure your branch stays **as close as possible** to the upstream `main` branch.
- **After finishing**, run the full CI pipeline locally (see [ABOUT CI](https://mingling-rs.github.io/mingling/docs/dev/#/pages/abouts/ci) for how it works):
@@ -38,13 +48,15 @@ If you'd like to contribute to `mingling`, `mingling_core`, `mingling_macros`, o
./run.sh ci
```
-If it passes locally, your changes are most likely correct. (`./run.sh ci` runs `python .run/src/bin/ci.py`, which locks the workspace, runs every check and refresh step, then unlocks — the final unlock fails if the run left the tree dirty.)
+If it passes locally, your changes are most likely correct. (`./run.sh ci` runs `python .run/src/bin/ci.py`,
+which locks the workspace, runs every check and refresh step, then unlocks — the final unlock fails
+if the run left the tree dirty.)
### Example Code Contribution
To add or modify examples under `examples/`, follow these rules:
-- Place each example in `examples/<example-dir>/`
+- Place each example in `examples/{{example-dir}}/`
- Each dir must contain a `page.toml` file describing the example's metadata
- `page.toml` format:
@@ -77,12 +89,6 @@ If you change expected behavior, update the assertions in the example's `test.to
After editing examples, run these commands to keep things in sync:
```bash
-# Ensure code compiles
-cargo ci build-check
-
-# Ensure code style
-cargo ci clippy-check
-
# Check all examples behave as expected
cargo ci example-check
@@ -97,11 +103,21 @@ cargo ci example-refresh
### Documentation Contribution
-To contribute docs, edit files under `docs/`. For other language translations, refer to the structure under `docs/zh_CN`.
+To contribute to the documentation, please edit the files under `docs/`.
+For translations into other languages, refer to the directory structure under `docs/zh_CN`.
+
+> [!Warning]
+>
+> Mingling's API is currently unstable, so adding documentation content may not be
+> the best use of effort at this stage.
+>
+> It is recommended to **only fix typos, grammar issues, etc.**
+
+#### Verify
-- **When editing docs**, prioritize **Chinese docs** first, then **English docs** — since I ([@Weicao-CatilGrass](https://github.com/Weicao-CatilGrass)) am a native Chinese speaker, this is more efficient.
-- If your changes involve code, check the [Code Verify System](https://mingling-rs.github.io/mingling/docs/dev/#/pages/abouts/code-verify-system), which explains how CI checks code.
-- **Before submitting**, always run:
+Documentation is checked by `cargo ci markdown-check-all` and `cargo ci markdown-compare-all` to ensure that **all** languages have consistent documentation structure and that the code compiles.
+
+You can verify the documentation with the following commands:
```bash
# Fix code box issues and regenerate sidebars
@@ -126,57 +142,34 @@ No strict requirements here — just modify the relevant `*.html` files. Preview
### Dev Tool Contribution
-`Mingling CI` code is under strict review. If you want to improve `mingling`'s CI pipeline (`mingling_ci/`) or other dev tools (under `.run/`), **please** first file an [Issue](https://github.com/mingling-rs/mingling/issues) and contact [Weicao-CatilGrass](https://github.com/Weicao-CatilGrass)!
+`Mingling CI` code is under strict review. If you want to improve `mingling`'s CI pipeline (`mingling_ci/`) or other dev tools (under `.run/`),
+**please** first file an [Issue](https://github.com/mingling-rs/mingling/issues) and contact [Weicao-CatilGrass](https://github.com/Weicao-CatilGrass)!
## 3. Submission Guide 🖊
1. **Pull Request**
- - Submit a GitHub Pull Request and @Reviewer **[Weicao-CatilGrass](https://github.com/Weicao-CatilGrass)** for review
- - Or send patches to **catil_grass@qq.com**
+ - Submit a GitHub Pull Request and @Reviewer **[Weicao-CatilGrass](https://github.com/Weicao-CatilGrass)** for review
+ - Or send patches to **catil_grass@qq.com**
2. **Commit Messages**
- - Clearly and concisely describe the changes, no stringent requirements
- - Provide more detail for complex changes, keep it brief for simple changes
- - But: if you use [Conventional Commits](https://www.conventionalcommits.org/), it would make me even happier :)
+ - Clearly and concisely describe the changes, no stringent requirements
+ - Provide more detail for complex changes, keep it brief for simple changes
+ - But: if you use [Conventional Commits](https://www.conventionalcommits.org/), it would make me even happier :)
3. **CHANGELOG**
- - If the submission includes functional changes or fixes, **the PR must include modifications to CHANGELOG.md** to describe the changes
- - For minor changes like typo fixes, **CHANGELOG.md modification is not required**, and we will merge faster
+ - If the submission includes functional changes or fixes, **the PR must include modifications to CHANGELOG.md** to describe the changes
+ - For minor changes like typo fixes, **CHANGELOG.md modification is not required**, and we will merge faster
4. **Multi-commit PR**
- - A PR can contain multiple commits
- - However, at least one commit must modify CHANGELOG.md
+ - A PR can contain multiple commits
+ - However, at least one commit must modify CHANGELOG.md
5. **Review**
- - After submission, please notify [Weicao-CatilGrass](https://github.com/Weicao-CatilGrass) for review — this is the most efficient way to get feedback
+ - After submission, please notify [Weicao-CatilGrass](https://github.com/Weicao-CatilGrass) for review — this is the most efficient way to get feedback
6. **Binary Resources**
- - For binary resource files (images, etc.), please be cautious about adding them to avoid repository bloat
-
-## 4. Documentation Contribution 📕
-
-### Documentation Location
-
-- English documentation: `docs/pages/`
-- Chinese documentation: `docs/_zh_CN/pages/`
-
-### Documentation Build
-
-After editing documentation, refresh relevant files:
-
-```bash
-# Fix code block blank line issues and regenerate sidebars
-cargo ci docsify-refresh
-
-# Regenerate example docs module and examples index
-cargo ci example-refresh
-```
-
-These steps are part of the full pipeline; `./run.sh ci` executes them automatically and fails if they leave the tree dirty (i.e. the generated files were stale).
-
-> [!TIP]
-> You can check the [ABOUT CI](https://mingling-rs.github.io/mingling/docs/dev/#/pages/abouts/ci) section to learn how "Mingling CI" works.
+ - For binary resource files (images, etc.), please be cautious about adding them to avoid repository bloat
## 5. Regarding AI Agent Usage 🤖
@@ -191,6 +184,6 @@ Mingling uses the **MIT + Apache 2.0** dual license. For details, please see:
- [LICENSE-MIT](LICENSE-MIT)
- [LICENSE-APACHE](LICENSE-APACHE)
-# Contributors
+# Contributors ❤
<img src="https://contrib.rocks/image?repo=mingling-rs/mingling" />
diff --git a/arg_picker_macros/Cargo.toml b/arg_picker_macros/Cargo.toml
index d7bffd2..a824b0d 100644
--- a/arg_picker_macros/Cargo.toml
+++ b/arg_picker_macros/Cargo.toml
@@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0"
repository = "https://github.com/mingling-rs/mingling/tree/main/arg_picker"
authors = ["Weicao-CatilGrass"]
readme = "README.md"
-description = "Mingling's lightweight argument parser macros"
+description = "Macros for arg-picker"
[lib]
proc-macro = true
diff --git a/mingling_cli/Cargo.toml b/mingling_cli/Cargo.toml
index 19b4c1b..577d2f8 100644
--- a/mingling_cli/Cargo.toml
+++ b/mingling_cli/Cargo.toml
@@ -7,7 +7,7 @@ repository = "https://github.com/mingling-rs/mingling/tree/main/mingling_cli"
authors = ["Weicao-CatilGrass"]
readme = "README.md"
-description = "Mingling's scaffolding tool for generating, analyzing, and modifying Mingling projects"
+description = "Mingling's toolchains for generating, analyzing, and modifying Mingling projects"
keywords = ["cli", "cli-framework", "command-line", "tools"]
categories = ["command-line-interface"]