Skip to content

Commit

Permalink
[5_15] Update developers' guide for v1.2.9.x
Browse files Browse the repository at this point in the history
1. Updated the test guide, add a new command to do all intergration
tests.
2. Updated the README and CONTRIBUTING, add a Chinese version of
CONTRIBUTING.
  • Loading branch information
JackYansongLi authored Nov 3, 2024
1 parent 00e8725 commit 0c5c155
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 39 deletions.
14 changes: 8 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ Welcome to joining us as a developer!!!
## For Developers
We are using [xmake](https://xmake.io), please always use the xmake version specified in Github Action.

| Documentation | Platform | Links |
|----------------|---------|----------|
| How to develop | Windows | [English](docs/guide/Develop_on_Windows.md)/[中文](docs/zh/guide/Develop_on_Windows.md) |
| How to develop | macOS | [English](docs/guide/Develop_on_macOS.md)/[中文](docs/zh/guide/Develop_on_macOS.md) |
| How to develop | Linux | [English](docs/guide/Develop_on_Linux.md)/[中文](docs/zh/guide/Develop_on_Linux.md) |
| How to format | All | [English](docs/guide/Format.md)/[中文](docs/guide/Format.md) |
| Documentation | Platform | Links |
| ---------------- | -------- | --------------------------------------------------------------------------------------- |
| How to develop | Windows | [English](docs/guide/Develop_on_Windows.md)/[中文](docs/zh/guide/Develop_on_Windows.md) |
| How to develop | macOS | [English](docs/guide/Develop_on_macOS.md)/[中文](docs/zh/guide/Develop_on_macOS.md) |
| How to develop | Linux | [English](docs/guide/Develop_on_Linux.md)/[中文](docs/zh/guide/Develop_on_Linux.md) |
| How to format | All | [English](docs/guide/Format.md)/[中文](docs/zh/guide/Format.md) |
| How to run tests | All | [English](docs/guide/Test.md)/[中文](docs/zh/guide/Test.md) |

18 changes: 18 additions & 0 deletions CONTRIBUTING_ZH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 贡献
## 用户
将错误报告到 [Github](https://github.com/XmacsLabs/mogan/issues)/[Gitee](https://gitee.com/XmacsLabs/mogan/issues)/[Codeberg](https://codeberg.org/XmacsLabs/mogan/issues),可用英文或中文。

为什么使用英文或中文?因为目前开发人员只懂这两种语言。

欢迎加入我们,成为开发者!

## 开发者
我们使用 [xmake](https://xmake.io),请务必始终使用 Github Action 指定的 xmake 版本。

| 文档 | 平台 | 链接 |
| -------------- | ------- | ------------------------------------------------------------------------------------ |
| 如何开发 | Windows | [英文](docs/guide/Develop_on_Windows.md)/[中文](docs/zh/guide/Develop_on_Windows.md) |
| 如何开发 | macOS | [英文](docs/guide/Develop_on_macOS.md)/[中文](docs/zh/guide/Develop_on_macOS.md) |
| 如何开发 | Linux | [英文](docs/guide/Develop_on_Linux.md)/[中文](docs/zh/guide/Develop_on_Linux.md) |
| 如何格式化代码 | 全平台 | [英文](docs/guide/Format.md)/[中文](docs/zh/guide/Format.md) |
| 如何运行测试 | 全平台 | [英文](docs/guide/Test.md)/[中文](docs/zh/guide/Test.md) |
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
Mogan is a structured STEM suite delivered by [Xmacs Labs](https://github.com/XmacsLabs) consisting of 3 libre software products:

| Name | What | Status |
|------|------|--------|
| Mogan Research | one of the distribution of GNU TeXmacs which is a structured scientific editing platform | stable |
| Mogan Code | Structured code editor based on the GNU TeXmacs kernel | developing |
| Mogan Beamer | Beamer-like presentation tool based on the GNU TeXmacs kernel | developing |
| Name | What | Status |
| -------------- | ---------------------------------------------------------------------------------------- | ---------- |
| Mogan Research | one of the distribution of GNU TeXmacs which is a structured scientific editing platform | stable |
| Mogan Code | Structured code editor based on the GNU TeXmacs kernel | developing |
| Mogan Beamer | Beamer-like presentation tool based on the GNU TeXmacs kernel | developing |

## How to install
+ Download now via [Installation Guide](docs/guide/Install.md)
Expand All @@ -27,7 +27,7 @@ Mogan is a structured STEM suite delivered by [Xmacs Labs](https://github.com/Xm
[![A quick tour of TeXmacs-0001](https://user-images.githubusercontent.com/32867606/198896005-72077867-bd0f-4223-9f87-099ec3815ba5.png)](https://youtu.be/H46ON2FB30U)

## Contributing as User or Developer
Please review the [Contribution guide](CONTRIBUTING.md) for information on how to get started contributing to Mogan.
Please review the [Contribution guide: English](CONTRIBUTING.md)/[Contribution guide: Chinese](CONTRIBUTING_ZH.md) for information on how to get started contributing to Mogan.

You can join our discord by https://discord.gg/QzE3K6rvYn.

Expand Down
12 changes: 6 additions & 6 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
> **享受探索科学与技术的乐趣!**
墨干理工套件是[墨客实验室](https://gitee.com/XmacsLabs)旗下的结构化的理工套件,包含三大自由软件产品:
| 中文名 | 英文名 | 产品定位 | 状态 |
|-------|-------|---------|-----|
| 墨干 | Mogan Research | 墨干是结构化的科技编辑器平台——GNU TeXmacs的发行版之一 | 成熟 |
| 墨码 | Mogan Code | 基于GNU TeXmacs内核的代码编辑器 | 研发中 |
| 墨板 | Mogan Beamer | 基于GNU TeXmacs内核的幻灯片产品 | 研发中 |
| 中文名 | 英文名 | 产品定位 | 状态 |
| ------ | -------------- | ----------------------------------------------------- | ------ |
| 墨干 | Mogan Research | 墨干是结构化的科技编辑器平台——GNU TeXmacs的发行版之一 | 成熟 |
| 墨码 | Mogan Code | 基于GNU TeXmacs内核的代码编辑器 | 研发中 |
| 墨板 | Mogan Beamer | 基于GNU TeXmacs内核的幻灯片产品 | 研发中 |

## 如何安装
+ 马上下载:[安装指南](docs/zh/guide/Install.md)
Expand All @@ -27,7 +27,7 @@
[![A quick tour of TeXmacs-0001](https://user-images.githubusercontent.com/32867606/198896005-72077867-bd0f-4223-9f87-099ec3815ba5.png)](https://player.bilibili.com/player.html?aid=376713018&bvid=BV1bo4y1D7wN&cid=371195201&page=1)

## 如何贡献
请仔细阅读[贡献指南](CONTRIBUTING.md),以了解如何开始为墨干做贡献。
请仔细阅读[贡献指南:英文](CONTRIBUTING.md)/[贡献指南:中文](CONTRIBUTING_ZH.md),以了解如何开始为墨干做贡献。

### 贡献者
<table>
Expand Down
20 changes: 10 additions & 10 deletions docs/guide/Test.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ For Developers, there are two way of testing: Unit tests and Integration tests

## Unit Tests
### C++ Unit Tests
| 命令 | 作用 |
|-----|------|
| bin/test_all | Run all C++ tests |
| bin/test_kernel_l1 | Run C++ tests in Kernel L1 |
| bin/test_kernel_l2 | Run C++ tests in Kernel L2 |
| Command | Results |
| --------------------------- | ------------------------------------ |
| bin/test_all | Run all C++ tests |
| bin/test_kernel_l1 | Run C++ tests in Kernel L1 |
| bin/test_kernel_l2 | Run C++ tests in Kernel L2 |
| bin/test_only [target-name] | Only run the specified C++ unit test |

### Scheme Unit Tests
Build, install and launch Mogan Research, and then insert the Scheme session to run the Scheme unit tests:
``` scheme
(run-all-tests)
```
## Scheme Tests
For Scheme Tests
+ use `xmake run --yes -vD --group=scheme_tests` to run all Scheme tests.


## Integration Tests
Source code and docs for integration tests are in `TeXmacs/tests`. To run integration tests, one must build and install mogan:
+ use `bin/test_all_doc` to run all integration tests
+ use `xmake run [target-name]` to run the specific integration test, eg. `xmake run 9_1`
+ use `xmake run --yes -vD --group=integration_tests` to run all integration tests.

## List all targets
Use the following commandline to list all targets. The targets (ending with `_test`) are C++ unit tests, the targets like `[0_9]*_[0_9]*` are integration tests.
Expand Down
21 changes: 10 additions & 11 deletions docs/zh/guide/Test.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@

## 单元测试
### C++单元测试
| 命令 | 作用 |
|-----|------|
| bin/test_all | 执行所有C++测试 |
| bin/test_kernel_l1 | 执行Kernel L1的C++测试 |
| bin/test_kernel_l2 | 执行Kernel L2的C++测试 |
| bin/test_only [target-name] | 只执行某一个单元测试 |
| 命令 | 作用 |
| --------------------------- | ---------------------- |
| bin/test_all | 执行所有C++测试 |
| bin/test_kernel_l1 | 执行Kernel L1的C++测试 |
| bin/test_kernel_l2 | 执行Kernel L2的C++测试 |
| bin/test_only [target-name] | 只执行某一个单元测试 |

### Scheme单元测试
构建并安装墨干到临时目录之后,启动墨干,就可以插入Scheme会话执行Scheme单元测试。
``` scheme
(run-all-tests)
```
## Scheme 测试
执行Scheme测试:
+ 可以使用 `xmake run --yes -vD --group=scheme_tests` 执行所有Scheme测试.

## 集成测试
集成测试的代码和测试文档都放在`TeXmacs/tests`这个目录下。执行集成测试前,必须构建并安装墨干到临时目录:
+ 可以使用`bin/test_all_doc`执行所有集成测试
+ 可以使用`xmake run [target-name]`执行单个集成测试,比如`xmake run 9_1`
+ 可以使用`xmake run --yes -vD --group=integration_tests`执行所有集成测试。

## 列出所有target
下面的命令行可以列出所有target,其中以`_test`结尾的是C++的单元测试,形如`[0_9]*_[0_9]*`的是集成测试。
Expand Down

0 comments on commit 0c5c155

Please sign in to comment.