Skip to content
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

Dead links at PyPI #1287

Open
bonimart opened this issue Dec 9, 2024 · 5 comments · May be fixed by #1298
Open

Dead links at PyPI #1287

bonimart opened this issue Dec 9, 2024 · 5 comments · May be fixed by #1298

Comments

@mwouts
Copy link
Owner

mwouts commented Dec 9, 2024

Oh yes you're right! It seems that I am asking to much from my README.md... The links work on GitHub and on RTD but that's right they don't work on PyPI.

@choldgraf or @mahendrapaipuri do you know if I can pre-process the README.md to e.g. add the full links to either GitHub or RTD when the package is being built?

@choldgraf
Copy link
Contributor

hmmm, I'm not sure. You could define a template README.md (e.g. README.md.template) and auto-generate the README.md as a pre-commit hook or something if you really wanted control there. But that seems excessive

@mahendrapaipuri
Copy link
Contributor

@mwouts I think you can include the absolute links instead of relative paths in README so that they work everywhere. Instead of something like:

A Python notebook encoded in the `py:percent` [format](docs/formats-scripts.md#the-percent-format)

using something like

A Python notebook encoded in the `py:percent` [format](https://github.com/mwouts/jupytext/blob/main/docs/formats-scripts.md#the-percent-format)

What do you think?

@mwouts mwouts linked a pull request Dec 15, 2024 that will close this issue
@mwouts
Copy link
Owner

mwouts commented Dec 15, 2024

Well, I need the relative links, as we do use this file in the documentation. I think I am looking for a build hook, maybe something like #1298 could work?

@mahendrapaipuri
Copy link
Contributor

Ah, ok, I see. You are using the README in the sphinx docs as well.

In that case, may be a simple option would be to copy the README (with absolute links) file into docs folder before compiling sphinx. You can add it as a target into Sphinx Makefile. Something like:

copy-readme:
	@echo "Copying top level README file"
	cp ../README.md README.md
        sed -i 's:https://github.com/mwouts/jupytext/blob/main/::g' README.md

And make the above target as dependent to build target for Sphinx docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants