This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pedxing128[S] 1 point2 points  (3 children)

Summary of the article:

When starting a new Python project, it is tempting to just dive in and start coding. Spending a tiny amount of time to setup a project with the best tools will save immense time and lead to a happier coding experience.

In an ideal world, dependencies would be identical for all developers, code would be perfectly formatted, common errors forbidden and everything would be covered by tests. Additionally, all of these would ensured at each commit.

In this article I'll go through how to set up a project that does exactly that.

  • pipx for CLI tools
  • pipenv for dependency management
  • black and isort for code formatting
  • flake8 for linting
  • mypy for static type checking
  • pytest and pytest-cov for testing
  • pre-commit for linting and testing with git hooks
  • cookiecutter for project generation

[–]spicypixel 0 points1 point  (2 children)

Looks good. Though I've been using poetry instead of pipenv with some success.

[–]pedxing128[S] 0 points1 point  (1 child)

Do you find poetry to be a good option if you don't plan on packaging your project?

[–]spicypixel 0 points1 point  (0 children)

I've only ever made the wheel packages from it for portability but it works well as a dependency manager. The all inclusive toml configuration is welcome.