Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Code visualization for the praw codebase #2071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ivanmilevtues wants to merge 23 commits into praw-dev:main
base: main
Choose a base branch
Loading
from CodeBoarding:main

Conversation

Copy link

@ivanmilevtues ivanmilevtues commented Jun 9, 2025

Code visualization for the praw codebase

This change contains high-level diagram documentation which is aimed at helping new people get up-to-speed with the existing codebase. You can see how they will look in the github ui here:
https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/praw/on_boarding.md

Feature Summary and Justification

This pull requests contains all the docs for a new person to get a high-level understanding of the praw project before they dive deep into a module/component which is interesting to them.

Me and a friend leverage static analysis and LLMs to generated those, we believe that visuals are the best way to get started on a new project. Further in order to keep them always up-to-date we are currenlty working on a github action!

I would love to hear what do you think about the above said, any feedback is more than welcome!

Full disclosure: we're trying to turn this into a startup, but we're still in a very early stage and figuring out what will actually be useful for people.

References

Copy link

This PR is stale because it has been open for 30 days with no activity.

Remove the Stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale Issue or pull request has been inactive for 20 days label Jul 10, 2025
Copy link
Author

A quick update to this stale PR :D.
The generation logic is now open-source: https://github.com/CodeBoarding/CodeBoarding so you can take a look if interested!

@github-actions github-actions bot removed the Stale Issue or pull request has been inactive for 20 days label Aug 1, 2025
Copy link
Member

This looks cool! Is there a way to automatically update it via GitHub actions?

Copy link

This PR is stale because it has been open for 30 days with no activity.

Remove the Stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale Issue or pull request has been inactive for 20 days label Aug 31, 2025
@LilSpazJoekp LilSpazJoekp removed the Stale Issue or pull request has been inactive for 20 days label Aug 31, 2025
Copy link
Author

@LilSpazJoekp Yes, we do have an action to keep the up-to-date. I'd be more than happy to add it to the inegration here :)

Copy link
Member

Awesome! Would you mind adding that to the PR?

ivanmilevtues reacted with thumbs up emoji

ivanmilevtues and others added 15 commits September 1, 2025 18:07
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 6
- JSON files created/updated: 7
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .md
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 5
- JSON files created/updated: 6
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 6
- JSON files created/updated: 7
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/praw-dev/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 5
- JSON files created/updated: 6
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 6
- JSON files created/updated: 7
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 6
- JSON files created/updated: 7
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
Copy link
Author

@LilSpazJoekp I just added an integration for your readthedocs:
image

image image

Take a look and let me know. This will update the docs every sunday or you can trigger it manually from the actions menu.

## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 6
- JSON files created/updated: 7
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 6
- JSON files created/updated: 7
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 7
- JSON files created/updated: 8
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 6
- JSON files created/updated: 7
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 6
- JSON files created/updated: 7
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
Copy link
Member

Could you rebase on main, squash commits to a single commit, and force push. I tried to do it myself but it looks you have maintainer editing turned off for the branch.

For the CI file, I have this:

name: CodeBoarding Documentation update workflow
on:
 schedule:
 - cron: '0 20 * * 0' # Every Sunday at 8:00 PM UTC
 workflow_dispatch:
 inputs:
 repository_url:
 description: 'Repository URL to analyze'
 required: false
 default: 'https://github.com/praw-dev/praw'
 type: string
 source_branch:
 description: 'Source branch to analyze'
 required: false
 default: 'main'
 type: string
 target_branch:
 description: 'Target branch for documentation'
 required: false
 default: 'main'
 type: string
 output_directory:
 description: 'Output directory for documentation files'
 required: false
 default: '.codeboarding'
 type: string
 output_format:
 description: 'Output format for documentation'
 required: false
 default: '.rst'
 type: choice
 options:
 - '.rst'
 - '.md'
 - '.mdx'
 push:
 branches:
 - main
