-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94d2be1
commit acf3c2c
Showing
10 changed files
with
352 additions
and
6 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,55 @@ | ||
default_install_hook_types: [pre-commit, commit-msg, pre-push] | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
name: No merge conflict markers | ||
stages: [pre-commit] | ||
- id: mixed-line-ending | ||
name: No mixed line endings (LF and CRLF) | ||
stages: [pre-commit] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.6.0 | ||
hooks: | ||
- id: black | ||
stages: [pre-commit] | ||
types: [python] | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.262 | ||
hooks: | ||
- id: ruff | ||
args: [--fix] | ||
stages: [pre-commit] | ||
types: [python] | ||
|
||
- repo: local | ||
hooks: | ||
- id: mypy-all | ||
name: MyPy (all) | ||
pass_filenames: false | ||
files: pgn-tokenizer/ | ||
entry: uv run mypy . --disable-error-code=import-untyped | ||
stages: [pre-push] | ||
language: system | ||
- id: pytest | ||
name: pytest | ||
stages: [pre-push] | ||
language: system | ||
entry: uv run pytest | ||
types: [python] | ||
pass_filenames: false | ||
verbose: true | ||
|
||
# conventional commits | ||
- repo: https://github.com/espressif/conventional-precommit-linter | ||
rev: v1.6.0 | ||
hooks: | ||
- id: conventional-precommit-linter | ||
stages: [commit-msg] | ||
args: | ||
- --types=chore,feat,fix,ci,docs,refactor,revert,test | ||
- --allow-breaking |
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,41 @@ | ||
# Contributor Guide | ||
|
||
**Note**: More coming soon. This is a work-in-progress and the underlying dataset was just deleted from Kaggle. | ||
|
||
1. [Fork the `DVDAGames/pgn-tokenizer` repository](https://github.com/DVDAGames/pgn-tokenizer/fork): | ||
2. Clone your fork: | ||
|
||
```bash | ||
git clone git@github.com:<your-username>/pgn-tokenizer.git | ||
``` | ||
|
||
3. Install dependencies: | ||
|
||
```bash | ||
uv install | ||
``` | ||
|
||
4. Make your changes: | ||
5. Test your changes: | ||
|
||
```bash | ||
uv run pytest | ||
``` | ||
|
||
6. Commit your changes using [Conventional Commits](https://www.conventionalcommits.org/) | ||
7. Push to your fork: | ||
|
||
```bash | ||
git push origin <your-branch> | ||
``` | ||
|
||
8. Create a [Pull Request](https://github.com/DVDAGames/pgn-tokenizer/compare) | ||
9. Wait for review, approval, and a virtual high five. | ||
|
||
## Development Scripts | ||
|
||
There are a few scripts in the `scripts` directory that can be useful for development: | ||
|
||
- `clean-dataset.py`: Cleans the original weirdness out of the dataset PGN notation | ||
- `format-dataset-for-training.py`: Formats the cleaned dataset for tokenizer training by adding the special `[g_start]` and `[g_end]` tokens to the beginning and end of each game | ||
- `train.py`: Trains the tokenizer on the formatted dataset and saves the model |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Oops, something went wrong.