SciKit-Surgery / scikit-surgery

SciKit-Surgery - Compact Libraries for Surgical Navigation
http://scikit-surgery.github.io/scikit-surgery/
Other
39 stars 11 forks source link

Fix Front Page on PyPi #27

Closed thompson318 closed 4 years ago

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Nov 26, 2018, 09:28

Currently, this looks wierd.

https://pypi.org/project/scikit-surgery/

as does this:

https://pypi.org/project/scikit-surgeryimage/

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Nov 26, 2018, 09:28

changed the description

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Nov 26, 2018, 20:50

Looks like this is a possibility: https://packaging.python.org/guides/making-a-pypi-friendly-readme/

(would need fixing on all sites uploaded to PyPi thus far, and PythonTemplate).

thompson318 commented 4 years ago

In GitLab by @ThomasDowrick on Nov 27, 2018, 12:23

That link worked and I have fixed this for scikit-surgery and scikit-surgeryimage. Other repositories will have to be changed before they are deployed to PyPI. see commit https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgery/commit/431dc3c4383682f7dc1e9c758e64356ba4eea7c8 for the changes to make.

Annoyingly, just because README.rst renders correectly on Gitlab, doesn't mean that it will also render correctly on PyPI (looks like there is additional validation for PyPI), so it may be necessary to do a manual python setup bdist_install; twine check dist/* locally if any major changes are made to the .rst file.

In particular, it didn't like this bit of code at the end of README.rst (which has now been removed):

.. toctree::
   :maxdepth: 4
   :caption: Contents:

The link above has a method for checking if the .rst files are valid twine check dist/*. This works fine when I run it on my local pc, but it doesn't work on the CI runners.

I think this is because the CI step doesn't use the latest version of twine, which is needed to use the 'check' argument. I tried upgrading the twine version, but this also failed (see https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgeryimage/-/jobs/3577). So for the meantime, manual checking will be required.

I've updated PythonTemplate, so any new projects should work fine out of the box.

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Nov 27, 2018, 12:26

Good stuff. Thanks. At the moment, scikit-surgeryimage looks ok on PyPi, but scikit-surgery does NOT.

Is there a timedelay in refreshing?

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Nov 27, 2018, 12:27

its just refreshed. Problem solved.

thompson318 commented 4 years ago

In GitLab by @MattClarkson on Nov 27, 2018, 12:36

closed