Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

server: entrypoints `run_*.py` are written as scripts

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

メンテナーはふだん 4 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
74/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

Start by reading server/app/services/run_repository.py, run_registry.py, and run_discovery.py to identify the code currently executed at import time. Move each entrypoint's setup into a main() function and only assign application when the script is run directly. Done when importing these modules no longer executes the setup, while direct execution still creates the WSGI application.

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

説明

enhancement server

To create the Python WSGI application, the docker images execute a script from server/app/services (run_repository.py, run_registry.py, run_discovery.py) which sets the global application variable.
These script's code is written directly to the file and is not wrapped inside functions or a if __name__ == "__main__" guard. Therefore this code can only and will always be executed when the script is imported (e.g. import app.services.run_repositroy). This complicates unit testing unnecessary, because it requires re-importing the script over and over again.

We should wrap the code that lives at file level today inside a main() function and only execute it, when the script is run directly. This could look equivalent to this:

def main() -> WSGIApp:
	...
	
if __name__ == "__main__":
	application = main()
主要言語
Python
スター
104
フォーク
56
平均マージ
12日 13時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

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

eclipse-basyx/basyx-python-sdk のほかの issue

eclipse-basyx/basyx-python-sdk の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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