wilfredinni / comments_merken

0 stars 0 forks source link

Python projects with Poetry and VSCode. Part 1 - Python Cheatsheet #2

Open utterances-bot opened 4 years ago

utterances-bot commented 4 years ago

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

We'll use Poetry to start a simple project, manage dependencies and publish it on PyPI. We'll also integrate Pytest, Black, and Flake8 into VSCode directly from a Virtual Environment.

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

stevenj commented 4 years ago

Nice Tutorial.

Things I noticed. On a fresh vscode (vscodium) install, the pyproject.toml file does not highlight. To do that, I had to add:

"files.associations": {
        "*.toml": "ini",
    },

to vscodes settings.json file

CVYY39 commented 4 years ago

I ran into this issue where poetry was stuck on Python 2, on Mac OS. This alias fixed it: alias poetry="python3 $HOME/.poetry/bin/poetry", as mentioned by bdoms in the linked thread.

vaMuchenje commented 4 years ago

You should probably add an instruction to switch into the project directory before running poetry install otherwise you will get an erron

eksortso commented 4 years ago

How do you carry out the curl install on Windows?

vaMuchenje commented 4 years ago

How do you carry out the curl install on Windows?

Install curl for windows, Then run the curl command from your command prompt.

usta commented 4 years ago

Dont forget to install a toml extension for vscode/vscodium like : bungcip.better-toml

fanuch commented 2 years ago

@vaMuchenje that's a silly suggestion ...

If you look at the Poetry installation instructions there are Windows steps that use Invoke-WebRequest on PowerShell.

https://python-poetry.org/docs/#windows-powershell-install-instructions