Python environment management in LabThings config file
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
The issue does not name implementation files or tests. Read the configuration format and how it maps each Thing to its class, then review how the project currently documents Python dependencies; the issue frames this as discussion and leaves the format and scope undecided. Done would require a decided approach for representing package requirements and generating a requirements.in file.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
A LabThings server is configured by a config file that specifies the class for each Thing. That depends on all of the relevant packages existing in the current Python environment, which isn't guaranteed.
Describe the solution you'd like
The LabThings config file could include the package name (which isn't always the same as the module name) for each Thing. It could even include a version and/or hash. LabThings would then be able to parse a config file and produce a requirements.in file that's able to be interpreted by pip or uv. Said file could then be compiled into a version-locked requirements.txt file (including package hashes) for a reproducible environment.
It will take a bit of thought to figure out a format that works without unnecessary duplication of information, especially when specifying software versions and thinking about version locking/pinning. It is also important to make sure we don't duplicate work that's already done much better by tools like pip, uv and so on. However, I think it could be pretty valuable if the config file is able to act as a single source of truth for the required Python environment.
I am not convinced we want to enter the murky waters of LabThings managing python environments directly. That feels like a big step up in software complexity. However, if it can play nicely with environment management tools (e.g. by generating a requirements.in) that might be very useful.
For example, the OpenFlexure management server could allow someone to configure the labthings config file, which in turn generates a requirements.in that allows it to ensure that the packages required for a given configuration are installed. Thinking that through, it might not play nicely with projects that substantially customise the LabThings server, because this creates a sort of chicken-and-egg problem (you'd need that package before you can load the config file...). I think it could still be useful, but exactly what takes priority would need careful thought. It would probably work better if server customisations could be fully specified through the config file, that's a sizeable change to how it's currently run though.
Describe alternatives you've considered
The obvious alternative is using the existing config file together with a requirements.in or requirements.txt file. There's something appealing to me about linking individual Things to packages rather than specifying the two independently.
Additional context
This issue is mostly me recording some thoughts from a conversation with a colleague at HTT, it's here to prompt discussion rather than immediate implementation.
- 主要言語
- Python
- スター
- 10
- フォーク
- 4
- 平均マージ
- 4日 15時間
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
labthings/labthings-fastapi のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
labthings/labthings-fastapi#438 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
labthings/labthings-fastapi#435 ·
メンテナーはふだん 3 日以内に返信
-
Consider atomic JSON writes再び着手できるかも @ashiishe2-oss が 26 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
labthings/labthings-fastapi#412 · コメント 3 件 ·
メンテナーはふだん 3 日以内に返信
-
drop-python-version
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
labthings/labthings-fastapi#354 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
labthings/labthings-fastapi#312 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
labthings/labthings-fastapi の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
bad-antics/lateralus-lang#1623 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
fossguild/thelifesnake#82 ·
メンテナーはふだん 1 日以内に返信
-
Unfitted DialectClassifier crashes with a confusing ValueError: raise a clear "not fitted" errorオープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
omarelshamy25x/shamy-arabic-nlp#111 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pietbarber/Manage2Soar#1189 ·
メンテナーはふだん 1 日以内に返信
-
BUG: write_netcdf fails on Tutorial 3 BEM output with pandas CategoricalDtype DOF coordinates対応中かも @dtgaebe が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
sandialabs/WecOptTool#467 ·