oh-markdown-tool 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.
- oh_markdown_tool-0.1.0/.github/OPENHANDS_REVIEW.md +108 -0
- oh_markdown_tool-0.1.0/.github/dependabot.yml +30 -0
- oh_markdown_tool-0.1.0/.github/pull_request_template.md +34 -0
- oh_markdown_tool-0.1.0/.github/workflows/ci.yml +103 -0
- oh_markdown_tool-0.1.0/.github/workflows/pr-review-by-openhands.yml +42 -0
- oh_markdown_tool-0.1.0/.github/workflows/release-please.yml +31 -0
- oh_markdown_tool-0.1.0/.github/workflows/release.yml +85 -0
- oh_markdown_tool-0.1.0/.gitignore +80 -0
- oh_markdown_tool-0.1.0/.release-please-manifest.json +3 -0
- oh_markdown_tool-0.1.0/CHANGELOG.md +27 -0
- oh_markdown_tool-0.1.0/CONTRIBUTING.md +198 -0
- oh_markdown_tool-0.1.0/LICENSE +21 -0
- oh_markdown_tool-0.1.0/MANIFEST.in +4 -0
- oh_markdown_tool-0.1.0/Makefile +106 -0
- oh_markdown_tool-0.1.0/PKG-INFO +265 -0
- oh_markdown_tool-0.1.0/PUBLISHING.md +298 -0
- oh_markdown_tool-0.1.0/README.md +235 -0
- oh_markdown_tool-0.1.0/SETUP_SUMMARY.md +160 -0
- oh_markdown_tool-0.1.0/doc/markdown-tool.md +591 -0
- oh_markdown_tool-0.1.0/examples/basic_usage.py +92 -0
- oh_markdown_tool-0.1.0/pyproject.toml +104 -0
- oh_markdown_tool-0.1.0/release-please-config.json +25 -0
- oh_markdown_tool-0.1.0/src/oh_markdown_tool/__init__.py +34 -0
- oh_markdown_tool-0.1.0/src/oh_markdown_tool/formatter.py +158 -0
- oh_markdown_tool-0.1.0/src/oh_markdown_tool/numbering.py +384 -0
- oh_markdown_tool-0.1.0/src/oh_markdown_tool/operations.py +411 -0
- oh_markdown_tool-0.1.0/src/oh_markdown_tool/parser.py +254 -0
- oh_markdown_tool-0.1.0/src/oh_markdown_tool/toc.py +300 -0
- oh_markdown_tool-0.1.0/src/oh_markdown_tool/tool.py +956 -0
- oh_markdown_tool-0.1.0/tests/__init__.py +1 -0
- oh_markdown_tool-0.1.0/tests/conftest.py +116 -0
- oh_markdown_tool-0.1.0/tests/fixtures/README.md +81 -0
- oh_markdown_tool-0.1.0/tests/fixtures/cleanup/messy_doc_expected.md +21 -0
- oh_markdown_tool-0.1.0/tests/fixtures/cleanup/messy_doc_input.md +19 -0
- oh_markdown_tool-0.1.0/tests/fixtures/cleanup/messy_doc_params.json +1 -0
- oh_markdown_tool-0.1.0/tests/fixtures/delete/leaf_section_expected.md +9 -0
- oh_markdown_tool-0.1.0/tests/fixtures/delete/leaf_section_input.md +13 -0
- oh_markdown_tool-0.1.0/tests/fixtures/delete/leaf_section_params.json +3 -0
- oh_markdown_tool-0.1.0/tests/fixtures/delete/with_children_expected.md +9 -0
- oh_markdown_tool-0.1.0/tests/fixtures/delete/with_children_input.md +21 -0
- oh_markdown_tool-0.1.0/tests/fixtures/delete/with_children_params.json +3 -0
- oh_markdown_tool-0.1.0/tests/fixtures/demote/with_children_expected.md +17 -0
- oh_markdown_tool-0.1.0/tests/fixtures/demote/with_children_input.md +17 -0
- oh_markdown_tool-0.1.0/tests/fixtures/demote/with_children_params.json +3 -0
- oh_markdown_tool-0.1.0/tests/fixtures/fix/trailing_spaces_expected.md +9 -0
- oh_markdown_tool-0.1.0/tests/fixtures/fix/trailing_spaces_input.md +9 -0
- oh_markdown_tool-0.1.0/tests/fixtures/fix/trailing_spaces_params.json +1 -0
- oh_markdown_tool-0.1.0/tests/fixtures/insert/after_section_expected.md +13 -0
- oh_markdown_tool-0.1.0/tests/fixtures/insert/after_section_input.md +9 -0
- oh_markdown_tool-0.1.0/tests/fixtures/insert/after_section_params.json +5 -0
- oh_markdown_tool-0.1.0/tests/fixtures/insert/subsection_expected.md +17 -0
- oh_markdown_tool-0.1.0/tests/fixtures/insert/subsection_input.md +13 -0
- oh_markdown_tool-0.1.0/tests/fixtures/insert/subsection_params.json +6 -0
- oh_markdown_tool-0.1.0/tests/fixtures/move/after_sibling_expected.md +13 -0
- oh_markdown_tool-0.1.0/tests/fixtures/move/after_sibling_input.md +13 -0
- oh_markdown_tool-0.1.0/tests/fixtures/move/after_sibling_params.json +5 -0
- oh_markdown_tool-0.1.0/tests/fixtures/move/with_children_expected.md +21 -0
- oh_markdown_tool-0.1.0/tests/fixtures/move/with_children_input.md +21 -0
- oh_markdown_tool-0.1.0/tests/fixtures/move/with_children_params.json +5 -0
- oh_markdown_tool-0.1.0/tests/fixtures/promote/with_children_expected.md +17 -0
- oh_markdown_tool-0.1.0/tests/fixtures/promote/with_children_input.md +17 -0
- oh_markdown_tool-0.1.0/tests/fixtures/promote/with_children_params.json +3 -0
- oh_markdown_tool-0.1.0/tests/fixtures/renumber/fix_gaps_expected.md +13 -0
- oh_markdown_tool-0.1.0/tests/fixtures/renumber/fix_gaps_input.md +13 -0
- oh_markdown_tool-0.1.0/tests/fixtures/renumber/fix_gaps_params.json +1 -0
- oh_markdown_tool-0.1.0/tests/fixtures/renumber/nested_hierarchy_expected.md +25 -0
- oh_markdown_tool-0.1.0/tests/fixtures/renumber/nested_hierarchy_input.md +25 -0
- oh_markdown_tool-0.1.0/tests/fixtures/renumber/nested_hierarchy_params.json +1 -0
- oh_markdown_tool-0.1.0/tests/fixtures/rewrap/long_lines_expected.md +12 -0
- oh_markdown_tool-0.1.0/tests/fixtures/rewrap/long_lines_input.md +9 -0
- oh_markdown_tool-0.1.0/tests/fixtures/rewrap/long_lines_params.json +3 -0
- oh_markdown_tool-0.1.0/tests/fixtures/toc/create_expected.md +35 -0
- oh_markdown_tool-0.1.0/tests/fixtures/toc/create_input.md +25 -0
- oh_markdown_tool-0.1.0/tests/fixtures/toc/create_params.json +1 -0
- oh_markdown_tool-0.1.0/tests/fixtures/toc/remove_expected.md +9 -0
- oh_markdown_tool-0.1.0/tests/fixtures/toc/remove_input.md +14 -0
- oh_markdown_tool-0.1.0/tests/fixtures/toc/remove_params.json +3 -0
- oh_markdown_tool-0.1.0/tests/test_fixtures.py +232 -0
- oh_markdown_tool-0.1.0/tests/test_formatter.py +320 -0
- oh_markdown_tool-0.1.0/tests/test_integration.py +229 -0
- oh_markdown_tool-0.1.0/tests/test_numbering.py +370 -0
- oh_markdown_tool-0.1.0/tests/test_operations.py +470 -0
- oh_markdown_tool-0.1.0/tests/test_parser.py +466 -0
- oh_markdown_tool-0.1.0/tests/test_toc.py +733 -0
- oh_markdown_tool-0.1.0/tests/test_tool.py +1258 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# OpenHands Automated PR Review
|
|
2
|
+
|
|
3
|
+
This repository uses [OpenHands](https://github.com/All-Hands-AI/OpenHands) for automated pull request reviews.
|
|
4
|
+
|
|
5
|
+
## How It Works
|
|
6
|
+
|
|
7
|
+
The OpenHands bot automatically reviews pull requests when:
|
|
8
|
+
|
|
9
|
+
1. **A new PR is opened** (non-draft)
|
|
10
|
+
2. **A draft PR is marked as ready for review**
|
|
11
|
+
3. **The `review-this` label is added** to any PR
|
|
12
|
+
4. **OpenHands is requested as a reviewer** (`openhands-agent` or `all-hands-bot`)
|
|
13
|
+
|
|
14
|
+
## Review Triggers
|
|
15
|
+
|
|
16
|
+
### Automatic Review
|
|
17
|
+
New non-draft PRs are automatically reviewed when opened.
|
|
18
|
+
|
|
19
|
+
### Manual Trigger Options
|
|
20
|
+
|
|
21
|
+
**Option 1: Add the label**
|
|
22
|
+
```bash
|
|
23
|
+
gh pr edit <PR_NUMBER> --add-label "review-this"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Option 2: Request OpenHands as reviewer**
|
|
27
|
+
```bash
|
|
28
|
+
gh pr edit <PR_NUMBER> --add-reviewer openhands-agent
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Option 3: Mark draft as ready**
|
|
32
|
+
If you have a draft PR, marking it as "Ready for review" will trigger the review.
|
|
33
|
+
|
|
34
|
+
### Re-trigger a Review
|
|
35
|
+
|
|
36
|
+
To re-run the review after making changes:
|
|
37
|
+
|
|
38
|
+
1. Remove and re-add the `review-this` label:
|
|
39
|
+
```bash
|
|
40
|
+
gh pr edit <PR_NUMBER> --remove-label "review-this"
|
|
41
|
+
gh pr edit <PR_NUMBER> --add-label "review-this"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
2. Or close and re-request the reviewer.
|
|
45
|
+
|
|
46
|
+
## Review Style
|
|
47
|
+
|
|
48
|
+
The bot provides **roasted** feedback 🔥 - critical and direct - focusing on:
|
|
49
|
+
- Code quality and best practices
|
|
50
|
+
- Potential bugs or issues
|
|
51
|
+
- What's wrong and how to fix it
|
|
52
|
+
- Documentation completeness
|
|
53
|
+
- Test coverage
|
|
54
|
+
|
|
55
|
+
Expect honest, no-nonsense reviews that get straight to the point.
|
|
56
|
+
|
|
57
|
+
## Configuration
|
|
58
|
+
|
|
59
|
+
### LLM Model
|
|
60
|
+
Currently using: `anthropic/claude-sonnet-4-20250514`
|
|
61
|
+
|
|
62
|
+
To use a different model, edit `.github/workflows/pr-review-by-openhands.yml`:
|
|
63
|
+
```yaml
|
|
64
|
+
with:
|
|
65
|
+
llm-model: openai/gpt-4 # or any supported model
|
|
66
|
+
review-style: roasted # or constructive, concise, detailed
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Review Styles
|
|
70
|
+
- `roasted` - Critical, direct feedback 🔥 (default)
|
|
71
|
+
- `constructive` - Balanced, helpful feedback
|
|
72
|
+
- `concise` - Brief, to-the-point reviews
|
|
73
|
+
- `detailed` - Comprehensive, thorough reviews
|
|
74
|
+
|
|
75
|
+
### Custom LLM Endpoint
|
|
76
|
+
|
|
77
|
+
If you want to use a custom LLM endpoint or proxy:
|
|
78
|
+
|
|
79
|
+
1. Add the secret to your repository:
|
|
80
|
+
- Go to Settings → Secrets and variables → Actions
|
|
81
|
+
- Add `LLM_API_KEY` with your API key
|
|
82
|
+
|
|
83
|
+
2. Update the workflow to use it:
|
|
84
|
+
```yaml
|
|
85
|
+
with:
|
|
86
|
+
llm-model: litellm_proxy/your-model
|
|
87
|
+
llm-base-url: https://your-llm-proxy.com
|
|
88
|
+
llm-api-key: ${{ secrets.LLM_API_KEY }}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Limitations
|
|
92
|
+
|
|
93
|
+
- Only reviews PRs from the same repository (not forks, for security)
|
|
94
|
+
- Skips draft PRs unless explicitly triggered
|
|
95
|
+
- One review per PR event (use concurrency control)
|
|
96
|
+
|
|
97
|
+
## Disabling Reviews
|
|
98
|
+
|
|
99
|
+
To temporarily disable automated reviews:
|
|
100
|
+
|
|
101
|
+
1. **For a specific PR**: Keep it as a draft until ready
|
|
102
|
+
2. **For the repository**: Disable the workflow in Settings → Actions
|
|
103
|
+
|
|
104
|
+
## Learn More
|
|
105
|
+
|
|
106
|
+
- [OpenHands Documentation](https://docs.openhands.dev)
|
|
107
|
+
- [PR Review Plugin](https://github.com/OpenHands/extensions/tree/main/plugins/pr-review)
|
|
108
|
+
- [OpenHands on GitHub](https://github.com/All-Hands-AI/OpenHands)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# GitHub Actions dependencies
|
|
4
|
+
- package-ecosystem: "github-actions"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
labels:
|
|
9
|
+
- "dependencies"
|
|
10
|
+
- "github-actions"
|
|
11
|
+
|
|
12
|
+
# Python dependencies
|
|
13
|
+
- package-ecosystem: "pip"
|
|
14
|
+
directory: "/"
|
|
15
|
+
schedule:
|
|
16
|
+
interval: "weekly"
|
|
17
|
+
labels:
|
|
18
|
+
- "dependencies"
|
|
19
|
+
- "python"
|
|
20
|
+
groups:
|
|
21
|
+
# Group OpenHands SDK updates together
|
|
22
|
+
openhands:
|
|
23
|
+
patterns:
|
|
24
|
+
- "openhands-*"
|
|
25
|
+
# Group dev dependencies together
|
|
26
|
+
dev-dependencies:
|
|
27
|
+
patterns:
|
|
28
|
+
- "pytest*"
|
|
29
|
+
- "ruff"
|
|
30
|
+
- "coverage"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
<!-- Provide a brief description of the changes in this PR -->
|
|
4
|
+
|
|
5
|
+
## Type of Change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
8
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
9
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
10
|
+
- [ ] Documentation update
|
|
11
|
+
- [ ] Code quality improvement (refactoring, style, etc.)
|
|
12
|
+
|
|
13
|
+
## Testing
|
|
14
|
+
|
|
15
|
+
<!-- Describe the tests you ran to verify your changes -->
|
|
16
|
+
|
|
17
|
+
- [ ] Tests pass locally (`make test`)
|
|
18
|
+
- [ ] Added new tests for changes
|
|
19
|
+
- [ ] Updated existing tests if needed
|
|
20
|
+
|
|
21
|
+
## Checklist
|
|
22
|
+
|
|
23
|
+
- [ ] My code follows the style guidelines of this project (`make lint` passes)
|
|
24
|
+
- [ ] I have performed a self-review of my code
|
|
25
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
26
|
+
- [ ] I have made corresponding changes to the documentation
|
|
27
|
+
- [ ] My changes generate no new warnings
|
|
28
|
+
- [ ] Any dependent changes have been merged and published
|
|
29
|
+
|
|
30
|
+
## Related Issues
|
|
31
|
+
|
|
32
|
+
<!-- Link any related issues here using #issue-number -->
|
|
33
|
+
|
|
34
|
+
Closes #
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
name: Lint
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v7
|
|
21
|
+
with:
|
|
22
|
+
version: "latest"
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
run: uv python install 3.12
|
|
26
|
+
|
|
27
|
+
- name: Create virtual environment
|
|
28
|
+
run: uv venv
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: uv pip install -e ".[dev]"
|
|
32
|
+
|
|
33
|
+
- name: Run ruff linter
|
|
34
|
+
run: uv run ruff check src tests
|
|
35
|
+
|
|
36
|
+
- name: Run ruff formatter check
|
|
37
|
+
run: uv run ruff format --check src tests
|
|
38
|
+
|
|
39
|
+
test:
|
|
40
|
+
name: Test
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v7
|
|
44
|
+
|
|
45
|
+
- name: Install uv
|
|
46
|
+
uses: astral-sh/setup-uv@v7
|
|
47
|
+
with:
|
|
48
|
+
version: "latest"
|
|
49
|
+
|
|
50
|
+
- name: Set up Python
|
|
51
|
+
run: uv python install 3.12
|
|
52
|
+
|
|
53
|
+
- name: Create virtual environment
|
|
54
|
+
run: uv venv
|
|
55
|
+
|
|
56
|
+
- name: Install dependencies
|
|
57
|
+
run: uv pip install -e ".[dev]"
|
|
58
|
+
|
|
59
|
+
- name: Run tests with coverage
|
|
60
|
+
run: |
|
|
61
|
+
uv run pytest tests \
|
|
62
|
+
--cov=oh_markdown_tool \
|
|
63
|
+
--cov-report=term-missing \
|
|
64
|
+
--cov-report=html:htmlcov \
|
|
65
|
+
--cov-report=xml \
|
|
66
|
+
--cov-fail-under=80 \
|
|
67
|
+
-v
|
|
68
|
+
|
|
69
|
+
- name: Upload coverage HTML report
|
|
70
|
+
uses: actions/upload-artifact@v7
|
|
71
|
+
with:
|
|
72
|
+
name: coverage-report
|
|
73
|
+
path: htmlcov/
|
|
74
|
+
retention-days: 14
|
|
75
|
+
|
|
76
|
+
- name: Upload coverage to Codecov
|
|
77
|
+
uses: codecov/codecov-action@v7
|
|
78
|
+
with:
|
|
79
|
+
files: ./coverage.xml
|
|
80
|
+
flags: unittests
|
|
81
|
+
name: codecov-umbrella
|
|
82
|
+
fail_ci_if_error: false
|
|
83
|
+
|
|
84
|
+
- name: Coverage Summary
|
|
85
|
+
run: |
|
|
86
|
+
echo "## Coverage Report" >> $GITHUB_STEP_SUMMARY
|
|
87
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
88
|
+
uv run coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
|
|
89
|
+
|
|
90
|
+
all-checks:
|
|
91
|
+
name: All Checks Passed
|
|
92
|
+
runs-on: ubuntu-latest
|
|
93
|
+
needs: [lint, test]
|
|
94
|
+
if: always()
|
|
95
|
+
steps:
|
|
96
|
+
- name: Check all jobs passed
|
|
97
|
+
run: |
|
|
98
|
+
if [[ "${{ needs.lint.result }}" != "success" ]] || \
|
|
99
|
+
[[ "${{ needs.test.result }}" != "success" ]]; then
|
|
100
|
+
echo "One or more jobs failed"
|
|
101
|
+
exit 1
|
|
102
|
+
fi
|
|
103
|
+
echo "All checks passed! ✅"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: PR Review by OpenHands
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
types: [opened, ready_for_review, labeled, review_requested]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pull-requests: write
|
|
11
|
+
issues: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
pr-review:
|
|
15
|
+
# Skip fork PRs (no access to secrets), draft PRs, and Release Please PRs
|
|
16
|
+
if: |
|
|
17
|
+
github.event.pull_request.head.repo.full_name == github.repository &&
|
|
18
|
+
github.event.pull_request.user.login != 'github-actions[bot]' &&
|
|
19
|
+
!startsWith(github.event.pull_request.head.ref, 'release-please--') &&
|
|
20
|
+
(
|
|
21
|
+
(github.event.action == 'opened' && github.event.pull_request.draft == false) ||
|
|
22
|
+
github.event.action == 'ready_for_review' ||
|
|
23
|
+
(github.event.action == 'labeled' && github.event.label.name == 'review-this') ||
|
|
24
|
+
(
|
|
25
|
+
github.event.action == 'review_requested' &&
|
|
26
|
+
(
|
|
27
|
+
github.event.requested_reviewer.login == 'openhands-agent' ||
|
|
28
|
+
github.event.requested_reviewer.login == 'all-hands-bot'
|
|
29
|
+
)
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
concurrency:
|
|
33
|
+
group: pr-review-${{ github.event.pull_request.number }}
|
|
34
|
+
cancel-in-progress: true
|
|
35
|
+
runs-on: ubuntu-24.04
|
|
36
|
+
steps:
|
|
37
|
+
- name: Run PR Review
|
|
38
|
+
uses: OpenHands/extensions/plugins/pr-review@main
|
|
39
|
+
with:
|
|
40
|
+
llm-model: anthropic/claude-sonnet-4-20250514
|
|
41
|
+
review-style: roasted
|
|
42
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release-please:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: googleapis/release-please-action@v4
|
|
17
|
+
id: release
|
|
18
|
+
with:
|
|
19
|
+
release-type: python
|
|
20
|
+
package-name: oh-markdown-tool
|
|
21
|
+
|
|
22
|
+
# Output release information for debugging
|
|
23
|
+
- name: Release info
|
|
24
|
+
if: steps.release.outputs.release_created
|
|
25
|
+
run: |
|
|
26
|
+
echo "Release created: ${{ steps.release.outputs.release_created }}"
|
|
27
|
+
echo "Tag name: ${{ steps.release.outputs.tag_name }}"
|
|
28
|
+
echo "Version: ${{ steps.release.outputs.version }}"
|
|
29
|
+
echo "Major: ${{ steps.release.outputs.major }}"
|
|
30
|
+
echo "Minor: ${{ steps.release.outputs.minor }}"
|
|
31
|
+
echo "Patch: ${{ steps.release.outputs.patch }}"
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
name: Build Distribution
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v7
|
|
20
|
+
with:
|
|
21
|
+
version: "latest"
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
run: uv python install 3.12
|
|
25
|
+
|
|
26
|
+
- name: Build package
|
|
27
|
+
run: uv build
|
|
28
|
+
|
|
29
|
+
- name: Store the distribution packages
|
|
30
|
+
uses: actions/upload-artifact@v7
|
|
31
|
+
with:
|
|
32
|
+
name: python-package-distributions
|
|
33
|
+
path: dist/
|
|
34
|
+
|
|
35
|
+
publish-to-pypi:
|
|
36
|
+
name: Publish to PyPI
|
|
37
|
+
needs: [build]
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
environment:
|
|
40
|
+
name: pypi
|
|
41
|
+
url: https://pypi.org/p/oh-markdown-tool
|
|
42
|
+
permissions:
|
|
43
|
+
id-token: write
|
|
44
|
+
|
|
45
|
+
steps:
|
|
46
|
+
- name: Download all the dists
|
|
47
|
+
uses: actions/download-artifact@v8
|
|
48
|
+
with:
|
|
49
|
+
name: python-package-distributions
|
|
50
|
+
path: dist/
|
|
51
|
+
|
|
52
|
+
- name: Publish distribution to PyPI
|
|
53
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
54
|
+
|
|
55
|
+
github-release:
|
|
56
|
+
name: Create GitHub Release
|
|
57
|
+
needs: [publish-to-pypi]
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
permissions:
|
|
60
|
+
contents: write
|
|
61
|
+
id-token: write
|
|
62
|
+
|
|
63
|
+
steps:
|
|
64
|
+
- name: Download all the dists
|
|
65
|
+
uses: actions/download-artifact@v8
|
|
66
|
+
with:
|
|
67
|
+
name: python-package-distributions
|
|
68
|
+
path: dist/
|
|
69
|
+
|
|
70
|
+
- name: Create GitHub Release
|
|
71
|
+
env:
|
|
72
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
73
|
+
run: >-
|
|
74
|
+
gh release create
|
|
75
|
+
'${{ github.ref_name }}'
|
|
76
|
+
--repo '${{ github.repository }}'
|
|
77
|
+
--notes "Release ${{ github.ref_name }}"
|
|
78
|
+
|
|
79
|
+
- name: Upload artifact signatures to GitHub Release
|
|
80
|
+
env:
|
|
81
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
82
|
+
run: >-
|
|
83
|
+
gh release upload
|
|
84
|
+
'${{ github.ref_name }}' dist/**
|
|
85
|
+
--repo '${{ github.repository }}'
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
*.manifest
|
|
32
|
+
*.spec
|
|
33
|
+
|
|
34
|
+
# Unit test / coverage reports
|
|
35
|
+
htmlcov/
|
|
36
|
+
.tox/
|
|
37
|
+
.nox/
|
|
38
|
+
.coverage
|
|
39
|
+
.coverage.*
|
|
40
|
+
.cache
|
|
41
|
+
nosetests.xml
|
|
42
|
+
coverage.xml
|
|
43
|
+
*.cover
|
|
44
|
+
*.py,cover
|
|
45
|
+
.hypothesis/
|
|
46
|
+
.pytest_cache/
|
|
47
|
+
|
|
48
|
+
# Virtual environments
|
|
49
|
+
venv/
|
|
50
|
+
env/
|
|
51
|
+
ENV/
|
|
52
|
+
env.bak/
|
|
53
|
+
venv.bak/
|
|
54
|
+
.venv/
|
|
55
|
+
|
|
56
|
+
# IDEs
|
|
57
|
+
.vscode/
|
|
58
|
+
.idea/
|
|
59
|
+
*.swp
|
|
60
|
+
*.swo
|
|
61
|
+
*~
|
|
62
|
+
.DS_Store
|
|
63
|
+
|
|
64
|
+
# mypy
|
|
65
|
+
.mypy_cache/
|
|
66
|
+
.dmypy.json
|
|
67
|
+
dmypy.json
|
|
68
|
+
|
|
69
|
+
# Pyre type checker
|
|
70
|
+
.pyre/
|
|
71
|
+
|
|
72
|
+
# pytype static type analyzer
|
|
73
|
+
.pytype/
|
|
74
|
+
|
|
75
|
+
# Ruff
|
|
76
|
+
.ruff_cache/
|
|
77
|
+
|
|
78
|
+
# uv
|
|
79
|
+
.uv/
|
|
80
|
+
uv.lock
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-07-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Add automated PR review with OpenHands ([60b5dd0](https://github.com/jpshackelford/oh-markdown-tool/commit/60b5dd0ee8c6fd9556a3b7d7c77854ab22f6fc5f))
|
|
9
|
+
* add automated release workflow with Release Please ([e55618e](https://github.com/jpshackelford/oh-markdown-tool/commit/e55618e23d5165812c6c39e7554c1d181fd71659))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* exclude Release Please PRs from automated code review ([8187966](https://github.com/jpshackelford/oh-markdown-tool/commit/8187966941b961527e6197aa6f832ad3a96ae9c9))
|
|
15
|
+
* Update codecov action parameter from 'file' to 'files' ([8df1c85](https://github.com/jpshackelford/oh-markdown-tool/commit/8df1c85aed11b5e03cc3d19791c5463f4eb1ff1e))
|
|
16
|
+
* Use --system flag for uv commands in CI ([#7](https://github.com/jpshackelford/oh-markdown-tool/issues/7)) ([5384527](https://github.com/jpshackelford/oh-markdown-tool/commit/53845273e1485acdf1899424db81821f3b272717))
|
|
17
|
+
|
|
18
|
+
## 0.1.0 (Initial Release)
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* Initial release of oh-markdown-tool
|
|
23
|
+
* Structural editing and formatting for markdown documents
|
|
24
|
+
* Table of contents generation
|
|
25
|
+
* Heading numbering
|
|
26
|
+
* Document parsing and operations
|
|
27
|
+
* Integration with OpenHands SDK
|