Suggestion for project structure/setup improvements

オープン
#355 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

No files, tests, or entry points are named. Review the current dependency, formatting, test automation, hook, lint, CI, and contribution setup, then define a focused scope and verify that development setup and documented test commands work consistently across the supported Python versions.

索引モデルが issue の本文から書いたものです。

説明

kind/enhancement

I'd like to suggest an (in my opinion) improvement of the project structure/setup and the involved tooling to ease contributions and maintenance.

  1. Use Poetry for dependency management and packaging. Poetry has a number of advantages over plain pip including proper dependency resolution, built-in dependency locking, specification of dev-dependencies, a unified CLI for dependency and package management, virtual env management, etc. Poetry is used in some popular projects including, e.g., isort, diagrams, Rasa among others. I've been using Poetry since v0.12 and believe that it's the best tool available at this point for managing Python projects.
  2. Use code formatters: Black for most of the code and isort for imports. Those two are the de-facto standard code formatters for Python.
  3. Use Tox for test automation, e.g. for running the test suite against all officially supported Python versions (and if applicable against different versions of specific dependencies).
  4. Use pre-commit to run code formatters and linters before a commit to avoid erroneous commits.
  5. Optionally replace Flake8 by Pylint for more sophisticated linting. This is a matter of taste, I personally like Pylint a lot.
  6. Write a contribution guide on how to set up a development environment, how to run the test suite (against multiple Python versions), etc.

If done well, this setup has a single source of truth for all (dev-)dependencies and tool configurations for local development environments, IDEs, pre-commit hooks and CI jobs, integrates with common IDEs like VS Code out of the box (e.g. formatters can be applied when saving a file), and offers reproducible environments and builds for all contributors. I have numerous private projects set up this way, the DX is very smooth.

What do you think? I'd be happy to send a PR.

主要言語
Python
スター
368
フォーク
140
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

python-openapi/openapi-core のほかの issue

python-openapi/openapi-core の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。