Python environment management in LabThings config file
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 10
- Fork
- 4
- Merge trung bình
- 4 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của labthings/labthings-fastapi
-
Tests can fail on `anyio < 4.14`Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
labthings/labthings-fastapi#438 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
labthings/labthings-fastapi#435 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Consider atomic JSON writesCó thể làm lại được @ashiishe2-oss đã nhận 26 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
labthings/labthings-fastapi#412 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Use `Exception.add_note`Đang mởdrop-python-version
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
labthings/labthings-fastapi#354 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Log propagation issueĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
labthings/labthings-fastapi#312 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của labthings/labthings-fastapi
Issue tương tự
-
bug feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Qiskit/qiskit-obp#156 ·
-
perf(batch-jobs): discover-misses reads the state list without running the whole stage reportĐang mởaction-item enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
getcommunityone/open-navigator#1658 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
review-panel severity:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kristovatlas/coin-accounting#636 ·
Maintainer thường phản hồi trong vòng 1 ngày