Skip to content

Commit 8c46ed3

Browse files
committed
Update to dev
2 parents c76773e + 7bed03a commit 8c46ed3

1,083 files changed

Lines changed: 222581 additions & 321644 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ blank_issues_enabled: false
22
contact_links:
33
- name: Bug - Typo (misspellings/improper grammar)
44
url: https://github.com/ClanGenOfficial/clangen/issues/1818
5-
about: Report an issue with text itself (spelling, punctuation, and grammar).
5+
about: Report an issue with text itself (spelling, punctuation, and grammar).
6+
- name: Bug - Event Too Frequent/Infrequent
7+
url: https://github.com/ClanGenOfficial/clangen/issues/3896
8+
about: Report feedback on specific events being too frequent or infrequent.

.github/workflows/build-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- "mkdocs.yml"
1212
- "pyproject.toml"
1313
- "uv.lock"
14+
- "README.md" # Necessary because of hatchling
1415

1516
jobs:
1617
build:
@@ -59,4 +60,4 @@ jobs:
5960
method: kubeconfig
6061
kubeconfig: ${{ secrets.DOCS_RESTART_KUBECONFIG }}
6162
- name: Restart deployment
62-
run: kubectl rollout restart deployment/clangen-docs -n clangen
63+
run: kubectl rollout restart deployment/clangen-docs -n clangen-docs

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
itch_channel: win64_10
3939
api_artifact_name: win10+
4040

41-
- os: macos-13
41+
- os: macos-15-intel
4242
artifact_name: Clangen_macOS64.dmg
4343
python_version: "3.11"
4444
python_arch: "x64"
@@ -188,6 +188,7 @@ jobs:
188188
-F "fileBundle=@${BUNDLE_NAME}.sig" \
189189
--http1.1
190190
- name: Set up butler
191+
if: startsWith(github.ref, 'refs/tags/')
191192
uses: jdno/setup-butler@v1
192193
- name: Upload build to itch.io
193194
env:
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Failure Comment (Formatter)
2+
on:
3+
workflow_run:
4+
workflows: ["Formatter"]
5+
types: [completed]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
comment:
12+
if: >
13+
github.event.workflow_run.conclusion == 'failure'
14+
&& github.event.workflow_run.event == 'pull_request'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/github-script@v7
18+
with:
19+
script: |
20+
const run = context.payload.workflow_run;
21+
let prNumber = run.pull_requests?.[0]?.number;
22+
23+
if (!prNumber) {
24+
const { data: pulls } = await github.rest.pulls.list({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
state: 'open',
28+
head: `${run.head_repository.owner.login}:${run.head_branch}`,
29+
});
30+
if (!pulls.length) {
31+
console.log('No PR found for this workflow run');
32+
return;
33+
}
34+
prNumber = pulls[0].number;
35+
}
36+
37+
const body = `### Formatting check failed
38+
39+
Please run the formatter locally and commit the resulting changes:
40+
41+
\`\`\`sh
42+
uv run black .
43+
\`\`\``;
44+
45+
const { data: comments } = await github.rest.issues.listComments({
46+
owner: context.repo.owner,
47+
repo: context.repo.repo,
48+
issue_number: prNumber,
49+
});
50+
51+
const existing = comments.find(c => c.user.type === 'Bot' && c.body.includes('Formatting check failed'));
52+
53+
if (!existing) {
54+
await github.rest.issues.createComment({
55+
owner: context.repo.owner,
56+
repo: context.repo.repo,
57+
issue_number: prNumber,
58+
body,
59+
});
60+
}

.github/workflows/test.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ jobs:
1313
- python-version: '3.11'
1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Download the test saves
17-
run: wget https://github.com/ImLvna/clangen-unittest-saves/archive/refs/heads/main.zip -O tests/saves.zip
18-
- name: Unzip
19-
run: unzip tests/saves.zip
20-
- name: Move the folder
21-
run: mv clangen-unittest-saves-main tests/testSaves
22-
- name: Remove the zip
23-
run: rm tests/saves.zip
2416
- name: Install uv
2517
uses: astral-sh/setup-uv@v5
2618
with:
@@ -39,7 +31,7 @@ jobs:
3931
env:
4032
SDL_VIDEODRIVER: "dummy"
4133
SDL_AUDIODRIVER: "disk"
42-
run: uv run python -m unittest tests/test_thoughts.py tests/test_relation_events.py tests/test_group_interaction.py tests/test_conditions.py tests/test_utility.py tests/test_cat.py tests/test_save.py tests/test_filter_patrol.py tests/test_lang.py
34+
run: uv run python -m unittest tests/test_thoughts.py tests/test_relation_events.py tests/test_group_interaction.py tests/test_conditions.py tests/test_utility.py tests/test_cat.py tests/test_save.py tests/test_event_filters.py tests/test_lang.py tests/test_events.py
4335
json_test:
4436
runs-on: ubuntu-latest
4537
steps:
@@ -58,7 +50,7 @@ jobs:
5850
- name: Check json validity
5951
run: uv run tests/test_json.py
6052
- name: Check json schemas
61-
run: uv run tests/test_json_schemas.py
53+
run: uv run pytest tests/test_json_model_compliance.py
6254
pronoun_test:
6355
runs-on: ubuntu-latest
6456
steps:
@@ -91,5 +83,5 @@ jobs:
9183
enable-cache: true
9284
- name: install dependencies
9385
run: uv sync --group test
94-
- name: Check for pronoun tag errors in resources
86+
- name: Run freshkill tests
9587
run: uv run python -m unittest tests/test_freshkill.py

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@ If you find a bug, please report it on our [issues page](https://github.com/Clan
3636
### Solving an Issue
3737
When solving an issue, please link it in your Pull Request.
3838

39+
## Regenerating JSON Schemas
40+
If you modify any Pydantic models in `scripts/models/`, you'll need to regenerate the JSON schemas:
41+
```sh
42+
uv run dump_model_schemas
43+
```
44+
45+
## Getting Started
3946
If you do not know where to get started, check the [good first issue tag](https://github.com/ClanGenOfficial/clangen/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). These issues have been marked as “good first issues” because they are non-urgent improvements that do not require a great familiarity with the larger codebase. Solving these issues is a great way to better understand the codebase.

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ARG GIT_COMMITTERS_ENABLED=true
66

77
COPY pyproject.toml .
88
COPY uv.lock .
9+
COPY README.md .
910

1011
RUN apt-get update && apt-get install -y git && \
1112
uv sync --no-default-groups --group docs
@@ -26,4 +27,4 @@ COPY --from=0 /docs/site /usr/share/nginx/html
2627

2728
EXPOSE 80
2829

29-
CMD ["nginx", "-g", "daemon off;"]
30+
CMD ["nginx", "-g", "daemon off;"]

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# clangen
22

3+
## On AI & LLMs
4+
5+
> [!WARNING]
6+
> Issues and Pull Requests created with AI based tools are going to be closed without further comment.
7+
> Repeat offenders will be blocked from this project until further notice.
8+
39
### [Discord Server](https://discord.gg/clangen) || [Official website](https://clangen.io) || [Itch.io Page](https://sablesteel.itch.io/clan-gen-fan-edit)
410

511
## Description

0 commit comments

Comments
 (0)