gale-shapley-algorithm 1.1.2__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.
- gale_shapley_algorithm-1.1.2/.claude/skills/commit/SKILL.md +36 -0
- gale_shapley_algorithm-1.1.2/.claude/skills/fix/SKILL.md +55 -0
- gale_shapley_algorithm-1.1.2/.claude/skills/pr/SKILL.md +49 -0
- gale_shapley_algorithm-1.1.2/.claude/skills/release/SKILL.md +41 -0
- gale_shapley_algorithm-1.1.2/.claude/skills/review/SKILL.md +72 -0
- gale_shapley_algorithm-1.1.2/.claude/skills/test/SKILL.md +58 -0
- gale_shapley_algorithm-1.1.2/.dockerignore +20 -0
- gale_shapley_algorithm-1.1.2/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
- gale_shapley_algorithm-1.1.2/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- gale_shapley_algorithm-1.1.2/.github/workflows/ci.yml +102 -0
- gale_shapley_algorithm-1.1.2/.github/workflows/docs.yml +64 -0
- gale_shapley_algorithm-1.1.2/.github/workflows/publish.yml +47 -0
- gale_shapley_algorithm-1.1.2/.gitignore +140 -0
- gale_shapley_algorithm-1.1.2/.pre-commit-config.yaml +13 -0
- gale_shapley_algorithm-1.1.2/CHANGELOG.md +64 -0
- gale_shapley_algorithm-1.1.2/CLAUDE.md +131 -0
- gale_shapley_algorithm-1.1.2/CONTRIBUTING.md +148 -0
- gale_shapley_algorithm-1.1.2/Dockerfile +16 -0
- gale_shapley_algorithm-1.1.2/LICENSE +21 -0
- gale_shapley_algorithm-1.1.2/PKG-INFO +153 -0
- gale_shapley_algorithm-1.1.2/README.md +123 -0
- gale_shapley_algorithm-1.1.2/config/config.yaml +24 -0
- gale_shapley_algorithm-1.1.2/config/coverage.ini +12 -0
- gale_shapley_algorithm-1.1.2/config/example_config_custom_input.yaml +24 -0
- gale_shapley_algorithm-1.1.2/config/example_config_random_input.yaml +9 -0
- gale_shapley_algorithm-1.1.2/config/pytest.ini +3 -0
- gale_shapley_algorithm-1.1.2/config/ruff.toml +63 -0
- gale_shapley_algorithm-1.1.2/docs/changelog.md +5 -0
- gale_shapley_algorithm-1.1.2/docs/contributing.md +5 -0
- gale_shapley_algorithm-1.1.2/docs/css/apidocs.css +21 -0
- gale_shapley_algorithm-1.1.2/docs/index.md +7 -0
- gale_shapley_algorithm-1.1.2/docs/js/feedback.js +14 -0
- gale_shapley_algorithm-1.1.2/docs/license.md +11 -0
- gale_shapley_algorithm-1.1.2/docs/reference/api.md +7 -0
- gale_shapley_algorithm-1.1.2/examples/basic_usage.py +22 -0
- gale_shapley_algorithm-1.1.2/examples/class_based.py +29 -0
- gale_shapley_algorithm-1.1.2/examples/stability_check.py +34 -0
- gale_shapley_algorithm-1.1.2/frontend/.gitignore +24 -0
- gale_shapley_algorithm-1.1.2/frontend/README.md +73 -0
- gale_shapley_algorithm-1.1.2/frontend/components.json +23 -0
- gale_shapley_algorithm-1.1.2/frontend/eslint.config.js +23 -0
- gale_shapley_algorithm-1.1.2/frontend/index.html +13 -0
- gale_shapley_algorithm-1.1.2/frontend/package-lock.json +9506 -0
- gale_shapley_algorithm-1.1.2/frontend/package.json +42 -0
- gale_shapley_algorithm-1.1.2/frontend/src/App.tsx +206 -0
- gale_shapley_algorithm-1.1.2/frontend/src/api/client.ts +25 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/AnimationPlayer.tsx +139 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/PersonList.tsx +58 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/PreferenceEditor.tsx +115 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/ResultsPanel.tsx +81 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/RoundVisualization.tsx +134 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/SortableItem.tsx +39 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/SortablePreferenceList.tsx +58 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/StabilityBadge.tsx +35 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/ui/badge.tsx +48 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/ui/button.tsx +64 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/ui/card.tsx +92 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/ui/input.tsx +21 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/ui/scroll-area.tsx +58 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/ui/separator.tsx +26 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/ui/slider.tsx +61 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/ui/table.tsx +116 -0
- gale_shapley_algorithm-1.1.2/frontend/src/components/ui/tooltip.tsx +55 -0
- gale_shapley_algorithm-1.1.2/frontend/src/index.css +124 -0
- gale_shapley_algorithm-1.1.2/frontend/src/main.tsx +13 -0
- gale_shapley_algorithm-1.1.2/frontend/src/types/index.ts +33 -0
- gale_shapley_algorithm-1.1.2/frontend/tsconfig.app.json +32 -0
- gale_shapley_algorithm-1.1.2/frontend/tsconfig.json +13 -0
- gale_shapley_algorithm-1.1.2/frontend/tsconfig.node.json +26 -0
- gale_shapley_algorithm-1.1.2/frontend/vite.config.ts +18 -0
- gale_shapley_algorithm-1.1.2/logs/.gitignore +4 -0
- gale_shapley_algorithm-1.1.2/pyproject.toml +103 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/__init__.py +21 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/__main__.py +10 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/_api/__init__.py +0 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/_api/app.py +18 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/_api/models.py +47 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/_api/routes.py +30 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/_api/step_through.py +168 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/_cli/__init__.py +0 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/_cli/app.py +61 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/_cli/config.py +132 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/_cli/logging.py +83 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/_cli/simulator.py +157 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/algorithm.py +154 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/matching.py +61 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/person.py +141 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/py.typed +0 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/result.py +23 -0
- gale_shapley_algorithm-1.1.2/src/gale_shapley/stability.py +76 -0
- gale_shapley_algorithm-1.1.2/style/CLI-Arguments.png +0 -0
- gale_shapley_algorithm-1.1.2/style/Gale-Shapley-Implementation.png +0 -0
- gale_shapley_algorithm-1.1.2/style/PDM-Install.png +0 -0
- gale_shapley_algorithm-1.1.2/tests/__init__.py +0 -0
- gale_shapley_algorithm-1.1.2/tests/algorithm_test.py +195 -0
- gale_shapley_algorithm-1.1.2/tests/api_test.py +179 -0
- gale_shapley_algorithm-1.1.2/tests/cli_test.py +73 -0
- gale_shapley_algorithm-1.1.2/tests/config_parser_test.py +160 -0
- gale_shapley_algorithm-1.1.2/tests/conftest.py +189 -0
- gale_shapley_algorithm-1.1.2/tests/import_test.py +38 -0
- gale_shapley_algorithm-1.1.2/tests/matching_test.py +48 -0
- gale_shapley_algorithm-1.1.2/tests/person_test.py +229 -0
- gale_shapley_algorithm-1.1.2/tests/simulator_test.py +191 -0
- gale_shapley_algorithm-1.1.2/tests/stability_test.py +118 -0
- gale_shapley_algorithm-1.1.2/tests/utils_test.py +68 -0
- gale_shapley_algorithm-1.1.2/uv.lock +1252 -0
- gale_shapley_algorithm-1.1.2/zensical.toml +165 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit
|
|
3
|
+
description: Create well-structured git commits following conventional commit format. Use when the user asks to commit changes, create a commit, or save their work to git.
|
|
4
|
+
---
|
|
5
|
+
# Commit Skill
|
|
6
|
+
|
|
7
|
+
Create commits following the project's conventional commit format.
|
|
8
|
+
|
|
9
|
+
## Commit Format
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
<type>[(scope)]: Subject
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Types:** `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `deps`
|
|
16
|
+
|
|
17
|
+
**Changelog types:** `build`, `deps`, `feat`, `fix`, `refactor`
|
|
18
|
+
|
|
19
|
+
## Process
|
|
20
|
+
|
|
21
|
+
1. Run `git status` to see changes
|
|
22
|
+
2. Run `git diff --staged` and `git diff` to understand changes
|
|
23
|
+
3. Analyze all changes and draft commit message:
|
|
24
|
+
- Summarize the nature (feat, fix, refactor, etc.)
|
|
25
|
+
- Focus on "why" rather than "what"
|
|
26
|
+
- Keep subject under 72 characters
|
|
27
|
+
4. Stage specific files (avoid `git add -A`)
|
|
28
|
+
5. Create commit with conventional format
|
|
29
|
+
6. Verify with `git status`
|
|
30
|
+
|
|
31
|
+
## Guidelines
|
|
32
|
+
|
|
33
|
+
- Never commit sensitive files (.env, credentials)
|
|
34
|
+
- Stage specific files rather than using `git add -A`
|
|
35
|
+
- One logical change per commit
|
|
36
|
+
- Subject should complete: "If applied, this commit will..."
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fix
|
|
3
|
+
description: Run code formatting and linting with auto-fix using ruff via taskipy. Use when the user asks to fix code style, format code, lint, or clean up their code.
|
|
4
|
+
---
|
|
5
|
+
# Fix Skill
|
|
6
|
+
|
|
7
|
+
Auto-format and lint code using ruff via taskipy.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Format + lint with auto-fix (recommended)
|
|
13
|
+
uvx --from taskipy task fix
|
|
14
|
+
|
|
15
|
+
# Format only
|
|
16
|
+
uvx --from taskipy task format
|
|
17
|
+
|
|
18
|
+
# Lint with auto-fix only
|
|
19
|
+
uvx --from taskipy task lint
|
|
20
|
+
|
|
21
|
+
# Check formatting without changes (CI mode)
|
|
22
|
+
uvx --from taskipy task format_check
|
|
23
|
+
|
|
24
|
+
# Check linting without changes (CI mode)
|
|
25
|
+
uvx --from taskipy task lint_check
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## What Gets Fixed
|
|
29
|
+
|
|
30
|
+
**Formatting (ruff format):**
|
|
31
|
+
- Consistent indentation
|
|
32
|
+
- Line length (120 chars max)
|
|
33
|
+
- Quote style normalization
|
|
34
|
+
- Trailing whitespace
|
|
35
|
+
|
|
36
|
+
**Linting (ruff check --fix):**
|
|
37
|
+
- Import sorting and organization
|
|
38
|
+
- Unused imports removal
|
|
39
|
+
- Simple code improvements
|
|
40
|
+
- PEP 8 compliance
|
|
41
|
+
|
|
42
|
+
## Process
|
|
43
|
+
|
|
44
|
+
1. Run `uvx --from taskipy task fix`
|
|
45
|
+
2. Review any remaining issues that couldn't be auto-fixed
|
|
46
|
+
3. Manually address unfixable issues
|
|
47
|
+
4. Run again to verify clean output
|
|
48
|
+
|
|
49
|
+
## Configuration
|
|
50
|
+
|
|
51
|
+
Ruff configuration is in `config/ruff.toml`:
|
|
52
|
+
- Line length: 120
|
|
53
|
+
- Target Python version matches project
|
|
54
|
+
- Google-style docstrings
|
|
55
|
+
- Absolute imports only
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pr
|
|
3
|
+
description: Create GitHub pull requests with proper formatting and descriptions. Use when the user asks to create a PR, open a pull request, or submit their changes for review.
|
|
4
|
+
---
|
|
5
|
+
# Pull Request Skill
|
|
6
|
+
|
|
7
|
+
Create well-structured GitHub pull requests.
|
|
8
|
+
|
|
9
|
+
## Process
|
|
10
|
+
|
|
11
|
+
1. Check current branch state:
|
|
12
|
+
- `git status` for uncommitted changes
|
|
13
|
+
- `git log origin/main..HEAD` for commits to include
|
|
14
|
+
- `git diff main...HEAD` for full diff
|
|
15
|
+
2. Analyze ALL commits (not just the latest)
|
|
16
|
+
3. Draft PR title and description:
|
|
17
|
+
- Title: Under 70 characters, descriptive
|
|
18
|
+
- Summary: 1-3 bullet points
|
|
19
|
+
- Test plan: How to verify changes
|
|
20
|
+
4. Push branch and create PR
|
|
21
|
+
|
|
22
|
+
## PR Format
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
## Summary
|
|
26
|
+
- Bullet point describing main change
|
|
27
|
+
- Additional changes if applicable
|
|
28
|
+
|
|
29
|
+
## Test plan
|
|
30
|
+
- [ ] How to test the changes
|
|
31
|
+
- [ ] Expected outcomes
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Commands
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Push branch
|
|
38
|
+
git push -u origin <branch-name>
|
|
39
|
+
|
|
40
|
+
# Create PR
|
|
41
|
+
gh pr create --title "Title" --body "Body"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Guidelines
|
|
45
|
+
|
|
46
|
+
- Keep PR title short and descriptive
|
|
47
|
+
- Reference related issues with #number
|
|
48
|
+
- Include test plan for reviewers
|
|
49
|
+
- One logical change per PR when possible
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release
|
|
3
|
+
description: Perform a project release by updating the changelog, bumping the version, committing, tagging, and pushing. Use when the user asks to release, cut a release, bump the version, or publish a new version.
|
|
4
|
+
---
|
|
5
|
+
# Release Skill
|
|
6
|
+
|
|
7
|
+
Perform a full release for this project.
|
|
8
|
+
|
|
9
|
+
## Process
|
|
10
|
+
|
|
11
|
+
1. Ensure you are on `main` and up to date:
|
|
12
|
+
```bash
|
|
13
|
+
git checkout main
|
|
14
|
+
git pull
|
|
15
|
+
```
|
|
16
|
+
2. Run the changelog task to auto-determine the next version:
|
|
17
|
+
```bash
|
|
18
|
+
uvx --from taskipy task changelog
|
|
19
|
+
```
|
|
20
|
+
3. Read `CHANGELOG.md` and extract the new version number from the latest heading.
|
|
21
|
+
4. Present the changelog diff to the user for review. **Wait for user approval before continuing.**
|
|
22
|
+
5. Update `__version__` in `src/gale_shapley/__init__.py` to match the new version (without the `v` prefix).
|
|
23
|
+
6. Stage and commit:
|
|
24
|
+
```bash
|
|
25
|
+
git add CHANGELOG.md src/gale_shapley/__init__.py
|
|
26
|
+
git commit -m "chore: Release version X.Y.Z"
|
|
27
|
+
```
|
|
28
|
+
7. Push, tag, and push the tag:
|
|
29
|
+
```bash
|
|
30
|
+
git push
|
|
31
|
+
git tag vX.Y.Z
|
|
32
|
+
git push --tags
|
|
33
|
+
```
|
|
34
|
+
8. The GitHub Actions release workflow will automatically create a GitHub release from the tag.
|
|
35
|
+
|
|
36
|
+
## Important
|
|
37
|
+
|
|
38
|
+
- **Always wait for user approval** after showing the changelog diff before committing.
|
|
39
|
+
- The version in `__init__.py` must match the tag without the `v` prefix (e.g., `__version__ = "1.2.0"` and tag `v1.2.0`).
|
|
40
|
+
- Only changelog-relevant commit types appear: `build`, `deps`, `feat`, `fix`, `refactor`.
|
|
41
|
+
- If there are no releasable commits since the last tag, inform the user and stop.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Review code for issues, best practices, and improvements. Use when the user asks for a code review, wants feedback on their code, or asks you to check their implementation.
|
|
4
|
+
---
|
|
5
|
+
# Review Skill
|
|
6
|
+
|
|
7
|
+
Perform code review focusing on quality, correctness, and maintainability.
|
|
8
|
+
|
|
9
|
+
## Review Checklist
|
|
10
|
+
|
|
11
|
+
### Correctness
|
|
12
|
+
- Logic errors or edge cases
|
|
13
|
+
- Error handling coverage
|
|
14
|
+
- Type safety and null checks
|
|
15
|
+
|
|
16
|
+
### Code Quality (SOLID + Clean Code)
|
|
17
|
+
- **Single Responsibility**: One reason to change per class/function
|
|
18
|
+
- **Open/Closed**: Open for extension, closed for modification
|
|
19
|
+
- **Liskov Substitution**: Subtypes substitutable for base types
|
|
20
|
+
- **Interface Segregation**: Specific interfaces over general ones
|
|
21
|
+
- **Dependency Inversion**: Depend on abstractions
|
|
22
|
+
- DRY, YAGNI, meaningful names, Boy Scout Rule
|
|
23
|
+
- Functions: Small (<20 lines), do one thing, few args (0-2)
|
|
24
|
+
- No side effects, appropriate abstraction level
|
|
25
|
+
|
|
26
|
+
### Style Compliance
|
|
27
|
+
- Type hints on all functions/methods
|
|
28
|
+
- Google-style docstrings
|
|
29
|
+
- Absolute imports only
|
|
30
|
+
- Line length under 120 chars
|
|
31
|
+
|
|
32
|
+
### Testing
|
|
33
|
+
- Tests cover new functionality
|
|
34
|
+
- Tests verify behavior, not implementation
|
|
35
|
+
- Edge cases tested
|
|
36
|
+
- No flaky tests
|
|
37
|
+
|
|
38
|
+
### Security
|
|
39
|
+
- No hardcoded secrets
|
|
40
|
+
- Input validation at boundaries
|
|
41
|
+
- Safe handling of user data
|
|
42
|
+
|
|
43
|
+
## Process
|
|
44
|
+
|
|
45
|
+
1. Read the code to understand its purpose
|
|
46
|
+
2. Run through the review checklist
|
|
47
|
+
3. Identify issues by category:
|
|
48
|
+
- **Critical**: Bugs, security issues
|
|
49
|
+
- **Major**: Design problems, missing tests
|
|
50
|
+
- **Minor**: Style, naming, documentation
|
|
51
|
+
4. Provide actionable feedback with specific suggestions
|
|
52
|
+
5. Note positive aspects of the code
|
|
53
|
+
|
|
54
|
+
## Output Format
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
## Code Review
|
|
58
|
+
|
|
59
|
+
### Summary
|
|
60
|
+
Brief overview of the code's purpose and quality.
|
|
61
|
+
|
|
62
|
+
### Critical Issues
|
|
63
|
+
- Issue description and location
|
|
64
|
+
- Suggested fix
|
|
65
|
+
|
|
66
|
+
### Suggestions
|
|
67
|
+
- Improvement opportunities
|
|
68
|
+
- Alternative approaches
|
|
69
|
+
|
|
70
|
+
### Positive Notes
|
|
71
|
+
- Well-done aspects
|
|
72
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test
|
|
3
|
+
description: Run the project test suite using taskipy. Use when the user asks to run tests, check if tests pass, verify their changes, or test specific functionality.
|
|
4
|
+
---
|
|
5
|
+
# Test Skill
|
|
6
|
+
|
|
7
|
+
Run the project's test suite with pytest via taskipy.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Run full test suite with coverage
|
|
13
|
+
uvx --from taskipy task test
|
|
14
|
+
|
|
15
|
+
# Run tests without coverage (faster)
|
|
16
|
+
uvx --from taskipy task test_no_cov
|
|
17
|
+
|
|
18
|
+
# Run specific test file
|
|
19
|
+
uv run pytest tests/test_specific.py
|
|
20
|
+
|
|
21
|
+
# Run specific test function
|
|
22
|
+
uv run pytest tests/test_file.py::test_function
|
|
23
|
+
|
|
24
|
+
# Run tests matching pattern
|
|
25
|
+
uv run pytest -k "pattern"
|
|
26
|
+
|
|
27
|
+
# Run with verbose output
|
|
28
|
+
uv run pytest -v
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Process
|
|
32
|
+
|
|
33
|
+
1. Run the appropriate test command
|
|
34
|
+
2. Analyze test output for failures
|
|
35
|
+
3. If failures occur:
|
|
36
|
+
- Identify the failing test(s)
|
|
37
|
+
- Read the test code to understand expectations
|
|
38
|
+
- Fix the issue in the source code
|
|
39
|
+
- Re-run to verify the fix
|
|
40
|
+
|
|
41
|
+
## Coverage
|
|
42
|
+
|
|
43
|
+
Test coverage reports are generated automatically with `task test`. The project maintains coverage thresholds defined in `config/pytest.ini`.
|
|
44
|
+
|
|
45
|
+
## TDD (Test-Driven Development)
|
|
46
|
+
|
|
47
|
+
**Three Laws:** (1) No production code without a failing test. (2) Write only enough test to fail. (3) Write only enough code to pass.
|
|
48
|
+
|
|
49
|
+
**Cycle:** Red -> Green -> Refactor -> Repeat
|
|
50
|
+
|
|
51
|
+
**FIRST:** **F**ast, **I**ndependent, **R**epeatable, **S**elf-validating, **T**imely
|
|
52
|
+
|
|
53
|
+
## Guidelines
|
|
54
|
+
|
|
55
|
+
- Test behavior, not implementation
|
|
56
|
+
- Run tests after making changes
|
|
57
|
+
- Write tests for new functionality
|
|
58
|
+
- Use fixtures for common setup
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: unconfirmed
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Run command '...'
|
|
17
|
+
3. Scroll down to '...'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**System (please complete the following information):**
|
|
27
|
+
- Python version: [e.g. 3.9]
|
|
28
|
+
- OS: [Ubuntu/MacOS/Windows]
|
|
29
|
+
|
|
30
|
+
**Additional context**
|
|
31
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: feature
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- test-me-*
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
15
|
+
|
|
16
|
+
defaults:
|
|
17
|
+
run:
|
|
18
|
+
shell: bash
|
|
19
|
+
|
|
20
|
+
env:
|
|
21
|
+
LANG: en_US.utf-8
|
|
22
|
+
LC_ALL: en_US.utf-8
|
|
23
|
+
PYTHONIOENCODING: UTF-8
|
|
24
|
+
PYTHONWARNDEFAULTENCODING: "1"
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
quality:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout
|
|
32
|
+
uses: actions/checkout@v6
|
|
33
|
+
with:
|
|
34
|
+
fetch-depth: 0
|
|
35
|
+
fetch-tags: true
|
|
36
|
+
|
|
37
|
+
- name: Setup Python
|
|
38
|
+
uses: actions/setup-python@v6
|
|
39
|
+
with:
|
|
40
|
+
python-version: "3.13"
|
|
41
|
+
|
|
42
|
+
- name: Setup uv
|
|
43
|
+
uses: astral-sh/setup-uv@v7
|
|
44
|
+
with:
|
|
45
|
+
enable-cache: true
|
|
46
|
+
cache-dependency-glob: pyproject.toml
|
|
47
|
+
|
|
48
|
+
- name: Install dependencies
|
|
49
|
+
run: uvx --from taskipy task setup
|
|
50
|
+
|
|
51
|
+
- name: Check code formatting
|
|
52
|
+
run: uvx --from taskipy task format_check
|
|
53
|
+
|
|
54
|
+
- name: Check code quality (lint)
|
|
55
|
+
run: uvx --from taskipy task lint_check
|
|
56
|
+
|
|
57
|
+
- name: Build documentation
|
|
58
|
+
run: uvx --from taskipy task docs_build
|
|
59
|
+
|
|
60
|
+
- name: Store objects inventory for tests
|
|
61
|
+
uses: actions/upload-artifact@v5
|
|
62
|
+
with:
|
|
63
|
+
name: objects.inv
|
|
64
|
+
path: site/objects.inv
|
|
65
|
+
|
|
66
|
+
test:
|
|
67
|
+
needs: quality
|
|
68
|
+
strategy:
|
|
69
|
+
matrix:
|
|
70
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
71
|
+
python-version: ["3.12", "3.13"]
|
|
72
|
+
runs-on: ${{ matrix.os }}
|
|
73
|
+
|
|
74
|
+
steps:
|
|
75
|
+
- name: Checkout
|
|
76
|
+
uses: actions/checkout@v6
|
|
77
|
+
with:
|
|
78
|
+
fetch-depth: 0
|
|
79
|
+
fetch-tags: true
|
|
80
|
+
|
|
81
|
+
- name: Setup Python
|
|
82
|
+
uses: actions/setup-python@v6
|
|
83
|
+
with:
|
|
84
|
+
python-version: ${{ matrix.python-version }}
|
|
85
|
+
|
|
86
|
+
- name: Setup uv
|
|
87
|
+
uses: astral-sh/setup-uv@v7
|
|
88
|
+
with:
|
|
89
|
+
enable-cache: true
|
|
90
|
+
cache-dependency-glob: pyproject.toml
|
|
91
|
+
|
|
92
|
+
- name: Install dependencies
|
|
93
|
+
run: uv sync --extra cli --extra gui --python ${{ matrix.python-version }}
|
|
94
|
+
|
|
95
|
+
- name: Download objects inventory
|
|
96
|
+
uses: actions/download-artifact@v6
|
|
97
|
+
with:
|
|
98
|
+
name: objects.inv
|
|
99
|
+
path: site/
|
|
100
|
+
|
|
101
|
+
- name: Run tests
|
|
102
|
+
run: uv run --python ${{ matrix.python-version }} pytest -c config/pytest.ini
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: docs
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
defaults:
|
|
18
|
+
run:
|
|
19
|
+
shell: bash
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
build:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout
|
|
27
|
+
uses: actions/checkout@v6
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
fetch-tags: true
|
|
31
|
+
|
|
32
|
+
- name: Setup Python
|
|
33
|
+
uses: actions/setup-python@v6
|
|
34
|
+
with:
|
|
35
|
+
python-version: "3.13"
|
|
36
|
+
|
|
37
|
+
- name: Setup uv
|
|
38
|
+
uses: astral-sh/setup-uv@v7
|
|
39
|
+
with:
|
|
40
|
+
enable-cache: true
|
|
41
|
+
cache-dependency-glob: pyproject.toml
|
|
42
|
+
|
|
43
|
+
- name: Install dependencies
|
|
44
|
+
run: uvx --from taskipy task setup
|
|
45
|
+
|
|
46
|
+
- name: Build documentation
|
|
47
|
+
run: uvx --from taskipy task docs_build
|
|
48
|
+
|
|
49
|
+
- name: Upload pages artifact
|
|
50
|
+
uses: actions/upload-pages-artifact@v3
|
|
51
|
+
with:
|
|
52
|
+
path: site/
|
|
53
|
+
|
|
54
|
+
deploy:
|
|
55
|
+
needs: build
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
environment:
|
|
58
|
+
name: github-pages
|
|
59
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
60
|
+
|
|
61
|
+
steps:
|
|
62
|
+
- name: Deploy to GitHub Pages
|
|
63
|
+
id: deployment
|
|
64
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
|
|
7
|
+
defaults:
|
|
8
|
+
run:
|
|
9
|
+
shell: bash
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
LANG: en_US.utf-8
|
|
13
|
+
LC_ALL: en_US.utf-8
|
|
14
|
+
PYTHONIOENCODING: UTF-8
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
publish:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
environment: pypi
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
id-token: write
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout
|
|
27
|
+
uses: actions/checkout@v6
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
fetch-tags: true
|
|
31
|
+
|
|
32
|
+
- name: Setup Python
|
|
33
|
+
uses: actions/setup-python@v6
|
|
34
|
+
with:
|
|
35
|
+
python-version: "3.13"
|
|
36
|
+
|
|
37
|
+
- name: Setup uv
|
|
38
|
+
uses: astral-sh/setup-uv@v7
|
|
39
|
+
with:
|
|
40
|
+
enable-cache: true
|
|
41
|
+
cache-dependency-glob: pyproject.toml
|
|
42
|
+
|
|
43
|
+
- name: Build package
|
|
44
|
+
run: uv build
|
|
45
|
+
|
|
46
|
+
- name: Publish to PyPI
|
|
47
|
+
run: uv publish --trusted-publishing always
|