geson-anko / logging_server Goto Github PK
View Code? Open in Web Editor NEWLogging Server for multiprocessing logging management
License: MIT License
Logging Server for multiprocessing logging management
License: MIT License
pytest
, mypy
, black
, isort
,flake
を全てを1つのコマンドで実行できるようにしてください。
以下の記事を参考にしてください。
https://data.gunosy.io/entry/linter_option_on_pyproject
pytest
, mypy
, black
, isort
,flake
が1つのコマンドで実行できることlogger modifierの機能を削除
LogRecordStreamHandler
における各ロガーを取得する処理を消すため
また、ログレコードのハンドル処理はserver.logger
を用いて行う
server.lognameに名前を指定
SocketLoggerの内部ロガーをlogging.getLogger
の返り値に変更
Exception ignored in: <function LoggingServer.__del__ at 0x10306baf0>
Traceback (most recent call last):
File "/Users/geson/JProjects/logging_server/logging_server/server.py", line 58, in __del__
File "/Users/geson/JProjects/logging_server/logging_server/server.py", line 54, in shutdown
AttributeError: 'NoneType' object has no attribute 'join'
こんな感じの図をREADME.mdの末尾に書いてください。
大まかな進め方は、
dev
ブランチへ移動README_LoggingStructure
)でブランチをきるdev
ブランチへプルリクエストを送信するflake8などの開発者用のコードチェック、補完、テストコードの実行を行うツールをインストールしてください。
基本的には以下のサイトを参考にしています。
https://data.gunosy.io/entry/linter_option_on_pyproject
git merge upstream/dev
でフォーク元の変更をマージpoetry add -D pyproject-flake8 black isort mypy
を実行し、インストールinstall/dev_tools
ブランチを切ってプルリクエストlogging_server/logging_server
以下の全てのファイルに対し、poetry run ツール名
の形でpflake8
, black
, isort
,mypy
, pytest
を実行し、修正するformatted/ファイル名
でブランチを切り、そこにそのファイルの変更のみコミットしてプルリクエストを送信する使用している名前空間の外からLoggerを参照するとメインスレッドを終了できなくなります。KeyboardInterruptで抜け出すことが出来ますが、解決策は分かりません。
Exception ignored in: <module 'threading' from '/path/to/miniforge3/envs/LoggingServer/lib/python3.9/threading.py'>
Traceback (most recent call last):
File "/path/to/miniforge3/envs/LoggingServer/lib/python3.9/threading.py", line 1470, in _shutdown
lock.acquire()
KeyboardInterrupt:
with LoggingServer(): # start logging server
... # processings...
# shutdown logging server
Githubにpull request (またはコミット)する際に自動でpytest(mypyやisortも)を実行するようにします。
また、テストエラーが発生した場合はmergeできないようにします。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.