OpenMS / pyopenms-docs

pyOpenMS readthedocs documentation, additional utilities, addons, scripts, and examples.
https://pyopenms.readthedocs.io
Other
43 stars 50 forks source link

Nightly pypi repo not working #323

Closed jpfeuffer closed 1 year ago

jpfeuffer commented 1 year ago

Describe the problem you encountered

gitpod /workspace/quantms (dev) $ python3 -m pip install --index-url https://pypi.cs.uni-tuebingen.de/simple/ pyopenms-nightly==3.0.0
Looking in indexes: https://pypi.cs.uni-tuebingen.de/simple/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.cs.uni-tuebingen.de', port=443): Read timed out. (read timeout=15)")': /simple/pyopenms-nightly/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.cs.uni-tuebingen.de', port=443): Read timed out. (read timeout=15)")': /simple/pyopenms-nightly/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.cs.uni-tuebingen.de', port=443): Read timed out. (read timeout=15)")': /simple/pyopenms-nightly/

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

What should be happening

Screenshots

System information:

Additional context

PierreSnell commented 1 year ago

With poetry (or via curl):

[tool.poetry.dependencies]
pyopenms = [
    {url="https://pypi.cs.uni-tuebingen.de/simple/pyopenms-nightly/pyopenms_nightly-3.0.0.dev20221215-cp39-cp39-macosx_10_9_x86_64.whl", optional=true, markers="python_version ~= '3.9' and sys_platform == 'darwin'"},
    {url="http://pypi.cs.uni-tuebingen.de/packages/pyopenms_nightly-3.0.0.dev20221215-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", optional=true, markers="python_version ~= '3.9' and sys_platform == 'linux'"},
    {url="https://pypi.cs.uni-tuebingen.de/simple/pyopenms-nightly/pyopenms_nightly-3.0.0.dev20221215-cp39-cp39-win_amd64.whl", optional=true, markers="python_version ~= '3.9' and sys_platform == 'win32'"}
]

I can reach the page https://pypi.cs.uni-tuebingen.de/simple/pyopenms-nightly/ in a browser and see all the wheels files (python and os versions).

However, when trying to download any of the .whl files, I got asked for a username and password... Same for poetry that returns a 401 unauthorized error when trying to use it as above.

Without this authentication everything should be working nicely. (also having an alias for the latest one could be a nice addition so one would not have to manually change the version)

Hope it helps. Have a nice day

poshul commented 1 year ago

I'm going to update the Docker image to a newer version of the PyPiServer and debug from there. @PierreSnell I will see what I can change to not require auth for download.

jpfeuffer commented 1 year ago

Done!

PierreSnell commented 1 year ago

Hi @jpfeuffer,

This indeed works now thanks a lot!

However, as it's nightly the date (and name) changes every day and it's impossible to get a consistent dependency... means that I need to update my dependencies names every day...

Is there a possibility of having a consistent name like latest or just hosting the old ones?

pyopenms_nightly = [
    {optional=true, url="https://pypi.cs.uni-tuebingen.de/packages/pyopenms_nightly-3.0.0.dev20230131-cp39-cp39-win_amd64.whl#md5=0682b05c6bf48940ba9a9bd588becb51",  markers= "sys_platform == 'win32'"},
    {optional=true, url="https://pypi.cs.uni-tuebingen.de/packages/pyopenms_nightly-3.0.0.dev20230131-cp39-cp39-macosx_10_9_x86_64.whl#md5=428b46bf5d1d2555c1503a7e8fbc2c42", markers= "sys_platform == 'darwin'"},
    {optional=true, url="https://pypi.cs.uni-tuebingen.de/packages/pyopenms_nightly-3.0.0.dev20230131-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl#md5=a5f5db49c2ee3e80c11f9185dc321d5a", markers= "sys_platform == 'linux'"}
]

That works but as you can see, the 20230131 is already outdated, having it named pyopenms_nightly-3.0.0.dev without the date or with the latest could solve the problem (as it changes every day no matter what...) Or hosting also the old versions could do.

I know that's a patch waiting for 3.0 to be on pypi...

Thanks in advance for any help,

Have a great day.

poshul commented 1 year ago

@PierreSnell Excellent timing, we are actually working on that in our current sprint (see https://github.com/OpenMS/OpenMS/issues/6184). It should be ready to go within the next week.

PierreSnell commented 1 year ago

Hi @poshul, sorry I haven't seen this before asking. Thanks a lot, it's perfect!

Another solution could also be to publish on pypi but I guess it's not stable enough ? A pre-release can do too. I will wait next week then :)