Skip to content

Commit 1854fe3

Browse files
ci: add basic setup
1 parent 4056140 commit 1854fe3

File tree

12 files changed

+623
-3
lines changed

12 files changed

+623
-3
lines changed

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{py,pyi}]
10+
indent_style = space
11+
indent_size = 4
12+
13+
[*.{yml,yaml}]
14+
indent_style = space
15+
indent_size = 2
16+
17+
[*.{json,toml}]
18+
indent_style = space
19+
indent_size = 2
20+
21+
[*.md]
22+
trim_trailing_whitespace = false

.github/CODEOWNERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Default owners for everything
2+
* @toon-format/python-maintainers
3+
4+
# Project governance and documentation
5+
CODE_OF_CONDUCT.md @johannschopplich
6+
CONTRIBUTING.md @johannschopplich
7+
LICENSE @johannschopplich
8+
README.md @johannschopplich
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
labels: ["bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to report a bug!
9+
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Description
14+
description: A clear description of what the bug is
15+
placeholder: When I try to encode..., I expect..., but instead...
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: reproduction
21+
attributes:
22+
label: Reproduction Steps
23+
description: Steps to reproduce the behavior
24+
placeholder: |
25+
1. Import toon_format
26+
2. Call encode() with...
27+
3. See error...
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: expected
33+
attributes:
34+
label: Expected Behavior
35+
description: What you expected to happen
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: actual
41+
attributes:
42+
label: Actual Behavior
43+
description: What actually happened (including error messages)
44+
validations:
45+
required: true
46+
47+
- type: textarea
48+
id: environment
49+
attributes:
50+
label: Environment
51+
description: |
52+
Please provide:
53+
- Python version
54+
- toon-format version
55+
- Operating system
56+
placeholder: |
57+
- Python 3.12.0
58+
- toon-format 0.1.0
59+
- macOS 14.0
60+
validations:
61+
required: true
62+
63+
- type: textarea
64+
id: additional
65+
attributes:
66+
label: Additional Context
67+
description: Any other context about the problem (optional)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for suggesting a feature!
9+
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Problem Statement
14+
description: What problem does this feature solve?
15+
placeholder: As a user, I want to... because...
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: solution
21+
attributes:
22+
label: Proposed Solution
23+
description: How would you like this to work?
24+
placeholder: |
25+
Add a new method/function that...
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives Considered
33+
description: What alternative solutions have you considered?
34+
35+
- type: textarea
36+
id: spec
37+
attributes:
38+
label: SPEC Compliance
39+
description: |
40+
Does this relate to the TOON specification?
41+
If yes, please reference the relevant section.
42+
placeholder: This relates to SPEC.md section...
43+
44+
- type: textarea
45+
id: additional
46+
attributes:
47+
label: Additional Context
48+
description: Any other context, mockups, or examples
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: SPEC Compliance Issue
2+
description: Report a deviation from the TOON specification
3+
labels: ["spec-compliance"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Report an issue where toon-python doesn't comply with the official TOON spec.
9+
10+
- type: input
11+
id: spec-version
12+
attributes:
13+
label: SPEC Version
14+
description: Which version of the TOON spec does this relate to?
15+
placeholder: v1.3
16+
validations:
17+
required: true
18+
19+
- type: input
20+
id: spec-section
21+
attributes:
22+
label: SPEC Section
23+
description: Which section of SPEC.md is affected?
24+
placeholder: "Section 2.3: Array Notation"
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
id: spec-requirement
30+
attributes:
31+
label: SPEC Requirement
32+
description: What does the spec require?
33+
placeholder: According to SPEC.md, the encoder should...
34+
validations:
35+
required: true
36+
37+
- type: textarea
38+
id: current-behavior
39+
attributes:
40+
label: Current Behavior
41+
description: What does toon-python currently do?
42+
placeholder: Currently, toon-python...
43+
validations:
44+
required: true
45+
46+
- type: textarea
47+
id: test-case
48+
attributes:
49+
label: Test Case
50+
description: Provide a test case that demonstrates the issue
51+
placeholder: |
52+
```python
53+
from toon_format import encode
54+
result = encode(...)
55+
# Expected: ...
56+
# Actual: ...
57+
```
58+
validations:
59+
required: true
60+
61+
- type: textarea
62+
id: additional
63+
attributes:
64+
label: Additional Context
65+
description: Any other relevant information

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
## Description
2+
3+
<!-- Provide a clear and concise description of your changes -->
4+
5+
## Type of Change
6+
7+
<!-- Mark the relevant option with an [x] -->
8+
9+
- [ ] Bug fix (non-breaking change that fixes an issue)
10+
- [ ] New feature (non-breaking change that adds functionality)
11+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] Documentation update
13+
- [ ] Refactoring (no functional changes)
14+
- [ ] Performance improvement
15+
- [ ] Test coverage improvement
16+
17+
## Related Issues
18+
19+
<!-- Link any related issues using #issue_number -->
20+
21+
Closes #
22+
23+
## Changes Made
24+
25+
<!-- List the main changes in this PR -->
26+
27+
-
28+
-
29+
-
30+
31+
## SPEC Compliance
32+
33+
<!-- If this PR relates to the TOON spec, indicate which sections are affected -->
34+
35+
- [ ] This PR implements/fixes spec compliance
36+
- [ ] Spec section(s) affected:
37+
- [ ] Spec version:
38+
39+
## Testing
40+
41+
<!-- Describe the tests you added or ran -->
42+
43+
- [ ] All existing tests pass
44+
- [ ] Added new tests for changes
45+
- [ ] Tested on Python 3.11
46+
- [ ] Tested on Python 3.12
47+
- [ ] Tested on Python 3.13
48+
- [ ] Tested on Python 3.14
49+
50+
## Checklist
51+
52+
<!-- Mark completed items with an [x] -->
53+
54+
- [ ] My code follows the project's coding standards
55+
- [ ] I have added type hints to new code
56+
- [ ] I have run `ruff check` and `ruff format`
57+
- [ ] I have run `mypy` on my changes
58+
- [ ] I have added tests that prove my fix/feature works
59+
- [ ] New and existing tests pass locally
60+
- [ ] I have updated documentation (if needed)
61+
- [ ] My changes do not introduce new dependencies
62+
63+
## Additional Context
64+
65+
<!-- Add any other context about the PR here (optional) -->

.github/workflows/lint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint and Type Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v5
19+
with:
20+
enable-cache: true
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.12"
26+
27+
- name: Install dependencies
28+
run: |
29+
uv sync
30+
uv pip install ruff mypy pytest
31+
32+
- name: Run ruff check
33+
run: uv run ruff check src/ tests/
34+
35+
- name: Run ruff format check
36+
run: uv run ruff format --check src/ tests/
37+
38+
- name: Run mypy
39+
run: uv run mypy src/

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
name: Publish to PyPI
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
contents: read
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
26+
- name: Build package
27+
run: uv build
28+
29+
- name: Publish to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)