-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Fix and augment relative links in MD files to GitHub blob URLs #2061
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
base: develop
Are you sure you want to change the base?
Conversation
|
waiting for #2050 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2061 +/- ##
=======================================
Coverage 52% 52%
=======================================
Files 61 61
Lines 7076 7076
=======================================
Hits 3657 3657
Misses 3419 3419 🚀 New features to boost your workflow:
|
This reverts commit bd2edcc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR converts hardcoded GitHub blob URLs in markdown files to relative links, and introduces a script to augment these relative links back to GitHub URLs during the package build process. This approach allows for better maintainability of documentation while ensuring published documentation still contains full GitHub URLs.
Changes:
- Convert GitHub blob URLs to relative links in markdown documentation files
- Add a Python script to augment relative links to GitHub URLs during builds
- Integrate the augmentation script into the package build workflow
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/index.md | Converted 4 GitHub blob URLs for LICENSE.md to relative paths (../LICENSE.md) |
| README.md | Converted GitHub URLs to relative paths for LICENSE.md, examples directory, and CONTRIBUTING.md |
| CONTRIBUTING.md | Converted GitHub blob URL for LICENSE.md to relative path (./LICENSE.md) |
| .github/scripts/augment_links.py | New Python script to convert relative links in markdown files to GitHub blob/tree URLs |
| .github/workflows/build-package.yml | Added workflow step to run the augmentation script on README.md before building package |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| with open(file_path) as f: | ||
| content = f.read() |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file is opened without specifying an encoding parameter. For better portability and to avoid potential encoding issues on different systems, it's recommended to explicitly specify encoding='utf-8' when opening text files.
| with open(file_path, "w") as f: | ||
| f.write(new_content) |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file is opened for writing without specifying an encoding parameter. For consistency and to avoid potential encoding issues, it's recommended to explicitly specify encoding='utf-8' when opening text files.
Co-authored-by: Copilot <[email protected]>
This pull request standardizes and simplifies the way internal documentation and badges link to the project's license and other files, switching from absolute GitHub URLs to relative paths. It also introduces a script to augment relative links in markdown files to point directly to GitHub URLs, and updates the build workflow to use this script for the
README.md. These changes improve maintainability and ensure that links work both locally and on GitHub.Link standardization and simplification:
README.mdanddocs/index.mdto use relative paths instead of full GitHub URLs, making them more robust and easier to maintain. [1] [2] [3] [4] [5] [6]CONTRIBUTING.mdto use a relative path, aligning it with the new standard.README.mdto use a relative path.Automation and workflow improvements:
.github/scripts/augment_links.py, which converts relative links in markdown files to GitHub URLs, automating link management in documentation..github/workflows/build-package.yml) to run a script that augments paths in theREADME.md, ensuring that links are correctly formatted before distribution.