Skip to content

Commit dc0f914

Browse files
sp00ktoberclaude
andauthored
chore: workspace skeleton — uv, ruff, pytest, pre-commit, CI, REUSE (#1)
Refs sp00ktober/MHFU-ModKit#57 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 502734f commit dc0f914

14 files changed

Lines changed: 515 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v7
16+
- uses: astral-sh/setup-uv@v10.2.0
17+
with:
18+
enable-cache: true
19+
- uses: actions/cache@v6
20+
with:
21+
path: ~/.cache/pre-commit
22+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
23+
- run: uv sync --locked
24+
- run: uv run pre-commit run --all-files --show-diff-on-failure
25+
26+
test:
27+
strategy:
28+
matrix:
29+
python: ["3.11", "3.14"]
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v7
33+
- uses: astral-sh/setup-uv@v10.2.0
34+
with:
35+
python-version: ${{ matrix.python }}
36+
enable-cache: true
37+
- run: uv sync --locked
38+
- run: uv run pytest

‎.gitignore‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.venv/
2+
__pycache__/
3+
*.egg-info/
4+
.pytest_cache/
5+
.ruff_cache/
6+
build/
7+
dist/
8+
9+
# game data never enters the repo
10+
*.iso
11+
*.cso
12+
*.ppst
13+
workspace/
14+
15+
.DS_Store
16+
.idea/
17+
.vscode/

‎.pre-commit-config.yaml‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v6.0.0
4+
hooks:
5+
- id: check-added-large-files
6+
args: [--maxkb=512, --enforce-all]
7+
- id: check-merge-conflict
8+
- id: check-toml
9+
- id: check-yaml
10+
- id: end-of-file-fixer
11+
- id: trailing-whitespace
12+
13+
- repo: https://github.com/astral-sh/ruff-pre-commit
14+
rev: v0.16.9
15+
hooks:
16+
- id: ruff-check
17+
args: [--fix]
18+
- id: ruff-format
19+
20+
- repo: https://github.com/fsfe/reuse-tool
21+
rev: v6.2.0
22+
hooks:
23+
- id: reuse
24+
25+
- repo: local
26+
hooks:
27+
# the pattern is matched against UTF-8 bytes: the first three branches are emoji ranges
28+
- id: comment-style
29+
name: comments say what and why (no emoji, dates, retractions, Phase N, #NN)
30+
language: pygrep
31+
entry: '\xF0\x9F[\x80-\xAB][\x80-\xBF]|\xE2[\x98-\x9E\xAC-\xAF][\x80-\xBF]|\xEF\xB8\x8F|\b20\d{2}-[01]\d-[0-3]\d\b|\b(?:RETRACTED|SUPERSEDED|[Rr]etracted)\b|\bPhase \d+\b|(?<![\w&#])#\d{1,4}\b'
32+
types_or: [python, pyi, c, c++, lua, shell, toml, yaml]
33+
exclude: ^(\.pre-commit-config\.yaml|uv\.lock)$

‎.python-version‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 sp00ktober
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎LICENSES/MIT.txt‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 sp00ktober
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<p align="center">
2+
<img src="misc/banner.svg" width="720" alt="MHFU-MODKIT">
3+
</p>
4+
5+
# MHFU ModKit
6+
7+
Libraries, a runtime mod framework and tools for modding Monster Hunter Freedom Unite (PSP, EU
8+
release ULES01213), and for porting monsters to it from Monster Hunter Portable 3rd.
9+
10+
> **Under construction.** This repository replaces the six
11+
> [MHFU-ModKit](https://github.com/MHFU-ModKit) repositories, which stay the current release
12+
> until it is done.
13+
14+
## Layout
15+
16+
| Path | Contents |
17+
|---|---|
18+
| `packages/` | Python libraries: the debugger client, the file formats, the game, the porter |
19+
| `framework/` | The PRX plugin and its Lua host |
20+
| `apps/` | The studio (monster and map editor), the HUD, the Blender extension |
21+
| `examples/` | Example mods |
22+
| `data/` | Single-source data, such as the address map the Python, C and Lua constants are generated from |
23+
| `docs/` | Guides and format references |
24+
25+
## Development
26+
27+
Needs [uv](https://docs.astral.sh/uv/).
28+
29+
```bash
30+
uv sync # every package, plus pytest and pre-commit
31+
uv run pre-commit install # ruff, licence headers, comment style on each commit
32+
uv run pytest
33+
```
34+
35+
Tests that read game files take them from `MHFU_DATA` and `MHP3RD_DATA`, each a directory of
36+
extracted `DATA.BIN` files, and skip when the variable is unset. Nothing from the games is
37+
committed here: no ISO, no extracted files, no memory dumps.
38+
39+
## Licence
40+
41+
MIT, except the file-format library and everything that bundles it, which are GPL-3.0-or-later
42+
because they contain code derived from [mhff](https://github.com/svanheulen/mhff). Every file's
43+
licence is machine-readable ([REUSE](https://reuse.software/); check with `reuse lint`).
44+
45+
Not affiliated with or endorsed by Capcom. Monster Hunter is a trademark of Capcom Co., Ltd.

‎REUSE.toml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version = 1
2+
3+
# Default for every file without its own SPDX header; GPL-3.0-or-later files carry one.
4+
[[annotations]]
5+
path = "**"
6+
SPDX-FileCopyrightText = "2026 sp00ktober"
7+
SPDX-License-Identifier = "MIT"

‎misc/banner.svg‎

Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[project]
2+
name = "modkit-testing"
3+
version = "0.1.0"
4+
description = "Pytest fixtures shared by the modkit packages: paths to extracted game data."
5+
requires-python = ">=3.11"
6+
dependencies = ["pytest>=8"]
7+
classifiers = ["Private :: Do Not Upload"]
8+
9+
[project.entry-points.pytest11]
10+
modkit = "modkit_testing"
11+
12+
[build-system]
13+
requires = ["uv_build>=0.11,<0.12"]
14+
build-backend = "uv_build"

0 commit comments

Comments
 (0)