Re-write URLs in sitemap.xml#2994
Conversation
|
Hello @lilyminium! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-10-18 09:03:53 UTC |
Codecov Report
@@ Coverage Diff @@
## develop #2994 +/- ##
===========================================
+ Coverage 93.05% 93.16% +0.11%
===========================================
Files 186 186
Lines 24609 25032 +423
Branches 3187 3299 +112
===========================================
+ Hits 22900 23322 +422
+ Misses 1661 1659 -2
- Partials 48 51 +3
Continue to review full report at Codecov.
|
| contents = f.read() | ||
| except OSError: | ||
| raise ValueError(f"{file} not found") | ||
| redirected = contents.replace(old, new) |
There was a problem hiding this comment.
Did you consider working with the XML instead?
There was a problem hiding this comment.
In the sense of replacing the URLs for each element separately? As that's still string manipulation I thought just replacing everything in the text file would be easier.
Fixes MDAnalysis#2993 Redirect URLs in stable/sitemap.xml and dev/sitemap.xml to correct locations
Fixes #2993
Changes made in this Pull Request:
See my own stable/sitemap.xml and dev/sitemap.xml as demo.
PR Checklist