mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-06 15:05:13 +00:00
Compare commits
4 Commits
dfc635189c
...
62c4135938
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62c4135938 | ||
|
|
027b4269c4 | ||
|
|
3757bd9c58 | ||
|
|
c75b7d5aae |
43
.github/workflows/deploy-docs.yml
vendored
43
.github/workflows/deploy-docs.yml
vendored
@@ -39,24 +39,39 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch || github.ref }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Python environment
|
||||
uses: actions/setup-python@v5
|
||||
- name: Setup Miniforge (with mamba)
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
python-version: '3.10'
|
||||
miniforge-version: latest
|
||||
use-mamba: true
|
||||
python-version: '3.11.11'
|
||||
channels: conda-forge,robostack-staging,uni-lab,defaults
|
||||
channel-priority: flexible
|
||||
activate-environment: unilab
|
||||
auto-update-conda: false
|
||||
show-channel-urls: true
|
||||
|
||||
- name: Install system dependencies
|
||||
- name: Install unilabos and dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y pandoc
|
||||
echo "Installing unilabos and dependencies to unilab environment..."
|
||||
echo "Using mamba for faster and more reliable dependency resolution..."
|
||||
mamba install -n unilab uni-lab::unilabos -c uni-lab -c robostack-staging -c conda-forge -y
|
||||
|
||||
- name: Install Python dependencies
|
||||
- name: Install latest unilabos from source
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
# Install package in development mode to get version info
|
||||
pip install -e .
|
||||
# Install documentation dependencies
|
||||
pip install -r docs/requirements.txt
|
||||
echo "Uninstalling existing unilabos..."
|
||||
mamba run -n unilab pip uninstall unilabos -y || echo "unilabos not installed via pip"
|
||||
echo "Installing unilabos from source..."
|
||||
mamba run -n unilab pip install .
|
||||
echo "Verifying installation..."
|
||||
mamba run -n unilab pip show unilabos
|
||||
|
||||
- name: Install documentation dependencies
|
||||
run: |
|
||||
echo "Installing documentation build dependencies..."
|
||||
mamba run -n unilab pip install -r docs/requirements.txt
|
||||
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
@@ -68,8 +83,8 @@ jobs:
|
||||
cd docs
|
||||
# Clean previous builds
|
||||
rm -rf _build
|
||||
# Build HTML documentation
|
||||
python -m sphinx -b html . _build/html -v
|
||||
# Build HTML documentation in conda environment
|
||||
mamba run -n unilab python -m sphinx -b html . _build/html -v
|
||||
|
||||
- name: Check build results
|
||||
run: |
|
||||
|
||||
@@ -23,7 +23,7 @@ extensions = [
|
||||
"myst_parser",
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.napoleon", # 如果您使用 Google 或 NumPy 风格的 docstrings
|
||||
"sphinx_rtd_theme"
|
||||
"sphinx_rtd_theme",
|
||||
]
|
||||
|
||||
source_suffix = {
|
||||
|
||||
@@ -178,12 +178,8 @@
|
||||
"size_z": 0
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
{
|
||||
"liquid_type": "DMF",
|
||||
"liquid_volume": 1000.0
|
||||
}
|
||||
]
|
||||
"liquids": [["DMF", 500.0]],
|
||||
"pending_liquids": [["DMF", 500.0]]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -207,12 +203,8 @@
|
||||
"size_z": 0
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
{
|
||||
"liquid_type": "ethyl_acetate",
|
||||
"liquid_volume": 1000.0
|
||||
}
|
||||
]
|
||||
"liquids": [["ethyl_acetate", 1000.0]],
|
||||
"pending_liquids": [["ethyl_acetate", 1000.0]]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -236,12 +228,8 @@
|
||||
"size_z": 0
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
{
|
||||
"liquid_type": "hexane",
|
||||
"liquid_volume": 1000.0
|
||||
}
|
||||
]
|
||||
"liquids": [["hexane", 1000.0]],
|
||||
"pending_liquids": [["hexane", 1000.0]]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -265,12 +253,8 @@
|
||||
"size_z": 0
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
{
|
||||
"liquid_type": "methanol",
|
||||
"liquid_volume": 1000.0
|
||||
}
|
||||
]
|
||||
"liquids": [["methanol", 1000.0]],
|
||||
"pending_liquids": [["methanol", 1000.0]]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -294,12 +278,8 @@
|
||||
"size_z": 0
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
{
|
||||
"liquid_type": "water",
|
||||
"liquid_volume": 1000.0
|
||||
}
|
||||
]
|
||||
"liquids": [["water", 1000.0]],
|
||||
"pending_liquids": [["water", 1000.0]]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -368,8 +348,8 @@
|
||||
"has_heater": true
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
]
|
||||
"liquids": [],
|
||||
"pending_liquids": []
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -454,8 +434,8 @@
|
||||
"size_z": 0
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
]
|
||||
"liquids": [],
|
||||
"pending_liquids": []
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -479,8 +459,8 @@
|
||||
"size_z": 0
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
]
|
||||
"liquids": [],
|
||||
"pending_liquids": []
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -694,8 +674,8 @@
|
||||
"size_z": 0
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
]
|
||||
"liquids": [],
|
||||
"pending_liquids": []
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -719,8 +699,8 @@
|
||||
"size_z": 0
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
]
|
||||
"liquids": [],
|
||||
"pending_liquids": []
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -744,8 +724,8 @@
|
||||
"size_z": 0
|
||||
},
|
||||
"data": {
|
||||
"liquids": [
|
||||
]
|
||||
"liquids": [],
|
||||
"pending_liquids": []
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
from typing import Dict, Any
|
||||
|
||||
from pylabrobot.resources import Container
|
||||
from unilabos_msgs.msg import Resource
|
||||
@@ -15,9 +16,11 @@ class RegularContainer(Container):
|
||||
if "size_z" not in kwargs:
|
||||
kwargs["size_z"] = 0
|
||||
self.kwargs = kwargs
|
||||
self.state = {}
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
||||
def load_state(self, state: Dict[str, Any]):
|
||||
self.state = state
|
||||
#
|
||||
# class RegularContainer(object):
|
||||
# # 第一个参数必须是id传入
|
||||
|
||||
@@ -399,11 +399,11 @@ class ResourceTreeSet(object):
|
||||
res = node.res_content
|
||||
plr_type = TYPE_MAP.get(res.type, res.type)
|
||||
if res.type not in TYPE_MAP:
|
||||
logger.warning(f"未知类型 {res.type},使用默认类型 tip_spot")
|
||||
logger.warning(f"未知类型 {res.type}")
|
||||
|
||||
d = {
|
||||
"name": res.name,
|
||||
"type": res.type,
|
||||
"type": res.config.get("type", plr_type),
|
||||
"size_x": res.config.get("size_x", 0),
|
||||
"size_y": res.config.get("size_y", 0),
|
||||
"size_z": res.config.get("size_z", 0),
|
||||
|
||||
Reference in New Issue
Block a user