repodoc 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.
- repodoc-0.1.0/.github/markdown-link-check.json +11 -0
- repodoc-0.1.0/.github/workflows/ci.yml +176 -0
- repodoc-0.1.0/.github/workflows/dependencies.yml +65 -0
- repodoc-0.1.0/.github/workflows/docs.yml +63 -0
- repodoc-0.1.0/.github/workflows/release.yml +259 -0
- repodoc-0.1.0/.gitignore +15 -0
- repodoc-0.1.0/.markdownlint.json +17 -0
- repodoc-0.1.0/.python-version +1 -0
- repodoc-0.1.0/CHANGELOG.md +201 -0
- repodoc-0.1.0/CONTRIBUTING.md +560 -0
- repodoc-0.1.0/LICENSE +21 -0
- repodoc-0.1.0/PKG-INFO +509 -0
- repodoc-0.1.0/PUBLISHING.md +228 -0
- repodoc-0.1.0/README.md +473 -0
- repodoc-0.1.0/pyproject.toml +95 -0
- repodoc-0.1.0/pytest.ini +17 -0
- repodoc-0.1.0/src/repodoc/__init__.py +3 -0
- repodoc-0.1.0/src/repodoc/cli.py +98 -0
- repodoc-0.1.0/src/repodoc/commands/__init__.py +10 -0
- repodoc-0.1.0/src/repodoc/commands/base.py +284 -0
- repodoc-0.1.0/src/repodoc/commands/deadcode.py +114 -0
- repodoc-0.1.0/src/repodoc/commands/diet.py +126 -0
- repodoc-0.1.0/src/repodoc/commands/docker.py +150 -0
- repodoc-0.1.0/src/repodoc/commands/report.py +139 -0
- repodoc-0.1.0/src/repodoc/commands/scan.py +255 -0
- repodoc-0.1.0/src/repodoc/commands/tour.py +98 -0
- repodoc-0.1.0/src/repodoc/core/__init__.py +26 -0
- repodoc-0.1.0/src/repodoc/core/copilot.py +170 -0
- repodoc-0.1.0/src/repodoc/core/exceptions.py +135 -0
- repodoc-0.1.0/src/repodoc/core/logger.py +84 -0
- repodoc-0.1.0/src/repodoc/core/parser.py +155 -0
- repodoc-0.1.0/src/repodoc/prompts/__init__.py +5 -0
- repodoc-0.1.0/src/repodoc/prompts/templates.py +134 -0
- repodoc-0.1.0/src/repodoc/prompts/v1/deadcode.txt +98 -0
- repodoc-0.1.0/src/repodoc/prompts/v1/diet.txt +88 -0
- repodoc-0.1.0/src/repodoc/prompts/v1/docker.txt +109 -0
- repodoc-0.1.0/src/repodoc/prompts/v1/report.txt +53 -0
- repodoc-0.1.0/src/repodoc/prompts/v1/scan.txt +115 -0
- repodoc-0.1.0/src/repodoc/prompts/v1/tour.txt +90 -0
- repodoc-0.1.0/src/repodoc/renderers/__init__.py +7 -0
- repodoc-0.1.0/src/repodoc/renderers/base.py +68 -0
- repodoc-0.1.0/src/repodoc/renderers/command_renderers.py +306 -0
- repodoc-0.1.0/src/repodoc/renderers/json_renderer.py +50 -0
- repodoc-0.1.0/src/repodoc/renderers/terminal_renderer.py +280 -0
- repodoc-0.1.0/src/repodoc/schemas/__init__.py +70 -0
- repodoc-0.1.0/src/repodoc/schemas/base.py +76 -0
- repodoc-0.1.0/src/repodoc/schemas/deadcode.py +47 -0
- repodoc-0.1.0/src/repodoc/schemas/diet.py +58 -0
- repodoc-0.1.0/src/repodoc/schemas/docker.py +52 -0
- repodoc-0.1.0/src/repodoc/schemas/report.py +15 -0
- repodoc-0.1.0/src/repodoc/schemas/scan.py +50 -0
- repodoc-0.1.0/src/repodoc/schemas/tour.py +56 -0
- repodoc-0.1.0/tests/__init__.py +0 -0
- repodoc-0.1.0/tests/conftest.py +281 -0
- repodoc-0.1.0/tests/test_copilot.py +226 -0
- repodoc-0.1.0/tests/test_diet_command.py +257 -0
- repodoc-0.1.0/tests/test_exceptions.py +137 -0
- repodoc-0.1.0/tests/test_parser.py +195 -0
- repodoc-0.1.0/tests/test_prompts.py +48 -0
- repodoc-0.1.0/tests/test_schemas.py +63 -0
- repodoc-0.1.0/uv.lock +531 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, develop]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, develop]
|
|
8
|
+
|
|
9
|
+
# Cancel in-progress runs when a new workflow on the same PR is triggered
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lint:
|
|
16
|
+
name: Lint & Format Check
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
permissions:
|
|
19
|
+
contents: write
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout code
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
with:
|
|
24
|
+
ref: ${{ github.head_ref || github.ref_name }}
|
|
25
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
|
|
27
|
+
- name: Install uv
|
|
28
|
+
uses: astral-sh/setup-uv@v5
|
|
29
|
+
with:
|
|
30
|
+
enable-cache: true
|
|
31
|
+
cache-dependency-glob: "uv.lock"
|
|
32
|
+
|
|
33
|
+
- name: Set up Python
|
|
34
|
+
run: uv python install 3.11
|
|
35
|
+
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: uv sync --all-extras --dev
|
|
38
|
+
|
|
39
|
+
- name: Run ruff auto-fix
|
|
40
|
+
run: |
|
|
41
|
+
uv run ruff check --fix --output-format=github src/ tests/
|
|
42
|
+
uv run ruff format src/ tests/
|
|
43
|
+
|
|
44
|
+
- name: Check for changes
|
|
45
|
+
id: check_changes
|
|
46
|
+
run: |
|
|
47
|
+
if git diff --quiet; then
|
|
48
|
+
echo "has_changes=false" >> $GITHUB_OUTPUT
|
|
49
|
+
else
|
|
50
|
+
echo "has_changes=true" >> $GITHUB_OUTPUT
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
- name: Commit and push auto-fixes
|
|
54
|
+
if: steps.check_changes.outputs.has_changes == 'true'
|
|
55
|
+
run: |
|
|
56
|
+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
57
|
+
git config --local user.name "github-actions[bot]"
|
|
58
|
+
git add -A
|
|
59
|
+
git commit -m "style: auto-fix code quality issues with ruff
|
|
60
|
+
|
|
61
|
+
- Applied ruff auto-fixes
|
|
62
|
+
- Formatted code with ruff
|
|
63
|
+
|
|
64
|
+
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
|
65
|
+
git push
|
|
66
|
+
|
|
67
|
+
- name: Run ruff linter check (after auto-fix)
|
|
68
|
+
run: uv run ruff check --output-format=github src/ tests/
|
|
69
|
+
|
|
70
|
+
- name: Run ruff formatter check (after auto-fix)
|
|
71
|
+
run: uv run ruff format --check src/ tests/
|
|
72
|
+
|
|
73
|
+
typecheck:
|
|
74
|
+
name: Type Check
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
steps:
|
|
77
|
+
- name: Checkout code
|
|
78
|
+
uses: actions/checkout@v4
|
|
79
|
+
|
|
80
|
+
- name: Install uv
|
|
81
|
+
uses: astral-sh/setup-uv@v5
|
|
82
|
+
with:
|
|
83
|
+
enable-cache: true
|
|
84
|
+
cache-dependency-glob: "uv.lock"
|
|
85
|
+
|
|
86
|
+
- name: Set up Python
|
|
87
|
+
run: uv python install 3.11
|
|
88
|
+
|
|
89
|
+
- name: Install dependencies
|
|
90
|
+
run: uv sync --all-extras --dev
|
|
91
|
+
|
|
92
|
+
- name: Run ty type checker
|
|
93
|
+
run: uv run ty check src/
|
|
94
|
+
|
|
95
|
+
test:
|
|
96
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
97
|
+
runs-on: ${{ matrix.os }}
|
|
98
|
+
strategy:
|
|
99
|
+
fail-fast: false
|
|
100
|
+
matrix:
|
|
101
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
102
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
103
|
+
|
|
104
|
+
steps:
|
|
105
|
+
- name: Checkout code
|
|
106
|
+
uses: actions/checkout@v4
|
|
107
|
+
|
|
108
|
+
- name: Install uv
|
|
109
|
+
uses: astral-sh/setup-uv@v5
|
|
110
|
+
with:
|
|
111
|
+
enable-cache: true
|
|
112
|
+
cache-dependency-glob: "uv.lock"
|
|
113
|
+
|
|
114
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
115
|
+
run: uv python install ${{ matrix.python-version }}
|
|
116
|
+
|
|
117
|
+
- name: Install dependencies
|
|
118
|
+
run: uv sync --all-extras --dev
|
|
119
|
+
|
|
120
|
+
- name: Run tests
|
|
121
|
+
run: uv run pytest --cov --cov-report=xml --cov-report=term -v
|
|
122
|
+
|
|
123
|
+
- name: Upload coverage to Codecov
|
|
124
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
|
|
125
|
+
uses: codecov/codecov-action@v4
|
|
126
|
+
with:
|
|
127
|
+
file: ./coverage.xml
|
|
128
|
+
flags: unittests
|
|
129
|
+
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
|
|
130
|
+
fail_ci_if_error: false
|
|
131
|
+
env:
|
|
132
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
133
|
+
|
|
134
|
+
build:
|
|
135
|
+
name: Build Package
|
|
136
|
+
runs-on: ubuntu-latest
|
|
137
|
+
needs: [lint, typecheck, test]
|
|
138
|
+
steps:
|
|
139
|
+
- name: Checkout code
|
|
140
|
+
uses: actions/checkout@v4
|
|
141
|
+
|
|
142
|
+
- name: Install uv
|
|
143
|
+
uses: astral-sh/setup-uv@v5
|
|
144
|
+
|
|
145
|
+
- name: Set up Python
|
|
146
|
+
run: uv python install 3.11
|
|
147
|
+
|
|
148
|
+
- name: Build package
|
|
149
|
+
run: uv build
|
|
150
|
+
|
|
151
|
+
- name: Upload build artifacts
|
|
152
|
+
uses: actions/upload-artifact@v4
|
|
153
|
+
with:
|
|
154
|
+
name: dist
|
|
155
|
+
path: dist/
|
|
156
|
+
|
|
157
|
+
- name: Check package metadata
|
|
158
|
+
run: |
|
|
159
|
+
uv tool run twine check dist/*
|
|
160
|
+
|
|
161
|
+
# Final status check - required for branch protection
|
|
162
|
+
ci-success:
|
|
163
|
+
name: CI Success
|
|
164
|
+
runs-on: ubuntu-latest
|
|
165
|
+
needs: [lint, typecheck, test, build]
|
|
166
|
+
if: always()
|
|
167
|
+
steps:
|
|
168
|
+
- name: Check all jobs succeeded
|
|
169
|
+
run: |
|
|
170
|
+
if [[ "${{ needs.lint.result }}" != "success" ]] || \
|
|
171
|
+
[[ "${{ needs.typecheck.result }}" != "success" ]] || \
|
|
172
|
+
[[ "${{ needs.test.result }}" != "success" ]] || \
|
|
173
|
+
[[ "${{ needs.build.result }}" != "success" ]]; then
|
|
174
|
+
echo "One or more jobs failed"
|
|
175
|
+
exit 1
|
|
176
|
+
fi
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Update Dependencies
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
# Run weekly on Monday at 00:00 UTC
|
|
6
|
+
- cron: '0 0 * * 1'
|
|
7
|
+
workflow_dispatch: # Allow manual trigger
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
update:
|
|
15
|
+
name: Update Dependencies
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v5
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
run: uv python install 3.11
|
|
26
|
+
|
|
27
|
+
- name: Update dependencies
|
|
28
|
+
run: |
|
|
29
|
+
uv lock --upgrade
|
|
30
|
+
uv sync --all-extras --dev
|
|
31
|
+
|
|
32
|
+
- name: Run tests
|
|
33
|
+
run: uv run pytest -x --tb=short
|
|
34
|
+
continue-on-error: true
|
|
35
|
+
id: test
|
|
36
|
+
|
|
37
|
+
- name: Create Pull Request
|
|
38
|
+
uses: peter-evans/create-pull-request@v6
|
|
39
|
+
with:
|
|
40
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
41
|
+
commit-message: "chore: update dependencies"
|
|
42
|
+
title: "chore: Update dependencies"
|
|
43
|
+
body: |
|
|
44
|
+
## Automated Dependency Update
|
|
45
|
+
|
|
46
|
+
This PR updates project dependencies to their latest versions.
|
|
47
|
+
|
|
48
|
+
### Test Results
|
|
49
|
+
${{ steps.test.outcome == 'success' && '✅ All tests passed' || '⚠️ Some tests failed - review needed' }}
|
|
50
|
+
|
|
51
|
+
### Changes
|
|
52
|
+
- Updated `uv.lock` with latest compatible versions
|
|
53
|
+
|
|
54
|
+
### Next Steps
|
|
55
|
+
- Review the changes
|
|
56
|
+
- Check for any breaking changes in changelogs
|
|
57
|
+
- Merge if tests pass
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
*This PR was automatically generated by the Update Dependencies workflow.*
|
|
61
|
+
branch: chore/update-dependencies
|
|
62
|
+
delete-branch: true
|
|
63
|
+
labels: |
|
|
64
|
+
dependencies
|
|
65
|
+
automated
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'README.md'
|
|
8
|
+
- 'CONTRIBUTING.md'
|
|
9
|
+
- 'docs/**'
|
|
10
|
+
- 'CHANGELOG.md'
|
|
11
|
+
pull_request:
|
|
12
|
+
paths:
|
|
13
|
+
- 'README.md'
|
|
14
|
+
- 'CONTRIBUTING.md'
|
|
15
|
+
- 'docs/**'
|
|
16
|
+
- 'CHANGELOG.md'
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
check-links:
|
|
20
|
+
name: Check Documentation Links
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout code
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Check markdown links
|
|
27
|
+
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
|
28
|
+
with:
|
|
29
|
+
use-quiet-mode: 'yes'
|
|
30
|
+
config-file: '.github/markdown-link-check.json'
|
|
31
|
+
base-branch: 'main'
|
|
32
|
+
|
|
33
|
+
lint-markdown:
|
|
34
|
+
name: Lint Markdown
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- name: Checkout code
|
|
38
|
+
uses: actions/checkout@v4
|
|
39
|
+
|
|
40
|
+
- name: Lint markdown files
|
|
41
|
+
uses: DavidAnson/markdownlint-cli2-action@v16
|
|
42
|
+
with:
|
|
43
|
+
globs: |
|
|
44
|
+
*.md
|
|
45
|
+
docs/**/*.md
|
|
46
|
+
config: .markdownlint.json
|
|
47
|
+
|
|
48
|
+
validate-changelog:
|
|
49
|
+
name: Validate CHANGELOG Format
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
if: github.event_name == 'pull_request'
|
|
52
|
+
steps:
|
|
53
|
+
- name: Checkout code
|
|
54
|
+
uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
- name: Check CHANGELOG updated
|
|
57
|
+
run: |
|
|
58
|
+
if git diff --name-only origin/main...HEAD | grep -q "CHANGELOG.md"; then
|
|
59
|
+
echo "✅ CHANGELOG.md has been updated"
|
|
60
|
+
else
|
|
61
|
+
echo "⚠️ Consider updating CHANGELOG.md for this change"
|
|
62
|
+
echo "See: https://keepachangelog.com/"
|
|
63
|
+
fi
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*" # Trigger on version tags like v0.1.0, v1.2.3
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write # Required for creating releases
|
|
10
|
+
id-token: write # Required for trusted publishing to PyPI
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
validate:
|
|
14
|
+
name: Validate Release
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Validate tag format
|
|
21
|
+
run: |
|
|
22
|
+
TAG="${{ github.ref_name }}"
|
|
23
|
+
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?$ ]]; then
|
|
24
|
+
echo "Invalid tag format: $TAG"
|
|
25
|
+
echo "Expected format: v0.1.0 or v1.2.3-beta"
|
|
26
|
+
exit 1
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
- name: Extract version
|
|
30
|
+
id: version
|
|
31
|
+
run: |
|
|
32
|
+
TAG="${{ github.ref_name }}"
|
|
33
|
+
VERSION="${TAG#v}"
|
|
34
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
35
|
+
echo "Releasing version: $VERSION"
|
|
36
|
+
|
|
37
|
+
- name: Check version matches pyproject.toml
|
|
38
|
+
run: |
|
|
39
|
+
EXPECTED_VERSION="${{ steps.version.outputs.version }}"
|
|
40
|
+
PYPROJECT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
|
41
|
+
|
|
42
|
+
if [[ "$PYPROJECT_VERSION" != "$EXPECTED_VERSION" ]]; then
|
|
43
|
+
echo "Version mismatch!"
|
|
44
|
+
echo "Tag version: $EXPECTED_VERSION"
|
|
45
|
+
echo "pyproject.toml version: $PYPROJECT_VERSION"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
echo "✓ Version matches: $EXPECTED_VERSION"
|
|
49
|
+
|
|
50
|
+
build:
|
|
51
|
+
name: Build Distribution
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
needs: validate
|
|
54
|
+
steps:
|
|
55
|
+
- name: Checkout code
|
|
56
|
+
uses: actions/checkout@v4
|
|
57
|
+
|
|
58
|
+
- name: Install uv
|
|
59
|
+
uses: astral-sh/setup-uv@v5
|
|
60
|
+
|
|
61
|
+
- name: Set up Python
|
|
62
|
+
run: uv python install 3.11
|
|
63
|
+
|
|
64
|
+
- name: Install dependencies
|
|
65
|
+
run: uv sync --all-extras --dev
|
|
66
|
+
|
|
67
|
+
- name: Build package
|
|
68
|
+
run: uv build
|
|
69
|
+
|
|
70
|
+
- name: List build artifacts
|
|
71
|
+
run: ls -lh dist/
|
|
72
|
+
|
|
73
|
+
- name: Check package with twine
|
|
74
|
+
run: |
|
|
75
|
+
uv tool run twine check dist/*
|
|
76
|
+
|
|
77
|
+
- name: Upload build artifacts
|
|
78
|
+
uses: actions/upload-artifact@v4
|
|
79
|
+
with:
|
|
80
|
+
name: dist
|
|
81
|
+
path: dist/
|
|
82
|
+
retention-days: 7
|
|
83
|
+
|
|
84
|
+
test-install:
|
|
85
|
+
name: Test Installation
|
|
86
|
+
runs-on: ${{ matrix.os }}
|
|
87
|
+
needs: build
|
|
88
|
+
strategy:
|
|
89
|
+
matrix:
|
|
90
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
91
|
+
steps:
|
|
92
|
+
- name: Download build artifacts
|
|
93
|
+
uses: actions/download-artifact@v4
|
|
94
|
+
with:
|
|
95
|
+
name: dist
|
|
96
|
+
path: dist/
|
|
97
|
+
|
|
98
|
+
- name: Install uv
|
|
99
|
+
uses: astral-sh/setup-uv@v5
|
|
100
|
+
|
|
101
|
+
- name: Set up Python
|
|
102
|
+
run: uv python install 3.11
|
|
103
|
+
|
|
104
|
+
- name: Create virtual environment and install package
|
|
105
|
+
shell: bash
|
|
106
|
+
run: |
|
|
107
|
+
# Create virtual environment
|
|
108
|
+
uv venv .venv
|
|
109
|
+
|
|
110
|
+
# Activate virtual environment (cross-platform)
|
|
111
|
+
if [ "$RUNNER_OS" == "Windows" ]; then
|
|
112
|
+
source .venv/Scripts/activate
|
|
113
|
+
else
|
|
114
|
+
source .venv/bin/activate
|
|
115
|
+
fi
|
|
116
|
+
|
|
117
|
+
# Install package from wheel
|
|
118
|
+
WHEEL=$(ls dist/*.whl)
|
|
119
|
+
uv pip install "$WHEEL"
|
|
120
|
+
|
|
121
|
+
- name: Test CLI command
|
|
122
|
+
shell: bash
|
|
123
|
+
run: |
|
|
124
|
+
# Activate virtual environment (cross-platform)
|
|
125
|
+
if [ "$RUNNER_OS" == "Windows" ]; then
|
|
126
|
+
source .venv/Scripts/activate
|
|
127
|
+
else
|
|
128
|
+
source .venv/bin/activate
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
repodoc --version
|
|
132
|
+
repodoc --help
|
|
133
|
+
|
|
134
|
+
publish-pypi:
|
|
135
|
+
name: Publish to PyPI
|
|
136
|
+
runs-on: ubuntu-latest
|
|
137
|
+
needs: [build, test-install]
|
|
138
|
+
environment:
|
|
139
|
+
name: pypi
|
|
140
|
+
url: https://pypi.org/project/repodoc/
|
|
141
|
+
steps:
|
|
142
|
+
- name: Download build artifacts
|
|
143
|
+
uses: actions/download-artifact@v4
|
|
144
|
+
with:
|
|
145
|
+
name: dist
|
|
146
|
+
path: dist/
|
|
147
|
+
|
|
148
|
+
- name: Publish to PyPI
|
|
149
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
150
|
+
with:
|
|
151
|
+
# Using trusted publishing (no token needed)
|
|
152
|
+
# Configure at: https://pypi.org/manage/account/publishing/
|
|
153
|
+
print-hash: true
|
|
154
|
+
|
|
155
|
+
create-release:
|
|
156
|
+
name: Create GitHub Release
|
|
157
|
+
runs-on: ubuntu-latest
|
|
158
|
+
needs: [validate, build, publish-pypi]
|
|
159
|
+
steps:
|
|
160
|
+
- name: Checkout code
|
|
161
|
+
uses: actions/checkout@v4
|
|
162
|
+
with:
|
|
163
|
+
fetch-depth: 0
|
|
164
|
+
|
|
165
|
+
- name: Download build artifacts
|
|
166
|
+
uses: actions/download-artifact@v4
|
|
167
|
+
with:
|
|
168
|
+
name: dist
|
|
169
|
+
path: dist/
|
|
170
|
+
|
|
171
|
+
- name: Extract version
|
|
172
|
+
id: version
|
|
173
|
+
run: |
|
|
174
|
+
TAG="${{ github.ref_name }}"
|
|
175
|
+
VERSION="${TAG#v}"
|
|
176
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
177
|
+
|
|
178
|
+
- name: Generate changelog
|
|
179
|
+
id: changelog
|
|
180
|
+
run: |
|
|
181
|
+
# Extract changelog for this version from CHANGELOG.md
|
|
182
|
+
VERSION="${{ steps.version.outputs.version }}"
|
|
183
|
+
|
|
184
|
+
# Try to extract section between [VERSION] and next version or EOF
|
|
185
|
+
CHANGELOG=$(awk "/## \[$VERSION\]/,/## \[/" CHANGELOG.md | sed '1d;$d' || echo "")
|
|
186
|
+
|
|
187
|
+
if [[ -z "$CHANGELOG" ]]; then
|
|
188
|
+
CHANGELOG="Release $VERSION
|
|
189
|
+
|
|
190
|
+
See the [CHANGELOG](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details."
|
|
191
|
+
fi
|
|
192
|
+
|
|
193
|
+
# Save to file for multiline output
|
|
194
|
+
echo "$CHANGELOG" > release_notes.md
|
|
195
|
+
|
|
196
|
+
- name: Create GitHub Release
|
|
197
|
+
uses: softprops/action-gh-release@v2
|
|
198
|
+
with:
|
|
199
|
+
name: Release ${{ steps.version.outputs.version }}
|
|
200
|
+
body_path: release_notes.md
|
|
201
|
+
files: dist/*
|
|
202
|
+
draft: false
|
|
203
|
+
prerelease: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }}
|
|
204
|
+
generate_release_notes: true
|
|
205
|
+
env:
|
|
206
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
207
|
+
|
|
208
|
+
announce:
|
|
209
|
+
name: Announce Release
|
|
210
|
+
runs-on: ubuntu-latest
|
|
211
|
+
needs: create-release
|
|
212
|
+
if: success()
|
|
213
|
+
steps:
|
|
214
|
+
- name: Extract version
|
|
215
|
+
id: version
|
|
216
|
+
run: |
|
|
217
|
+
TAG="${{ github.ref_name }}"
|
|
218
|
+
VERSION="${TAG#v}"
|
|
219
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
220
|
+
|
|
221
|
+
- name: Post to Discussions (optional)
|
|
222
|
+
# Uncomment if you want to post release announcements
|
|
223
|
+
if: false
|
|
224
|
+
run: |
|
|
225
|
+
echo "🎉 Released RepoDoctor v${{ steps.version.outputs.version }}"
|
|
226
|
+
echo "See: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}"
|
|
227
|
+
|
|
228
|
+
- name: Create issue for documentation update
|
|
229
|
+
uses: actions/github-script@v7
|
|
230
|
+
with:
|
|
231
|
+
script: |
|
|
232
|
+
const version = '${{ steps.version.outputs.version }}';
|
|
233
|
+
await github.rest.issues.create({
|
|
234
|
+
owner: context.repo.owner,
|
|
235
|
+
repo: context.repo.repo,
|
|
236
|
+
title: `📚 Update documentation for v${version}`,
|
|
237
|
+
body: `Post-release tasks for v${version}:
|
|
238
|
+
|
|
239
|
+
- [ ] Verify PyPI package is live: https://pypi.org/project/repodoc/${version}/
|
|
240
|
+
- [ ] Update documentation if needed
|
|
241
|
+
- [ ] Share release announcement
|
|
242
|
+
- [ ] Monitor for issues
|
|
243
|
+
|
|
244
|
+
Release: https://github.com/${context.repo.owner}/${context.repo.repo}/releases/tag/v${version}`,
|
|
245
|
+
labels: ['documentation', 'release']
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
- name: Summary
|
|
249
|
+
run: |
|
|
250
|
+
echo "## 🎉 Release Complete!" >> $GITHUB_STEP_SUMMARY
|
|
251
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
252
|
+
echo "**Version:** ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
253
|
+
echo "**PyPI:** https://pypi.org/project/repodoc/${{ steps.version.outputs.version }}/" >> $GITHUB_STEP_SUMMARY
|
|
254
|
+
echo "**GitHub:** https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
|
|
255
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
256
|
+
echo "### Next Steps" >> $GITHUB_STEP_SUMMARY
|
|
257
|
+
echo "1. Test installation: \`pip install repodoc==${{ steps.version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
|
|
258
|
+
echo "2. Verify CLI: \`repodoc --version\`" >> $GITHUB_STEP_SUMMARY
|
|
259
|
+
echo "3. Share the release! 📢" >> $GITHUB_STEP_SUMMARY
|
repodoc-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"default": true,
|
|
3
|
+
"MD013": {
|
|
4
|
+
"line_length": 120,
|
|
5
|
+
"heading_line_length": 120,
|
|
6
|
+
"code_block_line_length": 120,
|
|
7
|
+
"code_blocks": true,
|
|
8
|
+
"tables": false,
|
|
9
|
+
"headings": true,
|
|
10
|
+
"strict": false,
|
|
11
|
+
"stern": false
|
|
12
|
+
},
|
|
13
|
+
"MD033": {
|
|
14
|
+
"allowed_elements": ["br", "details", "summary", "kbd"]
|
|
15
|
+
},
|
|
16
|
+
"MD041": false
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|