generator-python-poetry-vscode
v1.2.1
Published
Yeoman generator for Python packages, using Poetry and integrated with Visual Studio Code
Downloads
6
Maintainers
Readme
generator-python-poetry-vscode
Yeoman generator for Python packages, using Poetry and integrated with Visual Studio Code
Installation
First, install Yeoman and generator-python-poetry-vscode using npm (we assume you have pre-installed node.js).
npm install -g yo generator-python-poetry-vscode
Then, you'll need to install Poetry. Follow the instructions on the project's website.
Then generate your new project:
yo python-poetry-vscode
Generated files
The python-poetry-vscode
Yeoman generator provides the following:
Poetry-like Python package scaffolding, with source and test files.
Poetry-ready
pyproject.toml
file.Visual Studio Code configuration for Python, including:
- Code navigation, autocompletion and running (courtesy of the VSCode Python extension).
- Formatting on save with black and isort.
- Pytest debugging (still courtesy of VSCode Python extension).
EditorConfig file (courtesy of
generator-editorconf
).gitignore file (courtesy of
generator-gi
).License file (courtesy of
generator-license
).
Planned generated files
- Python package README.md
- asdf/pyenv file
- optional mypy
- optional linting (pylint)
- optional ci (github actions)
- poe tasks
- optional main
- retrieve latest python dependencies (optional?)
Other features
The python-poetry-vscode
generator does its best to ask as few questions as
possible without having an educatedly guessed default answer.
Educated guesses are made based on the environment the generator runs in, for
instance the git configuration or the currently installed version of a
dependency. A great source of infomration is an existing pyproject.toml
, as
it's there that most of the unguessable answers are saved, like the Python
package description.
Furthermore, the vast majority of interactive prompts are also available as command-line options. If the CLI options are given, the prompts aren't displayed.
Getting To Know Yeoman
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
License
GPL-3.0 © Davide Laezza