jobs:
 update-docs:
 runs-on: ubuntu-latest
 timeout-minutes: 45
 permissions:
 contents: write
 pull-requests: write
 steps:
 - name: Checkout repository
 uses: actions/checkout@v4
 with:
 token: ${{ secrets.GITHUB_TOKEN }}
 fetch-depth: 0 # Required to access branch history
 # Determine branches based on context
 - name: Set branch variables
 id: set-branches
 run: |
 if [ "${{ github.event.inputs.source_branch }}" != "" ] && [ "${{ github.event.inputs.target_branch }}" != "" ]; then
 echo "source_branch=${{ github.event.inputs.source_branch }}" >> $GITHUB_OUTPUT
 echo "target_branch=${{ github.event.inputs.target_branch }}" >> $GITHUB_OUTPUT
 echo "repository_url=${{ github.event.inputs.repository_url || format('https://github.com/{0}', github.repository) }}" >> $GITHUB_OUTPUT
 else
 echo "source_branch=main" >> $GITHUB_OUTPUT
 echo "target_branch=main" >> $GITHUB_OUTPUT
 echo "repository_url=https://github.com/${{ github.repository }}" >> $GITHUB_OUTPUT
 fi

 - name: Fetch CodeBoarding Documentation
 timeout-minutes: 30
 id: codeboarding
 uses: CodeBoarding/CodeBoarding-GHAction@0.1.2
 with:
 repository_url: ${{ steps.set-branches.outputs.repository_url }}
 source_branch: ${{ steps.set-branches.outputs.source_branch }}
 target_branch: ${{ steps.set-branches.outputs.target_branch }}
 output_directory: ${{ github.event.inputs.output_directory || '.codeboarding' }}
 output_format: ${{ github.event.inputs.output_format || '.rst' }}
 - name: Display Action Results
 run: |
 echo "Documentation files created: ${{ steps.codeboarding.outputs.markdown_files_created }}"
 echo "JSON files created: ${{ steps.codeboarding.outputs.json_files_created }}"
 echo "Documentation directory: ${{ steps.codeboarding.outputs.output_directory }}"
 echo "JSON directory: ${{ steps.codeboarding.outputs.json_directory }}"
 echo "Has changes: ${{ steps.codeboarding.outputs.has_changes }}"

 # Move .rst files from .codeboarding/ to docs/architecture_overview/ folder
 - name: Move .rst files to architecture overview
 run: |
 # Create docs/architecture_overview directory if it doesn't exist
 mkdir -p docs/architecture_overview

 # Check if .codeboarding/ exists and contains .rst files
 if [ -d ".codeboarding" ] && [ -n "$(find .codeboarding -name '*.rst' -type f)" ]; then
 echo "Moving .rst files from .codeboarding/ to docs/architecture_overview/"

 # Copy .rst files to docs/architecture_overview folder
 cp .codeboarding/*.rst docs/architecture_overview/ 2>/dev/null || echo "No .rst files found to copy"

 # Also copy any subdirectories with .rst files
 find .codeboarding -type d -exec sh -c '
 for dir do
 if [ -n "$(find "$dir" -maxdepth 1 -name "*.rst" -type f)" ]; then
 echo "Copying .rst files from $dir"
 cp "$dir"/*.rst docs/architecture_overview/ 2>/dev/null || echo "No .rst files found in $dir"
 fi
 done
 ' sh {} +

 echo ".rst files moved to architecture overview successfully"
 else
 echo "No .codeboarding/ directory or .rst files found"
 fi

 - name: Install dependencies
 run: |
 python -m pip install --upgrade pip pre-commit
 pip install .[dev]
 - name: Run hooks
 run: pre-commit run --all-files
 - uses: peter-evans/create-pull-request@v7
 with:
 branch: update/codeboarding-docs
 title: Update CodeBoarding documentation
 commit-message: Update CodeBoarding documentation
 body: |
 - Documentation files created/updated: ${{ steps.codeboarding.outputs.markdown_files_created }}
 - JSON files created/updated: ${{ steps.codeboarding.outputs.json_files_created }}

This adds our documentation formatter and simplifies the pull request process.

## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 6
- JSON files created/updated: 7
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
## 📚 Documentation Update
This commit contains updated documentation files fetched from the CodeBoarding service.
### 📊 Summary
- Documentation files created/updated: 7
- JSON files created/updated: 8
- Documentation directory: .codeboarding/
- JSON directory: .codeboarding/
- Output format: .rst
- Repository analyzed: https://github.com/CodeBoarding/praw
- Source branch: main
- Target branch: main
🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /