pymtgdeck 0.1.0__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.
- pymtgdeck-0.1.0/.gitignore +10 -0
- pymtgdeck-0.1.0/AGENTS.md +36 -0
- pymtgdeck-0.1.0/LICENSE +674 -0
- pymtgdeck-0.1.0/PKG-INFO +266 -0
- pymtgdeck-0.1.0/README.md +253 -0
- pymtgdeck-0.1.0/pyproject.toml +33 -0
- pymtgdeck-0.1.0/src/pymtgdeck/__init__.py +11 -0
- pymtgdeck-0.1.0/src/pymtgdeck/entities/binder.py +77 -0
- pymtgdeck-0.1.0/src/pymtgdeck/entities/deck.py +82 -0
- pymtgdeck-0.1.0/src/pymtgdeck/entities/entry.py +49 -0
- pymtgdeck-0.1.0/src/pymtgdeck/persistence/backend.py +63 -0
- pymtgdeck-0.1.0/src/pymtgdeck/persistence/registry.py +67 -0
- pymtgdeck-0.1.0/tests/backend_test.py +72 -0
- pymtgdeck-0.1.0/tests/binder_test.py +157 -0
- pymtgdeck-0.1.0/tests/data/card-example-1.json +1 -0
- pymtgdeck-0.1.0/tests/data/card-example-2.json +1 -0
- pymtgdeck-0.1.0/tests/data/card-example-3.json +1 -0
- pymtgdeck-0.1.0/tests/deck_test.py +179 -0
- pymtgdeck-0.1.0/tests/entry_test.py +76 -0
- pymtgdeck-0.1.0/tests/utils.py +12 -0
- pymtgdeck-0.1.0/uv.lock +210 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
This file contains essential information for agents working with this pymtgdeck repository. It answers: "Would an agent likely miss this without help?"
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
This is a Python library for maintaining Magic: The Gathering virtual binders and constrained decks, using pyscryfall for card data handling.
|
|
7
|
+
|
|
8
|
+
## Core Architecture
|
|
9
|
+
- **Entry**: Wraps a ScryfallCard with a count
|
|
10
|
+
- **Binder**: Collection of entries with unlimited card counts
|
|
11
|
+
- **Deck**: Subclass of Binder with deck-specific constraints (max 40 cards, max 4 copies per card)
|
|
12
|
+
|
|
13
|
+
## Key Commands
|
|
14
|
+
- Run tests: `pytest` (from repo root)
|
|
15
|
+
- Install dev dependencies: `uv sync` (uses pyproject.toml)
|
|
16
|
+
|
|
17
|
+
## Important Files
|
|
18
|
+
- `src/pymtgdeck/` - Main source code
|
|
19
|
+
- `tests/` - Test directory with synthetic JSON fixtures
|
|
20
|
+
- `pyproject.toml` - Build config, dependencies, and pytest configuration
|
|
21
|
+
- `README.md` - Complete documentation
|
|
22
|
+
|
|
23
|
+
## Key Constraints
|
|
24
|
+
- Each card can appear at most 4 times in a deck (Deck.max_card_copy_count = 4)
|
|
25
|
+
- Total deck size is limited to 40 cards (Deck.max_card_count = 40)
|
|
26
|
+
- The library requires Python 3.12+
|
|
27
|
+
- Dependencies managed via uv with `pyscryfall==0.1.2`
|
|
28
|
+
|
|
29
|
+
## Testing Setup
|
|
30
|
+
- Tests use pytest with configuration in pyproject.toml
|
|
31
|
+
- Test fixtures loaded from `tests/data/` directory
|
|
32
|
+
- Tests run from repository root (pytest config sets pythonpath = ["."])
|
|
33
|
+
|
|
34
|
+
## Import Structure
|
|
35
|
+
- Use `from pymtgdeck import Entry, Binder, Deck`
|
|
36
|
+
- All classes are properly exported via `__all__` in __init__.py
|