mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-15 04:05:10 +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
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.branch || github.ref }}
|
ref: ${{ github.event.inputs.branch || github.ref }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Python environment
|
- name: Setup Miniforge (with mamba)
|
||||||
uses: actions/setup-python@v5
|
uses: conda-incubator/setup-miniconda@v3
|
||||||
with:
|
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: |
|
run: |
|
||||||
sudo apt-get update
|
echo "Installing unilabos and dependencies to unilab environment..."
|
||||||
sudo apt-get install -y pandoc
|
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: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
echo "Uninstalling existing unilabos..."
|
||||||
# Install package in development mode to get version info
|
mamba run -n unilab pip uninstall unilabos -y || echo "unilabos not installed via pip"
|
||||||
pip install -e .
|
echo "Installing unilabos from source..."
|
||||||
# Install documentation dependencies
|
mamba run -n unilab pip install .
|
||||||
pip install -r docs/requirements.txt
|
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
|
- name: Setup Pages
|
||||||
id: pages
|
id: pages
|
||||||
@@ -68,8 +83,8 @@ jobs:
|
|||||||
cd docs
|
cd docs
|
||||||
# Clean previous builds
|
# Clean previous builds
|
||||||
rm -rf _build
|
rm -rf _build
|
||||||
# Build HTML documentation
|
# Build HTML documentation in conda environment
|
||||||
python -m sphinx -b html . _build/html -v
|
mamba run -n unilab python -m sphinx -b html . _build/html -v
|
||||||
|
|
||||||
- name: Check build results
|
- name: Check build results
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ extensions = [
|
|||||||
"myst_parser",
|
"myst_parser",
|
||||||
"sphinx.ext.autodoc",
|
"sphinx.ext.autodoc",
|
||||||
"sphinx.ext.napoleon", # 如果您使用 Google 或 NumPy 风格的 docstrings
|
"sphinx.ext.napoleon", # 如果您使用 Google 或 NumPy 风格的 docstrings
|
||||||
"sphinx_rtd_theme"
|
"sphinx_rtd_theme",
|
||||||
]
|
]
|
||||||
|
|
||||||
source_suffix = {
|
source_suffix = {
|
||||||
|
|||||||
@@ -178,12 +178,8 @@
|
|||||||
"size_z": 0
|
"size_z": 0
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [["DMF", 500.0]],
|
||||||
{
|
"pending_liquids": [["DMF", 500.0]]
|
||||||
"liquid_type": "DMF",
|
|
||||||
"liquid_volume": 1000.0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -207,12 +203,8 @@
|
|||||||
"size_z": 0
|
"size_z": 0
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [["ethyl_acetate", 1000.0]],
|
||||||
{
|
"pending_liquids": [["ethyl_acetate", 1000.0]]
|
||||||
"liquid_type": "ethyl_acetate",
|
|
||||||
"liquid_volume": 1000.0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -236,12 +228,8 @@
|
|||||||
"size_z": 0
|
"size_z": 0
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [["hexane", 1000.0]],
|
||||||
{
|
"pending_liquids": [["hexane", 1000.0]]
|
||||||
"liquid_type": "hexane",
|
|
||||||
"liquid_volume": 1000.0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -265,12 +253,8 @@
|
|||||||
"size_z": 0
|
"size_z": 0
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [["methanol", 1000.0]],
|
||||||
{
|
"pending_liquids": [["methanol", 1000.0]]
|
||||||
"liquid_type": "methanol",
|
|
||||||
"liquid_volume": 1000.0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -294,12 +278,8 @@
|
|||||||
"size_z": 0
|
"size_z": 0
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [["water", 1000.0]],
|
||||||
{
|
"pending_liquids": [["water", 1000.0]]
|
||||||
"liquid_type": "water",
|
|
||||||
"liquid_volume": 1000.0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -368,8 +348,8 @@
|
|||||||
"has_heater": true
|
"has_heater": true
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [],
|
||||||
]
|
"pending_liquids": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -454,8 +434,8 @@
|
|||||||
"size_z": 0
|
"size_z": 0
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [],
|
||||||
]
|
"pending_liquids": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -479,8 +459,8 @@
|
|||||||
"size_z": 0
|
"size_z": 0
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [],
|
||||||
]
|
"pending_liquids": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -694,8 +674,8 @@
|
|||||||
"size_z": 0
|
"size_z": 0
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [],
|
||||||
]
|
"pending_liquids": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -719,8 +699,8 @@
|
|||||||
"size_z": 0
|
"size_z": 0
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [],
|
||||||
]
|
"pending_liquids": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -744,8 +724,8 @@
|
|||||||
"size_z": 0
|
"size_z": 0
|
||||||
},
|
},
|
||||||
"data": {
|
"data": {
|
||||||
"liquids": [
|
"liquids": [],
|
||||||
]
|
"pending_liquids": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
|
from typing import Dict, Any
|
||||||
|
|
||||||
from pylabrobot.resources import Container
|
from pylabrobot.resources import Container
|
||||||
from unilabos_msgs.msg import Resource
|
from unilabos_msgs.msg import Resource
|
||||||
@@ -15,9 +16,11 @@ class RegularContainer(Container):
|
|||||||
if "size_z" not in kwargs:
|
if "size_z" not in kwargs:
|
||||||
kwargs["size_z"] = 0
|
kwargs["size_z"] = 0
|
||||||
self.kwargs = kwargs
|
self.kwargs = kwargs
|
||||||
|
self.state = {}
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
def load_state(self, state: Dict[str, Any]):
|
||||||
|
self.state = state
|
||||||
#
|
#
|
||||||
# class RegularContainer(object):
|
# class RegularContainer(object):
|
||||||
# # 第一个参数必须是id传入
|
# # 第一个参数必须是id传入
|
||||||
|
|||||||
@@ -399,11 +399,11 @@ class ResourceTreeSet(object):
|
|||||||
res = node.res_content
|
res = node.res_content
|
||||||
plr_type = TYPE_MAP.get(res.type, res.type)
|
plr_type = TYPE_MAP.get(res.type, res.type)
|
||||||
if res.type not in TYPE_MAP:
|
if res.type not in TYPE_MAP:
|
||||||
logger.warning(f"未知类型 {res.type},使用默认类型 tip_spot")
|
logger.warning(f"未知类型 {res.type}")
|
||||||
|
|
||||||
d = {
|
d = {
|
||||||
"name": res.name,
|
"name": res.name,
|
||||||
"type": res.type,
|
"type": res.config.get("type", plr_type),
|
||||||
"size_x": res.config.get("size_x", 0),
|
"size_x": res.config.get("size_x", 0),
|
||||||
"size_y": res.config.get("size_y", 0),
|
"size_y": res.config.get("size_y", 0),
|
||||||
"size_z": res.config.get("size_z", 0),
|
"size_z": res.config.get("size_z", 0),
|
||||||
|
|||||||
Reference in New Issue
Block a user