Skip to content

Commit

Permalink
ci: add typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Equim-chan committed Feb 2, 2024
1 parent d60b81b commit 162c10c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/libriichi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
with:
python-version: '3.11'

- name: Run typos
uses: crate-ci/typos@v1.18.0

- name: Environment preparation
id: prep
run: |
Expand Down
4 changes: 2 additions & 2 deletions docs/src/user/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $ git clone https://github.com/Equim-chan/Mortal.git
$ cd Mortal
```

From now on, the root directory of Mortal will be demostrated as `$MORTAL_ROOT`.
From now on, the root directory of Mortal will be demonstrated as `$MORTAL_ROOT`.

### Create and activate a conda env
> Working directory: `$MORTAL_ROOT`
Expand All @@ -25,7 +25,7 @@ $ conda activate mortal
### Install pytorch
pytorch is not listed as a dependency in `environment.yml` on purpose so that users can install it with their favored ways as per their requirement, hardware and OS.

Check [pytorch's doc](https://pytorch.org/get-started/locally/) on how to install pytorch in your environment. Personally, I recommand installing pytorch with pip.
Check [pytorch's doc](https://pytorch.org/get-started/locally/) on how to install pytorch in your environment. Personally, I recommend installing pytorch with pip.

```admonish tip
Only `torch` is needed. You can skip the installation of `torchvision` and `torchaudio`.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/user/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $ sudo env DOCKER_BUILDKIT=1 docker build -t mortal:latest .
```

## Prepare a trained model
The Docker image does not contain any model file of Model, therefore it must be prepared separately under a directory, which will be demostrated as `/path/to/model/dir` below. In this example, snapshot `mortal1-b40c192-t22040618` is used.
The Docker image does not contain any model file of Model, therefore it must be prepared separately under a directory, which will be demonstrated as `/path/to/model/dir` below. In this example, snapshot `mortal1-b40c192-t22040618` is used.

## Example
We are going to use Mortal to evaluate the next move for the scene shown in _Figure 1_.
Expand All @@ -25,7 +25,7 @@ First things first, we need to identify the POV's player ID. A player ID is an i

In this case, the POV's player ID is 2, because his seat is West at E1.

Mortal speaks mjai <!-- TODO: link to doc -->, a simple and easy-to-read stream format for mahjong records. From the perspective of player 2, the equivalant masked mjai events he has perceived so far are:
Mortal speaks mjai <!-- TODO: link to doc -->, a simple and easy-to-read stream format for mahjong records. From the perspective of player 2, the equivalent masked mjai events he has perceived so far are:

```js
{"type":"start_game"}
Expand Down
2 changes: 1 addition & 1 deletion libriichi/src/state/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl PlayerState {
if let Some(tile) = self.last_self_tsumo {
ensure!(tile == pai, "cannot tsumogiri");
} else {
bail!("tsumogiri but the player has not dealed any tile yet");
bail!("tsumogiri but the player has not dealt any tile yet");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion mortal/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def drain(self):
shutil.move(src, dst)
drained_size = raw_count
S.buffer_size = 0
logging.info(f'files transfered to trainer: {drained_size}')
logging.info(f'files transferred to trainer: {drained_size}')
logging.info(f'total buffer size: {S.buffer_size}')
self.send_msg({
'count': drained_size,
Expand Down
2 changes: 2 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[files]
extend-exclude = ["log-viewer/files/**"]

0 comments on commit 162c10c

Please sign in to comment.