krcg 4.9.dev0__tar.gz → 4.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- krcg-4.10/.github/workflows/validation.yml +51 -0
- {krcg-4.9.dev0 → krcg-4.10}/.gitignore +7 -1
- {krcg-4.9.dev0 → krcg-4.10}/PKG-INFO +77 -121
- {krcg-4.9.dev0 → krcg-4.10}/README.md +76 -112
- krcg-4.10/cards/groups.yaml +1973 -0
- krcg-4.10/cards/references.yaml +1537 -0
- krcg-4.10/cards/rulings.yaml +4790 -0
- {krcg-4.9.dev0 → krcg-4.10}/cards/vtescrypt.csv +32 -7
- {krcg-4.9.dev0 → krcg-4.10}/cards/vteslib.csv +154 -80
- {krcg-4.9.dev0 → krcg-4.10}/cards/vteslibmeta.csv +1 -0
- {krcg-4.9.dev0 → krcg-4.10}/cards/vtessets.csv +1 -0
- krcg-4.10/justfile +106 -0
- {krcg-4.9.dev0 → krcg-4.10}/krcg/analyzer.py +54 -40
- {krcg-4.9.dev0 → krcg-4.10}/krcg/cards.py +362 -210
- {krcg-4.9.dev0 → krcg-4.10}/krcg/deck.py +123 -105
- {krcg-4.9.dev0 → krcg-4.10}/krcg/parser.py +75 -62
- {krcg-4.9.dev0 → krcg-4.10}/krcg/seating.py +99 -81
- {krcg-4.9.dev0 → krcg-4.10}/krcg/sets.py +15 -20
- {krcg-4.9.dev0 → krcg-4.10}/krcg/twda.py +9 -13
- {krcg-4.9.dev0 → krcg-4.10}/krcg/utils.py +121 -92
- {krcg-4.9.dev0 → krcg-4.10}/krcg/vtes.py +28 -21
- {krcg-4.9.dev0 → krcg-4.10}/profiling/seating.py +1 -0
- {krcg-4.9.dev0 → krcg-4.10}/pyproject.toml +27 -14
- krcg-4.10/tests/conftest.py +65 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/test_cards.py +48 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/test_deck.py +2 -2
- {krcg-4.9.dev0 → krcg-4.10}/tests/test_parser.py +5 -5
- {krcg-4.9.dev0 → krcg-4.10}/tests/test_states.py +1 -1
- {krcg-4.9.dev0 → krcg-4.10}/tests/test_twda.py +9 -11
- {krcg-4.9.dev0 → krcg-4.10}/tests/test_vtes.py +18 -18
- krcg-4.9.dev0/.coverage +0 -0
- krcg-4.9.dev0/.github/workflows/validation.yml +0 -42
- krcg-4.9.dev0/Makefile +0 -27
- krcg-4.9.dev0/tests/conftest.py +0 -29
- krcg-4.9.dev0/uv.lock +0 -945
- {krcg-4.9.dev0 → krcg-4.10}/.github/FUNDING.yml +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/.markdownlint.json +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/CHANGELOG.rst +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/LICENSE +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/MANIFEST.in +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/cards/__init__.py +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/dark-pack.png +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/krcg/__init__.py +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/krcg/config.py +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/krcg/rulings.py +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/profiling/__init__.py +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/10211.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/11435.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2010tcdbng.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2011ptwolss.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2012pslp.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2016ggs.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2019grdojf.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2020pihc.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/202207_EC_Day1_1.txt +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2k2origins1.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2k2stranger.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2k4dcqualifier.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2k5alboraya.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2k5sharednun.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2k7fsmc.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2k8TempleConcordance.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/2k8tfnwesterville.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/TWDA.html +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/__init__.py +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/test_analyzer.py +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/test_seating.py +0 -0
- {krcg-4.9.dev0 → krcg-4.10}/tests/test_tournament_archive.py +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Validation
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [master]
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: [master]
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
name: Python ${{ matrix.python-version }}
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
+
id: setup-python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
- name: Setup uv
|
|
27
|
+
uses: astral-sh/setup-uv@v1
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
uv sync --dev
|
|
31
|
+
- name: Format check
|
|
32
|
+
run: |
|
|
33
|
+
uv run ruff format --check .
|
|
34
|
+
- name: Lint
|
|
35
|
+
run: |
|
|
36
|
+
uv run ruff check
|
|
37
|
+
- name: Type check
|
|
38
|
+
run: |
|
|
39
|
+
uv run mypy krcg
|
|
40
|
+
- name: Test
|
|
41
|
+
env:
|
|
42
|
+
LOCAL_CARDS: 1
|
|
43
|
+
run: |
|
|
44
|
+
uv run coverage run -m pytest
|
|
45
|
+
uv run coverage xml
|
|
46
|
+
- name: Upload coverage to Codacy
|
|
47
|
+
if: github.event_name == 'push' && matrix.python-version == '3.12'
|
|
48
|
+
uses: codacy/codacy-coverage-reporter-action@v1
|
|
49
|
+
with:
|
|
50
|
+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
|
51
|
+
coverage-reports: coverage.xml
|
|
@@ -2,14 +2,20 @@
|
|
|
2
2
|
__pycache__/
|
|
3
3
|
build/
|
|
4
4
|
dist/
|
|
5
|
-
venv/
|
|
5
|
+
.venv/
|
|
6
6
|
*.egg-info/
|
|
7
|
+
uv.lock
|
|
7
8
|
|
|
8
9
|
# test
|
|
9
10
|
.pytest_cache/
|
|
10
11
|
.ruff_cache/
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.coverage
|
|
11
14
|
|
|
12
15
|
# editors & OS
|
|
13
16
|
.vscode/
|
|
14
17
|
*.DS_Store
|
|
15
18
|
.idea/
|
|
19
|
+
|
|
20
|
+
# secrets
|
|
21
|
+
.pypi_token
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: krcg
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.10
|
|
4
4
|
Summary: Library for VTES cards and TWDA.
|
|
5
5
|
Project-URL: Repository, https://github.com/lionel-panhaleux/krcg
|
|
6
6
|
Author-email: Lionel Panhaleux <lionel.panhaleux+krcg@gmail.com>
|
|
@@ -24,14 +24,6 @@ Requires-Dist: pyyaml
|
|
|
24
24
|
Requires-Dist: requests
|
|
25
25
|
Requires-Dist: setuptools
|
|
26
26
|
Requires-Dist: unidecode
|
|
27
|
-
Provides-Extra: dev
|
|
28
|
-
Requires-Dist: black; extra == 'dev'
|
|
29
|
-
Requires-Dist: certifi; extra == 'dev'
|
|
30
|
-
Requires-Dist: codacy-coverage; extra == 'dev'
|
|
31
|
-
Requires-Dist: coverage; extra == 'dev'
|
|
32
|
-
Requires-Dist: ipython; extra == 'dev'
|
|
33
|
-
Requires-Dist: pytest; extra == 'dev'
|
|
34
|
-
Requires-Dist: ruff; extra == 'dev'
|
|
35
27
|
Description-Content-Type: text/markdown
|
|
36
28
|
|
|
37
29
|
# KRCG
|
|
@@ -41,7 +33,7 @@ Description-Content-Type: text/markdown
|
|
|
41
33
|
[](https://app.codacy.com/manual/lionel-panhaleux/krcg?utm_source=github.com&utm_medium=referral&utm_content=lionel-panhaleux/krcg&utm_campaign=Badge_Grade_Dashboard)
|
|
42
34
|
[](https://www.python.org/downloads/)
|
|
43
35
|
[](https://opensource.org/licenses/MIT)
|
|
44
|
-
[](https://docs.astral.sh/ruff/)
|
|
45
37
|
|
|
46
38
|
A Python package build to serve as an interface for
|
|
47
39
|
the VEKN [official card texts](http://www.vekn.net/card-lists)
|
|
@@ -68,16 +60,19 @@ The KRCG library has been used in multiple _offpsring_ projects:
|
|
|
68
60
|
It is available online at [static.krcg.org](https://static.krcg.org)
|
|
69
61
|
|
|
70
62
|
- [krcg-api](https://github.com/lionel-panhaleux/krcg-api)
|
|
71
|
-
is a free RESTful web API
|
|
63
|
+
is a free RESTful web API to get the most out of the library for web projects.
|
|
72
64
|
It is available online at [v2.api.krcg.org](https://v2.api.krcg.org)
|
|
73
65
|
|
|
74
66
|
- [krcg-bot](https://github.com/lionel-panhaleux/krcg-bot) is a friendly Discord bot
|
|
75
67
|
that provides official card text and rulings for free.
|
|
76
68
|
It is [available for free](https://discordapp.com/oauth2/authorize?client_id=703921850270613505&scope=bot).
|
|
77
69
|
|
|
70
|
+
Rulings have been outsourced to a separated, community-maintained project:
|
|
71
|
+
[`vtes-rulings`](https://github.com/vtes-biased/vtes-rulings)
|
|
72
|
+
|
|
78
73
|
## Installation
|
|
79
74
|
|
|
80
|
-
[Python 3](https://www.python.org/downloads/) is required.
|
|
75
|
+
[Python 3](https://www.python.org/downloads/) (>=3.10) is required.
|
|
81
76
|
|
|
82
77
|
Use pip to install the `krcg` tool:
|
|
83
78
|
|
|
@@ -94,52 +89,23 @@ Here are a few quickstart examples to showcase how the library can be used:
|
|
|
94
89
|
|
|
95
90
|
### VTES
|
|
96
91
|
|
|
97
|
-
`krcg.vtes.VTES` is the cards library.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
in JSON format for free, for anyone who would want to play with it.
|
|
92
|
+
`krcg.vtes.VTES` is the cards library. Load it with `VTES.load()`.
|
|
93
|
+
This pulls data from the [KRCG static](https://static.krcg.org) server, where
|
|
94
|
+
it's already published in JSON.
|
|
101
95
|
|
|
102
|
-
Alternatively,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
the static JSON files used for the standard load.
|
|
96
|
+
Alternatively, use `VTES.load_from_vekn()` to load directly from the official
|
|
97
|
+
[VEKN CSV files](https://www.vekn.net/card-lists). This is slower and mainly
|
|
98
|
+
used for generating the static JSON.
|
|
106
99
|
|
|
107
|
-
Then you can
|
|
100
|
+
Then you can access cards, complete card names, or search.
|
|
108
101
|
|
|
109
102
|
```python
|
|
110
103
|
>>> from krcg.vtes import VTES
|
|
111
104
|
>>> VTES.load()
|
|
112
|
-
>>> VTES["Alastor"].
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
'_name': 'Alastor',
|
|
117
|
-
'url': 'https://static.krcg.org/card/alastor.jpg',
|
|
118
|
-
'types': ['Political Action'],
|
|
119
|
-
'card_text': (
|
|
120
|
-
'Requires a justicar or Inner Circle member.\n'
|
|
121
|
-
'Choose a ready Camarilla vampire. If this referendum is successful, '
|
|
122
|
-
'search your library for an equipment card and place this card and the equipment '
|
|
123
|
-
'on the chosen vampire. Pay half the cost (round down) of the equipment. '
|
|
124
|
-
'This vampire may enter combat with any vampire controlled by another Methuselah '
|
|
125
|
-
'as a +1 stealth Ⓓ action. This vampire cannot commit diablerie. '
|
|
126
|
-
'A vampire may have only one Alastor.'),
|
|
127
|
-
'artists': ['Monte Moore'],
|
|
128
|
-
'sets': {
|
|
129
|
-
'Gehenna': [{'release_date': '2004-05-17', 'rarity': 'Rare'}],
|
|
130
|
-
'Kindred Most Wanted': [{'release_date': '2005-02-21', 'precon': 'Alastors', 'copies': 1}],
|
|
131
|
-
'Keepers of Tradition': [{'release_date': '2008-11-19', 'rarity': 'Rare'}]},
|
|
132
|
-
'rulings': {
|
|
133
|
-
'text': [
|
|
134
|
-
'If the given weapon costs blood, the target Alastor pays the cost. [LSJ 20040518]',
|
|
135
|
-
'Requirements do not apply. [ANK 20200901]'
|
|
136
|
-
],
|
|
137
|
-
'links': {
|
|
138
|
-
'[LSJ 20040518]': 'https://groups.google.com/d/msg/rec.games.trading-cards.jyhad/4emymfUPwAM/B2SCC7L6kuMJ',
|
|
139
|
-
'[ANK 20200901]': 'http://www.vekn.net/forum/rules-questions/78830-alastor-and-ankara-citadel#100653'
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
105
|
+
>>> VTES["Alastor"].name
|
|
106
|
+
'Alastor'
|
|
107
|
+
>>> VTES["Alastor"].url
|
|
108
|
+
'https://static.krcg.org/card/alastor.jpg'
|
|
143
109
|
>>> VTES.complete("pentex")
|
|
144
110
|
['Pentex™ Loves You!',
|
|
145
111
|
'Pentex™ Subversion',
|
|
@@ -207,11 +173,42 @@ Then you can play around with VTES to access cards, complete card names or searc
|
|
|
207
173
|
<#102158 Watchtower: The Wolves Feed>}
|
|
208
174
|
```
|
|
209
175
|
|
|
176
|
+
### Offline mode (LOCAL_CARDS=1)
|
|
177
|
+
|
|
178
|
+
You can use the library fully offline for cards and rulings by leveraging the
|
|
179
|
+
packaged CSV/YAML data.
|
|
180
|
+
|
|
181
|
+
- Set the environment variable `LOCAL_CARDS=1`.
|
|
182
|
+
- Load cards with `VTES.load_from_vekn()` (not `VTES.load()`).
|
|
183
|
+
- Cards and rulings will be loaded from the packaged YAML automatically.
|
|
184
|
+
|
|
185
|
+
Notes:
|
|
186
|
+
|
|
187
|
+
- The PyPI package includes a snapshot of CSV/YAML files at release time. For
|
|
188
|
+
development from source, run `just sync-cards` to refresh them before packaging.
|
|
189
|
+
- Translations from VEKN are skipped in offline mode; only English text is
|
|
190
|
+
available.
|
|
191
|
+
- TWDA still requires a local source: use a previously saved JSON via
|
|
192
|
+
`TWDA.from_json(...)` or parse a downloaded `TWDA.html` with
|
|
193
|
+
`TWDA.load_html(open("TWDA.html", encoding="utf-8"))`.
|
|
194
|
+
- Network-dependent helpers like `Deck.from_amaranth`, `Deck.from_vdb`,
|
|
195
|
+
and `Deck.from_vtesdecks` are not available offline.
|
|
196
|
+
|
|
197
|
+
Example:
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
>>> import os
|
|
201
|
+
>>> os.environ["LOCAL_CARDS"] = "1"
|
|
202
|
+
>>> from krcg.vtes import VTES
|
|
203
|
+
>>> VTES.load_from_vekn()
|
|
204
|
+
>>> VTES["Villein"].name
|
|
205
|
+
'Villein'
|
|
206
|
+
```
|
|
207
|
+
|
|
210
208
|
### TWDA, Analyzer and Deck
|
|
211
209
|
|
|
212
|
-
`krcg.twda.TWDA`
|
|
213
|
-
|
|
214
|
-
`TWDA.load_from_vekn()` instead is considerably slower.
|
|
210
|
+
`krcg.twda.TWDA` interfaces the TWDA. Load it with `TWDA.load()` (from KRCG static).
|
|
211
|
+
`TWDA.load_from_vekn()` loads directly from VEKN and is considerably slower.
|
|
215
212
|
|
|
216
213
|
Once loaded, it can be used to browse the decks in it.
|
|
217
214
|
|
|
@@ -228,7 +225,7 @@ August 18th 2019
|
|
|
228
225
|
50 players
|
|
229
226
|
Otso Saariluoma
|
|
230
227
|
|
|
231
|
-
--
|
|
228
|
+
-- 2GW3+1
|
|
232
229
|
|
|
233
230
|
Deck Name: Finnish Politics
|
|
234
231
|
|
|
@@ -292,7 +289,7 @@ Event (1)
|
|
|
292
289
|
27
|
|
293
290
|
```
|
|
294
291
|
|
|
295
|
-
The `krcg.analyzer` can provide
|
|
292
|
+
The `krcg.analyzer` can provide statistics over a collection of decks:
|
|
296
293
|
|
|
297
294
|
```python
|
|
298
295
|
>>> from krcg.analyzer import Analyzer
|
|
@@ -310,10 +307,10 @@ The `krcg.analyzer` can provide some statistics over a collection of decks:
|
|
|
310
307
|
4.409638554216869
|
|
311
308
|
>>> A.variance[VTES["Villein"]]
|
|
312
309
|
3.6876179416461032
|
|
313
|
-
>>> # Refreshing with a list of cards
|
|
314
|
-
>>> # similarity=1
|
|
310
|
+
>>> # Refreshing with a list of cards computes card affinity using similar decks.
|
|
311
|
+
>>> # similarity=1 selects only decks that contain all provided cards.
|
|
315
312
|
>>> A.refresh(VTES["Aid from Bats"], similarity=1)
|
|
316
|
-
>>> #
|
|
313
|
+
>>> # Now the candidates method can be used
|
|
317
314
|
>>> A.candidates(VTES["Aid from Bats"])[:5]
|
|
318
315
|
[(<#100515 Deep Song>, 1.0000000000000002),
|
|
319
316
|
(<#100301 Carrion Crows>, 1.0000000000000002),
|
|
@@ -353,15 +350,13 @@ The `krcg.seating` module provides functions to compute optimal seatings:
|
|
|
353
350
|
>>> # score.rules gives a score over the nine official rules for optimal seating
|
|
354
351
|
>>> score.rules
|
|
355
352
|
[0, 0, 0.0, 9, 0, 0, 0, 1.118033988749895, 2]
|
|
356
|
-
>>> # you can inspect violations
|
|
357
|
-
>>> #
|
|
358
|
-
>>> score.R4
|
|
359
|
-
[[1, 5], [2, 3], [2, 9], [3, 4], [4, 7], [5, 8], [6, 7], [9, 10], [10, 11]]
|
|
353
|
+
>>> # you can inspect violations individually, e.g. pairs of players for R4:
|
|
354
|
+
>>> score.R4 # list of PairViolation(player_1=..., player_2=...)
|
|
360
355
|
>>> # for more details about the Score structure, check the docstring
|
|
361
356
|
>>> help(seating.Score)
|
|
362
357
|
```
|
|
363
358
|
|
|
364
|
-
And finally, the `krcg.deck.Deck` class can
|
|
359
|
+
And finally, the `krcg.deck.Deck` class can parse and manipulate decks.
|
|
365
360
|
|
|
366
361
|
```python
|
|
367
362
|
>>> from krcg.deck import Deck
|
|
@@ -433,16 +428,19 @@ Crypt:
|
|
|
433
428
|
|
|
434
429
|
## Development
|
|
435
430
|
|
|
436
|
-
This project uses [uv](https://github.com/astral-sh/uv) for dependency management and packaging
|
|
431
|
+
This project uses [uv](https://github.com/astral-sh/uv) for dependency management and packaging, with
|
|
432
|
+
`just` recipes for common tasks.
|
|
437
433
|
|
|
438
434
|
### Setup
|
|
439
435
|
|
|
440
436
|
1. Install `uv` if you haven't already:
|
|
437
|
+
|
|
441
438
|
```bash
|
|
442
439
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
443
440
|
```
|
|
444
441
|
|
|
445
442
|
2. Clone the repository and install dependencies:
|
|
443
|
+
|
|
446
444
|
```bash
|
|
447
445
|
git clone https://github.com/lionel-panhaleux/krcg.git
|
|
448
446
|
cd krcg
|
|
@@ -451,18 +449,15 @@ This project uses [uv](https://github.com/astral-sh/uv) for dependency managemen
|
|
|
451
449
|
|
|
452
450
|
### Development Commands
|
|
453
451
|
|
|
454
|
-
- `
|
|
455
|
-
- `
|
|
456
|
-
- `
|
|
457
|
-
- `
|
|
458
|
-
- `
|
|
459
|
-
|
|
460
|
-
|
|
452
|
+
- `just quality` - Run code quality checks (ruff check, ruff format --check, mypy, pydoclint)
|
|
453
|
+
- `just test` - Run tests (includes quality)
|
|
454
|
+
- `just update` - Update dependencies and sync external CSV/YAML data
|
|
455
|
+
- `just clean` - Clean build artifacts
|
|
456
|
+
- `just sync-cards` - Sync CSV files from vtescsv and rulings from vtes-biased/vtes-rulings
|
|
457
|
+
- `just build` - Build the package
|
|
458
|
+
- `just release` - Bump version (minor), tag, push, and publish to PyPI
|
|
461
459
|
|
|
462
|
-
|
|
463
|
-
2. Run `make release` to test and build
|
|
464
|
-
3. Run `uv publish` to publish to PyPI
|
|
465
|
-
4. Create and push a git tag: `git tag v<VERSION> && git push --tags`
|
|
460
|
+
Publishing uses `uv publish` and reads the token from a `.pypi_token` file at the repository root.
|
|
466
461
|
|
|
467
462
|
## Contribute
|
|
468
463
|
|
|
@@ -479,48 +474,9 @@ The package uses external data sources for card list, so that it needs not be up
|
|
|
479
474
|
when new sets are released or official VEKN CSV files are changed: it can use
|
|
480
475
|
new data sets as soon as they're available.
|
|
481
476
|
|
|
482
|
-
###
|
|
483
|
-
|
|
484
|
-
Please do not hestitate to contribute rulings: all help is welcome.
|
|
485
|
-
|
|
486
|
-
Open an [issue](https://github.com/lionel-panhaleux/krcg/issues)
|
|
487
|
-
with a ruling you think should be added,
|
|
488
|
-
provide a link to an online post by one of the rules directors:
|
|
489
|
-
|
|
490
|
-
- From 2016-12-04 onward, [Vincent Ripoll (ANK)](http://www.vekn.net/forum/news-and-announcements/75402-new-inner-circle-vekn-board-of-directors#79470)
|
|
491
|
-
- From 2011-07-06 onward, [Pascal Bertrand (PIB)](https://groups.google.com/d/msg/rec.games.trading-cards.jyhad/VzRGZO_Iuto/BjJGRVvJ5Z8J)
|
|
492
|
-
- From 1998-06-22 onward, [L. Scott Johnson (LSJ)](https://groups.google.com/d/msg/rec.games.trading-cards.jyhad/RIX1tLgOFjg/xKikfSarfd8J)
|
|
493
|
-
- From 1994-12-15 onward, [Thomas R Wylie (TOM)](https://groups.google.com/d/msg/rec.games.trading-cards.jyhad/Dm_gIP3YvUs/qTyKyq2NWv4J)
|
|
494
|
-
|
|
495
|
-
### Contribute Rulings (developers)
|
|
496
|
-
|
|
497
|
-
Feel free to contribute rulings as Pull Requests directly, this is very appreciated.
|
|
498
|
-
|
|
499
|
-
Add the ruling link to
|
|
500
|
-
[rulings-links.yaml](https://github.com/lionel-panhaleux/krcg/blob/master/rulings/rulings-links.yaml),
|
|
501
|
-
and the ruling itself to
|
|
502
|
-
[cards-rulings.yaml](https://github.com/lionel-panhaleux/krcg/blob/master/rulings/cards-rulings.yaml) or
|
|
503
|
-
[general-rulings.yaml](https://github.com/lionel-panhaleux/krcg/blob/master/rulings/general-rulings.yaml)
|
|
504
|
-
depending on the case.
|
|
505
|
-
|
|
506
|
-
The format is mostly self-explanatory:
|
|
507
|
-
|
|
508
|
-
- Cards are reference by ID and name in the format `ID|Name`.
|
|
509
|
-
|
|
510
|
-
- Card names inside rulings text should be between bracers, eg. `{.44 Magnum}`
|
|
511
|
-
|
|
512
|
-
- Individual rulings in `cards-rulings.yaml` must provide one or more references
|
|
513
|
-
to ruling links at the end of the text, between brackets, eg `[LSJ 20100101]`
|
|
514
|
-
|
|
515
|
-
In doing so, please follow the following guidelines:
|
|
516
|
-
|
|
517
|
-
- Keep the YAML files clean and alphabetically sorted (you can use a YAML formatter)
|
|
518
|
-
|
|
519
|
-
- Make the rulings as concise as possible
|
|
520
|
-
|
|
521
|
-
- Prefix the ruling with the discipline level and/or type the ruling applies to (if any),
|
|
522
|
-
eg. prefix with `[PRO] [COMBAT]` if the ruling applies only to the card played in combat at superior Protean.
|
|
523
|
-
|
|
524
|
-
- Adapt the ruling wording to the cards it applies to (ie. use masculine/feminin forms)
|
|
477
|
+
### Rulings
|
|
525
478
|
|
|
526
|
-
|
|
479
|
+
Rulings are sourced from the community-maintained repository
|
|
480
|
+
[`vtes-biased/vtes-rulings`](https://github.com/vtes-biased/vtes-rulings).
|
|
481
|
+
Please submit changes there. This library consumes those YAML files directly
|
|
482
|
+
(a current copy is synced upon each release under the `cards/` package).
|