wilfredinni / comments_merken

0 stars 0 forks source link

Python projects with Poetry and VSCode. Part 3 - Python Cheatsheet #3

Open utterances-bot opened 4 years ago

utterances-bot commented 4 years ago

Python projects with Poetry and VSCode. Part 3 - Python Cheatsheet

Finally, in this third part, we'll write a sample library, build our project with Poetry and publish it on Pypi.

https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-3

vaMuchenje commented 4 years ago

I'm getting a ModuleNotFoundError: No module named 'pendulum' error when i try to do from how_long import timer

wilfredinni commented 4 years ago

Try 'poetry install' or 'poetry add pendulum' @vaMuchenje

testautomation commented 4 years ago

Is there a way to publish to https://test.pypi.org/ - to avoid spaming pypi.org?

wilfredinni commented 4 years ago

Is there a way to publish to https://test.pypi.org/ - to avoid spaming pypi.org?

@testautomation yes, you have to add the repository yourself:

$ poetry config repositories.testpypi https://test.pypi.org/legacy

and then

$ poetry publish -r testpypi

testautomation commented 4 years ago

@wilfredinni a follow up question:

When I run poetry publish -r restpypi I get this error

[KeyRingError]
Unable to retrieve the password for poetry-repository-pypi from the key ring

Also I can't find poetry's config file where I may have to add my testpypi credentials(?)

tpiekarski commented 4 years ago

Too bad that this series do not explain how to setup a launch.json for being able to debug Python apps in Visual Studio Code. So far I have been unable to setup one. Would be grateful for a fourth part of this series explaining how to debug apps which are using poetry :)

wilfredinni commented 4 years ago

@tpiekarski that is actually a very good idea... I may write something this weekend if I find the time

tpiekarski commented 4 years ago

Glad to hear that, but be aware of that it seems not to be so straight forward. But you would be the first one writing about it. Looking forward to read a new fourth part of your series.